IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 6, 2005, 4:29:44 PM (21 years ago)
Author:
desonia
Message:

removed psImageIO functions.

Location:
trunk/psLib/test/image
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/image/Makefile.am

    r3973 r4128  
    2424        tst_psImageStructManip \
    2525        tst_psImageConvolve \
    26         tst_psImageIO \
    2726        tst_psImageInterpolate
    2827
  • trunk/psLib/test/image/tst_psImageGeomManip.c

    r4069 r4128  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-06-01 20:37:39 $
     8 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-06-07 02:29:44 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    536536    mkdir("temp",0777);
    537537    remove
    538         ("temp/fOut.fits")
    539         ;
    540     remove
    541         ("temp/sOut.fits")
    542         ;
    543     remove
    544         ("temp/fBiOut.fits")
    545         ;
    546     remove
    547         ("temp/sBiOut.fits");
    548     ;
     538        ("temp/out.fits");
    549539    psS32 index = 0;
    550540    psBool fail = false;
    551541    psF32 radianRot;
     542
     543    psFits* fOutFile = psFitsAlloc("temp/fOut.fits");
     544    psFits* sOutFile = psFitsAlloc("temp/sOut.fits");
     545    psFits* fBiOutFile = psFitsAlloc("temp/fBiOut.fits");
     546    psFits* sBiOutFile = psFitsAlloc("temp/sBiOut.fits");
     547    if (fOutFile == NULL ||sOutFile == NULL || fBiOutFile == NULL || sBiOutFile == NULL) {
     548        psError(PS_ERR_UNKNOWN, true, "Can not create output files, so why continue!?");
     549        return 1;
     550    }
     551
     552    psFits* fTruthFile = psFitsAlloc("verified/fOut.fits");
     553    psFits* sTruthFile = psFitsAlloc("verified/sOut.fits");
     554    psFits* fBiTruthFile = psFitsAlloc("verified/fBiOut.fits");
     555    psFits* sBiTruthFile = psFitsAlloc("verified/sBiOut.fits");
     556    if (fTruthFile == NULL ||sTruthFile == NULL || fBiTruthFile == NULL || sBiTruthFile == NULL) {
     557        psError(PS_ERR_UNKNOWN, true, "Can not open truth files, so why continue!?");
     558        return 1;
     559    }
     560
     561    char hduName[80];
     562    psRegion regionAll = psRegionSet(0,0,0,0);
    552563    for (psS32 rot=-180;rot<=180;rot+=45) {
    553564        psImage* oldOut = fOut;
    554565        psImage* oldBiOut = fBiOut;
    555 
     566        snprintf(hduName, 80, "%+d", rot);
    556567        if (rot == 90) {
    557568            radianRot = M_PI_2;
     
    578589        sOut = psImageRotate(sOut,sImg,radianRot,-1.0,PS_INTERPOLATE_FLAT);
    579590        sBiOut = psImageRotate(sBiOut,sImg,radianRot,-1.0,PS_INTERPOLATE_BILINEAR);
    580         if (! psImageWriteSection(fOut,0,0,0,NULL,index,"temp/fOut.fits") ) {
    581             psError(PS_ERR_UNKNOWN, true,"Can not write to temp/fOut.fits, so why continue!?");
     591
     592        if (! psFitsWriteImage(fOutFile, NULL, fOut, 1, hduName) ) {
     593            psError(PS_ERR_UNKNOWN, true,"Can not write fOut.");
    582594            return 20;
    583595        }
    584         if (! psImageWriteSection(sOut,0,0,0,NULL,index,"temp/sOut.fits") ) {
    585             psError(PS_ERR_UNKNOWN, true,"Can not write to temp/sOut.fits, so why continue!?");
     596        if (! psFitsWriteImage(sOutFile, NULL, sOut, 1, hduName) ) {
     597            psError(PS_ERR_UNKNOWN, true,"Can not write sOut.");
    586598            return 21;
    587599        }
    588         if (! psImageWriteSection(fBiOut,0,0,0,NULL,index,"temp/fBiOut.fits") ) {
    589             psError(PS_ERR_UNKNOWN, true,"Can not write to temp/fBiOut.fits, so why continue!?");
     600        if (! psFitsWriteImage(fBiOutFile, NULL, fBiOut, 1, hduName) ) {
     601            psError(PS_ERR_UNKNOWN, true,"Can not write fBiOut.fits.");
    590602            return 40;
    591603        }
    592         if (! psImageWriteSection(sBiOut,0,0,0,NULL,index,"temp/sBiOut.fits") ) {
    593             psError(PS_ERR_UNKNOWN, true,"Can not write to temp/sBiOut.fits, so why continue!?");
     604        if (! psFitsWriteImage(sBiOutFile, NULL, sBiOut, 1, hduName) ) {
     605            psError(PS_ERR_UNKNOWN, true,"Can not write sBiOut.fits.");
    594606            return 41;
    595607        }
    596608
    597609        // now, let's compare this with the verified file
    598         fTruth = psImageReadSection(fTruth,0,0,0,0,0,NULL,index,"temp/fOut.fits");
    599         sTruth = psImageReadSection(sTruth,0,0,0,0,0,NULL,index,"temp/sOut.fits");
    600         fBiTruth = psImageReadSection(fBiTruth,0,0,0,0,0,NULL,index,"temp/fBiOut.fits");
    601         sBiTruth = psImageReadSection(sBiTruth,0,0,0,0,0,NULL,index,"temp/sBiOut.fits");
     610        psFitsMoveExtNum(fTruthFile, index, false);
     611        psFitsMoveExtNum(sTruthFile, index, false);
     612        psFitsMoveExtNum(fBiTruthFile, index, false);
     613        psFitsMoveExtNum(sBiTruthFile, index, false);
     614        fTruth = psFitsReadImage(fTruth, fTruthFile, regionAll, 0);
     615        sTruth = psFitsReadImage(sTruth, sTruthFile, regionAll, 0);
     616        fBiTruth = psFitsReadImage(fBiTruth, fBiTruthFile, regionAll, 0);
     617        sBiTruth = psFitsReadImage(sBiTruth, sBiTruthFile, regionAll, 0);
    602618        if (fTruth == NULL) {
    603619            psError(PS_ERR_UNKNOWN, true,"verified psF32 image failed to be read (%d deg. rotation)",
     
    743759    psFree(fBiOut);
    744760
     761    psFree(fOutFile);
     762    psFree(sOutFile);
     763    psFree(fBiOutFile);
     764    psFree(sBiOutFile);
     765
     766    psFree(fTruthFile);
     767    psFree(sTruthFile);
     768    psFree(fBiTruthFile);
     769    psFree(sBiTruthFile);
     770
    745771    return 0;
    746772}
  • trunk/psLib/test/image/verified/tst_psImageGeomManip.stderr

    r3976 r4128  
    5757\**********************************************************************************/
    5858
    59 <DATE><TIME>|<HOST>|W|psImageWriteSection
    60     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    61 <DATE><TIME>|<HOST>|W|psImageWriteSection
    62     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    63 <DATE><TIME>|<HOST>|W|psImageWriteSection
    64     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    65 <DATE><TIME>|<HOST>|W|psImageWriteSection
    66     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    67 <DATE><TIME>|<HOST>|W|psImageReadSection
    68     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    69 <DATE><TIME>|<HOST>|W|psImageReadSection
    70     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    71 <DATE><TIME>|<HOST>|W|psImageReadSection
    72     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    73 <DATE><TIME>|<HOST>|W|psImageReadSection
    74     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    75 <DATE><TIME>|<HOST>|W|psImageWriteSection
    76     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    77 <DATE><TIME>|<HOST>|W|psImageWriteSection
    78     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    79 <DATE><TIME>|<HOST>|W|psImageWriteSection
    80     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    81 <DATE><TIME>|<HOST>|W|psImageWriteSection
    82     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    83 <DATE><TIME>|<HOST>|W|psImageReadSection
    84     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    85 <DATE><TIME>|<HOST>|W|psImageReadSection
    86     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    87 <DATE><TIME>|<HOST>|W|psImageReadSection
    88     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    89 <DATE><TIME>|<HOST>|W|psImageReadSection
    90     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    91 <DATE><TIME>|<HOST>|W|psImageWriteSection
    92     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    93 <DATE><TIME>|<HOST>|W|psImageWriteSection
    94     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    95 <DATE><TIME>|<HOST>|W|psImageWriteSection
    96     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    97 <DATE><TIME>|<HOST>|W|psImageWriteSection
    98     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    99 <DATE><TIME>|<HOST>|W|psImageReadSection
    100     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    101 <DATE><TIME>|<HOST>|W|psImageReadSection
    102     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    103 <DATE><TIME>|<HOST>|W|psImageReadSection
    104     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    105 <DATE><TIME>|<HOST>|W|psImageReadSection
    106     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    107 <DATE><TIME>|<HOST>|W|psImageWriteSection
    108     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    109 <DATE><TIME>|<HOST>|W|psImageWriteSection
    110     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    111 <DATE><TIME>|<HOST>|W|psImageWriteSection
    112     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    113 <DATE><TIME>|<HOST>|W|psImageWriteSection
    114     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    115 <DATE><TIME>|<HOST>|W|psImageReadSection
    116     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    117 <DATE><TIME>|<HOST>|W|psImageReadSection
    118     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    119 <DATE><TIME>|<HOST>|W|psImageReadSection
    120     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    121 <DATE><TIME>|<HOST>|W|psImageReadSection
    122     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    123 <DATE><TIME>|<HOST>|W|psImageWriteSection
    124     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    125 <DATE><TIME>|<HOST>|W|psImageWriteSection
    126     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    127 <DATE><TIME>|<HOST>|W|psImageWriteSection
    128     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    129 <DATE><TIME>|<HOST>|W|psImageWriteSection
    130     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    131 <DATE><TIME>|<HOST>|W|psImageReadSection
    132     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    133 <DATE><TIME>|<HOST>|W|psImageReadSection
    134     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    135 <DATE><TIME>|<HOST>|W|psImageReadSection
    136     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    137 <DATE><TIME>|<HOST>|W|psImageReadSection
    138     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    139 <DATE><TIME>|<HOST>|W|psImageWriteSection
    140     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    141 <DATE><TIME>|<HOST>|W|psImageWriteSection
    142     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    143 <DATE><TIME>|<HOST>|W|psImageWriteSection
    144     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    145 <DATE><TIME>|<HOST>|W|psImageWriteSection
    146     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    147 <DATE><TIME>|<HOST>|W|psImageReadSection
    148     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    149 <DATE><TIME>|<HOST>|W|psImageReadSection
    150     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    151 <DATE><TIME>|<HOST>|W|psImageReadSection
    152     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    153 <DATE><TIME>|<HOST>|W|psImageReadSection
    154     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    155 <DATE><TIME>|<HOST>|W|psImageWriteSection
    156     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    157 <DATE><TIME>|<HOST>|W|psImageWriteSection
    158     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    159 <DATE><TIME>|<HOST>|W|psImageWriteSection
    160     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    161 <DATE><TIME>|<HOST>|W|psImageWriteSection
    162     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    163 <DATE><TIME>|<HOST>|W|psImageReadSection
    164     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    165 <DATE><TIME>|<HOST>|W|psImageReadSection
    166     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    167 <DATE><TIME>|<HOST>|W|psImageReadSection
    168     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    169 <DATE><TIME>|<HOST>|W|psImageReadSection
    170     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    171 <DATE><TIME>|<HOST>|W|psImageWriteSection
    172     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    173 <DATE><TIME>|<HOST>|W|psImageWriteSection
    174     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    175 <DATE><TIME>|<HOST>|W|psImageWriteSection
    176     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    177 <DATE><TIME>|<HOST>|W|psImageWriteSection
    178     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    179 <DATE><TIME>|<HOST>|W|psImageReadSection
    180     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    181 <DATE><TIME>|<HOST>|W|psImageReadSection
    182     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    183 <DATE><TIME>|<HOST>|W|psImageReadSection
    184     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    185 <DATE><TIME>|<HOST>|W|psImageReadSection
    186     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    187 <DATE><TIME>|<HOST>|W|psImageWriteSection
    188     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    189 <DATE><TIME>|<HOST>|W|psImageWriteSection
    190     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    191 <DATE><TIME>|<HOST>|W|psImageWriteSection
    192     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    193 <DATE><TIME>|<HOST>|W|psImageWriteSection
    194     psImageWriteSection is deprecated.  Consider using psFitsWriteImage instead.
    195 <DATE><TIME>|<HOST>|W|psImageReadSection
    196     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    197 <DATE><TIME>|<HOST>|W|psImageReadSection
    198     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    199 <DATE><TIME>|<HOST>|W|psImageReadSection
    200     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    201 <DATE><TIME>|<HOST>|W|psImageReadSection
    202     psImageReadSection is deprecated.  Consider using psFitsReadImage instead.
    20359<DATE><TIME>|<HOST>|I|testImageRotate
    20460    Following should be an error
Note: See TracChangeset for help on using the changeset viewer.