IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 3, 2004, 3:05:00 PM (22 years ago)
Author:
desonia
Message:

changed the psError signature to match SDRS. Also made misc. cleanups as
I was combing the files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/image/tst_psImageManip.c

    r2204 r2273  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 00:57:33 $
     8 *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-11-04 01:05:00 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    119119            } \
    120120            if (fabsf(imgRow[col]-value) > FLT_EPSILON) { \
    121                 psError(__func__,"Pixel value is not as expected (%g vs %g) at %u,%u", \
     121                psError(PS_ERR_UNKNOWN, true,"Pixel value is not as expected (%g vs %g) at %u,%u", \
    122122                        (psF64)imgRow[col],(psF64)value,col,row); \
    123123                return 1; \
     
    126126    } \
    127127    if (retVal != numClipped) { \
    128         psError(__func__,"Expected %d clips, but got %d", \
     128        psError(PS_ERR_UNKNOWN, true,"Expected %d clips, but got %d", \
    129129                numClipped,retVal); \
    130130        return 2; \
     
    159159            if (fabsf(creal(imgRow[col])-creal(value)) > FLT_EPSILON || \
    160160                    fabsf(cimag(imgRow[col])-cimag(value)) > FLT_EPSILON) { \
    161                 psError(__func__,"Pixel value is not as expected (%.2f+%.2fi vs %.2f+%.2fi) at %u,%u", \
     161                psError(PS_ERR_UNKNOWN, true,"Pixel value is not as expected (%.2f+%.2fi vs %.2f+%.2fi) at %u,%u", \
    162162                        creal(imgRow[col]),cimag(imgRow[col]),creal(value),cimag(value),col,row); \
    163163                return 1; \
     
    166166    } \
    167167    if (retVal != numClipped) { \
    168         psError(__func__,"Expected %d clips, but got %d", \
     168        psError(PS_ERR_UNKNOWN, true,"Expected %d clips, but got %d", \
    169169                numClipped,retVal); \
    170170        return 2; \
     
    198198    retVal = psImageClip(NULL,min,-1.0f,max,-2.0f);
    199199    if (retVal != 0) {
    200         psError(__func__,"Expected zero return for clips of a NULL image.");
     200        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clips of a NULL image.");
    201201        return 3;
    202202    }
     
    207207    retVal = psImageClip(img,max,-1.0f,min,-2.0f);
    208208    if (retVal != 0) {
    209         psError(__func__,"Expected zero return for clips when max < min.");
     209        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clips when max < min.");
    210210        return 4;
    211211    }
     
    217217    retVal = psImageClip(img,min,-1.0f,max,-2.0f);
    218218    if (retVal != 0) {
    219         psError(__func__,"Expected zero return for clip of invalid image type.");
     219        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clip of invalid image type.");
    220220        return 5;
    221221    }
     
    276276            } \
    277277            if (fabsf(imgRow[col]-value) > FLT_EPSILON) { \
    278                 psError(__func__,"Pixel value is not as expected (%f vs %f) at %d,%d", \
     278                psError(PS_ERR_UNKNOWN, true,"Pixel value is not as expected (%f vs %f) at %d,%d", \
    279279                        imgRow[col],value,col,row); \
    280280                return 1; \
     
    283283    } \
    284284    if (retVal != numClipped) { \
    285         psError(__func__,"Expected %d clips, but got %d", \
     285        psError(PS_ERR_UNKNOWN, true,"Expected %d clips, but got %d", \
    286286                numClipped,retVal); \
    287287        return 2; \
     
    299299    retVal = psImageClipNaN(NULL,-1.0f);
    300300    if (retVal != 0) {
    301         psError(__func__,"Expected zero return for clips of a NULL image.");
     301        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clips of a NULL image.");
    302302        return 3;
    303303    }
     
    309309    retVal = psImageClipNaN(img,2.0f);
    310310    if (retVal != 0) {
    311         psError(__func__,"Expected zero return for clip of invalid image type.");
     311        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clip of invalid image type.");
    312312        return 4;
    313313    }
     
    377377            } \
    378378            if (cabs(imgRow[col]-value) > FLT_EPSILON) { \
    379                 psError(__func__,"Pixel value is not as expected (%g%+gi vs %g%+gi) at %d,%d", \
     379                psError(PS_ERR_UNKNOWN, true,"Pixel value is not as expected (%g%+gi vs %g%+gi) at %d,%d", \
    380380                        creal(imgRow[col]),cimag(imgRow[col]),creal(value),cimag(value),col,row); \
    381381                return 1; \
     
    384384    } \
    385385    if (retVal != numClipped) { \
    386         psError(__func__,"Expected %d clips, but got %d", \
     386        psError(PS_ERR_UNKNOWN, true,"Expected %d clips, but got %d", \
    387387                numClipped,retVal); \
    388388        return 2; \
     
    408408    retVal = psImageClipComplexRegion(NULL,0,0,0,0);
    409409    if (retVal != 0) {
    410         psError(__func__,"Expected zero return for clips of a NULL image.");
     410        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clips of a NULL image.");
    411411        return 3;
    412412    }
     
    427427    retVal = psImageClipComplexRegion(img,10.0+I*1.0,-1.0,5.0+5.0*I,-2.0);
    428428    if (retVal != 0) {
    429         psError(__func__,"Expected zero return for creal(min)>creal(max).");
     429        psError(PS_ERR_UNKNOWN, true,"Expected zero return for creal(min)>creal(max).");
    430430        return 3;
    431431    }
     
    433433    retVal = psImageClipComplexRegion(img,1.0+I*10.0,-1.0,5.0+5.0*I,-2.0);
    434434    if (retVal != 0) {
    435         psError(__func__,"Expected zero return for cimag(min)>cimag(max).");
     435        psError(PS_ERR_UNKNOWN, true,"Expected zero return for cimag(min)>cimag(max).");
    436436        return 3;
    437437    }
     
    439439    retVal = psImageClipComplexRegion(img,10.0+I*10.0,-1.0,5.0+5.0*I,-2.0);
    440440    if (retVal != 0) {
    441         psError(__func__,"Expected zero return for min>max.");
     441        psError(PS_ERR_UNKNOWN, true,"Expected zero return for min>max.");
    442442        return 3;
    443443    }
     
    457457                                      0.0);
    458458    if (retVal != 0) {
    459         psError(__func__,"Expected zero return for vmin not in datatype range.");
     459        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmin not in datatype range.");
    460460        return 80;
    461461    }
     
    468468                                      0.0);
    469469    if (retVal != 0) {
    470         psError(__func__,"Expected zero return for vmin not in datatype range.");
     470        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmin not in datatype range.");
    471471        return 81;
    472472    }
     
    479479                                      0.0);
    480480    if (retVal != 0) {
    481         psError(__func__,"Expected zero return for vmin not in datatype range.");
     481        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmin not in datatype range.");
    482482        return 82;
    483483    }
     
    490490                                      0.0);
    491491    if (retVal != 0) {
    492         psError(__func__,"Expected zero return for vmin not in datatype range.");
     492        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmin not in datatype range.");
    493493        return 83;
    494494    }
     
    501501                                      -2.0*(double)FLT_MAX);
    502502    if (retVal != 0) {
    503         psError(__func__,"Expected zero return for vmax not in datatype range.");
     503        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmax not in datatype range.");
    504504        return 84;
    505505    }
     
    512512                                      2.0*(double)FLT_MAX);
    513513    if (retVal != 0) {
    514         psError(__func__,"Expected zero return for vmax not in datatype range.");
     514        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmax not in datatype range.");
    515515        return 85;
    516516    }
     
    523523                                      -2.0*(double)FLT_MAX*I);
    524524    if (retVal != 0) {
    525         psError(__func__,"Expected zero return for vmax not in datatype range.");
     525        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmax not in datatype range.");
    526526        return 87;
    527527    }
     
    534534                                      2.0*(double)FLT_MAX*I);
    535535    if (retVal != 0) {
    536         psError(__func__,"Expected zero return for vmax not in datatype range.");
     536        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmax not in datatype range.");
    537537        return 88;
    538538    }
     
    552552                                      0.0);
    553553    if (retVal == 0) {
    554         psError(__func__,"Didn't expect zero return for vmin > vmax.");
     554        psError(PS_ERR_UNKNOWN, true,"Didn't expect zero return for vmin > vmax.");
    555555        return 83;
    556556    }
     
    573573    retVal = psImageClipComplexRegion(img,2.0,10.0,5.0,0.0);
    574574    if (retVal != 0) {
    575         psError(__func__,"Expected zero return for clip of invalid image type.");
     575        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clip of invalid image type.");
    576576        return 84;
    577577    }
     
    625625    retVal = psImageOverlaySection(img,img2,c/4,r/4,OPSTRING); \
    626626    if (retVal != 0) { \
    627         psError(__func__,"psImageOverlaySection returned non-zero %s op",OPSTRING); \
     627        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned non-zero %s op",OPSTRING); \
    628628        return 1; \
    629629    } \
     
    637637            } \
    638638            if (fabsf(imgRow[col] - val) > FLT_EPSILON) { \
    639                 psError(__func__,"Value incorrect at %d,%d (%.2f vs %.2f for %s)", \
     639                psError(PS_ERR_UNKNOWN, true,"Value incorrect at %d,%d (%.2f vs %.2f for %s)", \
    640640                        col,row,imgRow[col],val,OPSTRING); \
    641641                return 2; \
    642642            } \
    643643            if (row < r/2 && col < c/2 && fabsf(img2Row[col] - 2.0) > FLT_EPSILON) { \
    644                 psError(__func__,"Overlay modified at %d,%d (%.2f for %s)", \
     644                psError(PS_ERR_UNKNOWN, true,"Overlay modified at %d,%d (%.2f for %s)", \
    645645                        col,row,img2Row[col],OPSTRING); \
    646646                return 2; \
     
    706706    retVal = psImageOverlaySection(img,img2,c/4,r/4,"+");
    707707    if (retVal == 0) {
    708         psError(__func__,"psImageOverlaySection returned zero even though "
     708        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero even though "
    709709                "overlay too big");
    710710        return 3;
     
    714714        for (unsigned col=0;col<c;col++) {
    715715            if (imgRow[col] != 6.0f) {
    716                 psError(__func__,"Input image modified when overlay size too big");
     716                psError(PS_ERR_UNKNOWN, true,"Input image modified when overlay size too big");
    717717                return 4;
    718718            }
     
    729729    retVal = psImageOverlaySection(img,NULL,c/4,r/4,"+");
    730730    if (retVal == 0) {
    731         psError(__func__,"psImageOverlaySection returned zero even though "
     731        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero even though "
    732732                "overlay too big");
    733733        return 5;
     
    737737        for (unsigned col=0;col<c;col++) {
    738738            if (imgRow[col] != 6.0f) {
    739                 psError(__func__,"Input image modified when overlay NULL");
     739                psError(PS_ERR_UNKNOWN, true,"Input image modified when overlay NULL");
    740740                return 6;
    741741            }
     
    751751    retVal = psImageOverlaySection(NULL,img2,c/4,r/4,"+");
    752752    if (retVal == 0) {
    753         psError(__func__,"psImageOverlaySection returned zero even though "
     753        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero even though "
    754754                "overlay too big");
    755755        return 7;
     
    764764    retVal = psImageOverlaySection(img,img2,0,0,"$");
    765765    if (retVal == 0) {
    766         psError(__func__,"psImageOverlaySection returned zero even though "
     766        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero even though "
    767767                "overlay operator is invalid");
    768768        return 8;
     
    777777    retVal = psImageOverlaySection(img,img2,0,0,NULL);
    778778    if(retVal == 0) {
    779         psError(__func__,"psImageOverlaySection returned zero even though "
     779        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero even though "
    780780                "overlay operator is NULL");
    781781        return 9;
     
    790790    retVal = psImageOverlaySection(img,img3,0,0,"+");
    791791    if(retVal == 0) {
    792         psError(__func__,"psImageOverlaySection returned zero eventhough "
     792        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero eventhough "
    793793                " overlay image type is different than input image.");
    794794        return 10;
     
    803803    retVal = psImageOverlaySection(img3,img4,0,0,"+");
    804804    if(retVal == 0) {
    805         psError(__func__,"psImageOverlaySection returned zero eventhough "
     805        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero eventhough "
    806806                "overlay and image type are invalid type.");
    807807        return 11;
     
    820820    retVal = psImageOverlaySection(img,img2,0,0,"/");
    821821    if (retVal != 0) {
    822         psError(__func__,"psImageOverlaySection returned non-zero when "
     822        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned non-zero when "
    823823                "checking divide-by-zero.");
    824824        return 12;
     
    906906    out = psImageRebin(NULL,in,NULL,0,4,&stats); \
    907907    if (out == NULL) { \
    908         psError(__func__,"psImageRebin returned a NULL pointer!?"); \
     908        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned a NULL pointer!?"); \
    909909        return 1; \
    910910    } \
    911911    if (out->numRows != 4 || out->numCols != 4) { \
    912         psError(__func__,"psImageRebin didn't produce the proper size image " \
     912        psError(PS_ERR_UNKNOWN, true,"psImageRebin didn't produce the proper size image " \
    913913                "(%d x %d).", \
    914914                out->numCols, out->numRows); \
     
    920920        for (psS32 col = 0; col<4; col++) { \
    921921            if (fabsf((float)outRow[col]-(float)truthRow[col]) > FLT_EPSILON) { \
    922                 psError(__func__,"psImageRebin didn't produce the proper mean " \
     922                psError(PS_ERR_UNKNOWN, true,"psImageRebin didn't produce the proper mean " \
    923923                        "result at (%d,%d) [%f vs %f].", \
    924924                        col,row,outRow[col],truthRow[col]); \
     
    934934        for ( psS32 col = 0; col<4; col++) { \
    935935            if(abs((psS32)outRow[col]-(psS32)truthRow[col]) > FLT_EPSILON) { \
    936                 psError(__func__,"psImageRebin with mask didn't produce the proper mean " \
     936                psError(PS_ERR_UNKNOWN, true,"psImageRebin with mask didn't produce the proper mean " \
    937937                        "result at (%d,%d) [%f vs %f].", \
    938938                        col,row,outRow[col],truthRow[col]); \
     
    944944    out2 = psImageRebin(out,in,NULL,0,3,&stats); \
    945945    if (out != out2) { \
    946         psError(__func__,"psImageRebin didn't recycle a psImage properly!?"); \
     946        psError(PS_ERR_UNKNOWN, true,"psImageRebin didn't recycle a psImage properly!?"); \
    947947        return 7; \
    948948    } \
    949949    if (out == NULL) { \
    950         psError(__func__,"psImageRebin returned a NULL pointer!?"); \
     950        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned a NULL pointer!?"); \
    951951        return 4; \
    952952    } \
    953953    if (out->numRows != 6 || out->numCols != 6) { \
    954         psError(__func__,"psImageRebin didn't produce the proper size image " \
     954        psError(PS_ERR_UNKNOWN, true,"psImageRebin didn't produce the proper size image " \
    955955                "(%d x %d).", \
    956956                out->numCols, out->numRows); \
     
    962962        for (psS32 col = 0; col<6; col++) { \
    963963            if (fabsf((float)outRow[col]-(float)truthRow[col]) > FLT_EPSILON) { \
    964                 psError(__func__,"psImageRebin didn't produce the proper " \
     964                psError(PS_ERR_UNKNOWN, true,"psImageRebin didn't produce the proper " \
    965965                        "max result at (%d,%d) [%f vs %f].", \
    966966                        col,row,outRow[col],truthRow[col]); \
     
    990990    out = psImageRebin(NULL,in,NULL,0,4,&stats);
    991991    if(out != NULL) {
    992         psError(__func__,"psImageRebin return an image eventhough the "
     992        psError(PS_ERR_UNKNOWN, true,"psImageRebin return an image eventhough the "
    993993                "type is not handled.");
    994994        return 14;
     
    999999    out = psImageRebin(NULL,in,mask,1,4,&stats);
    10001000    if(out != NULL) {
    1001         psError(__func__,"psImageRebin return an image eventhough the "
     1001        psError(PS_ERR_UNKNOWN, true,"psImageRebin return an image eventhough the "
    10021002                "mask is not the correct type.");
    10031003        return 17;
     
    10121012
    10131013    if (out2 != NULL) {
    1014         psError(__func__,"psImageRebin returned an image though the input was "
     1014        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the input was "
    10151015                "NULL!?");
    10161016        return 8;
     
    10241024
    10251025    if (out2 != NULL) {
    1026         psError(__func__,"psImageRebin returned an image though the scale was "
     1026        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the scale was "
    10271027                "zero!?");
    10281028        return 9;
     
    10351035
    10361036    if (out2 != NULL) {
    1037         psError(__func__,"psImageRebin returned an image though the stats was "
     1037        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the stats was "
    10381038                "NULL!?");
    10391039        return 10;
     
    10491049
    10501050    if (out2 != NULL) {
    1051         psError(__func__,"psImageRebin returned an image though the stats "
     1051        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the stats "
    10521052                "options was zero!?");
    10531053        return 11;
     
    10591059
    10601060    if (out2 != NULL) {
    1061         psError(__func__,"psImageRebin returned an image though the stats "
     1061        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the stats "
    10621062                "options was PS_STAT_USE_RANGE!?");
    10631063        return 12;
     
    10721072
    10731073    if (out2 != NULL) {
    1074         psError(__func__,"psImageRebin returned an image though the stats "
     1074        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the stats "
    10751075                "options was PS_STAT_SAMPLE_MEAN+PS_STAT_MAX!?");
    10761076        return 13;
     
    11211121        for (psS32 col=0;col<cols;col++) {
    11221122            if (inRow[col] != outRow[col]) {
    1123                 psError(__func__,"psImageRoll didn't produce expected result "
     1123                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
    11241124                        "at %d,%d (%f vs %f) for dx=0, dy=0.",
    11251125                        col,row,inRow[col],outRow[col]);
     
    11351135        for (psS32 col=0;col<cols;col++) {
    11361136            if (inRow[(col+cols/4) % cols] != outRow[col]) {
    1137                 psError(__func__,"psImageRoll didn't produce expected result "
     1137                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
    11381138                        "at %d,%d (%f vs %f) for dx=cols/4, dy=0.",
    11391139                        col,row,inRow[(col+cols/4) % cols],outRow[col]);
     
    11461146    // parameter out if provided.
    11471147    if (out2 != out) {
    1148         psError(__func__,"psImageRoll didn't recycle my out psImage!?");
     1148        psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't recycle my out psImage!?");
    11491149        return 1;
    11501150    }
     
    11561156        for (psS32 col=0;col<cols;col++) {
    11571157            if (inRow[col] != outRow[col]) {
    1158                 psError(__func__,"psImageRoll didn't produce expected result "
     1158                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
    11591159                        "at %d,%d (%f vs %f) for dx=0, dy=rows/4.",
    11601160                        col,row,inRow[col],outRow[col]);
     
    11701170        for (psS32 col=0;col<cols;col++) {
    11711171            if (inRow[(col+cols/4) % cols] != outRow[col]) {
    1172                 psError(__func__,"psImageRoll didn't produce expected result "
     1172                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
    11731173                        "at %d,%d (%f vs %f) for dx=cols/4, dy=rows/4.",
    11741174                        col,row,inRow[(col+cols/4) % cols],outRow[col]);
     
    11841184        for (psS32 col=0;col<cols;col++) {
    11851185            if (inRow[(col+(cols-cols/4)) % cols] != outRow[col]) {
    1186                 psError(__func__,"psImageRoll didn't produce expected result "
     1186                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
    11871187                        "at %d,%d (%f vs %f) for dx=-cols/4, dy=0.",
    11881188                        col,row,inRow[(col+(cols-cols/4)) % cols],outRow[col]);
     
    11981198        for (psS32 col=0;col<cols;col++) {
    11991199            if (inRow[col] != outRow[col]) {
    1200                 psError(__func__,"psImageRoll didn't produce expected result "
     1200                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
    12011201                        "at %d,%d (%f vs %f) for dx=0, dy=-rows/4.",
    12021202                        col,row,inRow[col],outRow[col]);
     
    12121212        for (psS32 col=0;col<cols;col++) {
    12131213            if (inRow[(col+cols-cols/4) % cols] != outRow[col]) {
    1214                 psError(__func__,"psImageRoll didn't produce expected result "
     1214                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
    12151215                        "at %d,%d (%f vs %f) for dx=cols/4, dy=rows/4.",
    12161216                        col,row,inRow[(col+cols-cols/4) % cols],outRow[col]);
     
    12261226    out2 = psImageRoll(NULL,NULL,0,0);
    12271227    if (out2 != NULL) {
    1228         psError(__func__,"psImageRoll did not return NULL though input image was NULL!?");
     1228        psError(PS_ERR_UNKNOWN, true,"psImageRoll did not return NULL though input image was NULL!?");
    12291229        return 2;
    12301230    }
     
    12491249        for (psS32 col=0;col<cols1;col++) { \
    12501250            if (inRow[(col+cols1/4)%cols1] != outRow[col]) { \
    1251                 psError(__func__,"psImageRoll didn't produce expected result " \
     1251                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result " \
    12521252                        "at %d,%d (%f vs %f) for dx=0, dy=0.", \
    12531253                        col,row,(float)inRow[col],(float)outRow[col]); \
     
    13461346        // parameter out if provided.
    13471347        if (oldOut != NULL && oldOut != fOut) {
    1348             psError(__func__,"the output recycle functionality failed");
     1348            psError(PS_ERR_UNKNOWN, true,"the output recycle functionality failed");
    13491349            return 2;
    13501350        }
    13511351        if (oldBiOut != NULL && oldBiOut != fBiOut) {
    1352             psError(__func__,"the output recycle functionality failed");
     1352            psError(PS_ERR_UNKNOWN, true,"the output recycle functionality failed");
    13531353            return 4;
    13541354        }
     
    13561356        sBiOut = psImageRotate(sBiOut,sImg,rot,-1.0,PS_INTERPOLATE_BILINEAR);
    13571357        if (! psImageWriteSection(fOut,0,0,0,NULL,index,"temp/fOut.fits") ) {
    1358             psError(__func__,"Can not write to temp/fOut.fits, so why continue!?");
     1358            psError(PS_ERR_UNKNOWN, true,"Can not write to temp/fOut.fits, so why continue!?");
    13591359            return 20;
    13601360        }
    13611361        if (! psImageWriteSection(sOut,0,0,0,NULL,index,"temp/sOut.fits") ) {
    1362             psError(__func__,"Can not write to temp/sOut.fits, so why continue!?");
     1362            psError(PS_ERR_UNKNOWN, true,"Can not write to temp/sOut.fits, so why continue!?");
    13631363            return 21;
    13641364        }
    13651365        if (! psImageWriteSection(fBiOut,0,0,0,NULL,index,"temp/fBiOut.fits") ) {
    1366             psError(__func__,"Can not write to temp/fBiOut.fits, so why continue!?");
     1366            psError(PS_ERR_UNKNOWN, true,"Can not write to temp/fBiOut.fits, so why continue!?");
    13671367            return 40;
    13681368        }
    13691369        if (! psImageWriteSection(sBiOut,0,0,0,NULL,index,"temp/sBiOut.fits") ) {
    1370             psError(__func__,"Can not write to temp/sBiOut.fits, so why continue!?");
     1370            psError(PS_ERR_UNKNOWN, true,"Can not write to temp/sBiOut.fits, so why continue!?");
    13711371            return 41;
    13721372        }
     
    13781378        sBiTruth = psImageReadSection(sBiTruth,0,0,0,0,0,NULL,index,"verified/sBiOut.fits");
    13791379        if (fTruth == NULL) {
    1380             psError(__func__,"verified psF32 image failed to be read (%d deg. rotation)",
     1380            psError(PS_ERR_UNKNOWN, true,"verified psF32 image failed to be read (%d deg. rotation)",
    13811381                    rot);
    13821382            fail = true;
    13831383        } else {
    13841384            if (fTruth->numRows != fOut->numRows || fTruth->numCols != fOut->numCols) {
    1385                 psError(__func__,"Rotated float image size did not match truth "
     1385                psError(PS_ERR_UNKNOWN, true,"Rotated float image size did not match truth "
    13861386                        "image for %d deg rotation (%dx%d vs %dx%d).",
    13871387                        rot,fOut->numCols,fOut->numRows,fTruth->numCols,fTruth->numRows);
     
    13931393                    for (psS32 col=0;col<fTruth->numCols;col++) {
    13941394                        if (fabsf(truthRow[col]-outRow[col]) > 1) {
    1395                             psError(__func__,"Float Image mismatch (%f vs %f) at %d,%d.",
     1395                            psError(PS_ERR_UNKNOWN, true,"Float Image mismatch (%f vs %f) at %d,%d.",
    13961396                                    outRow[col], truthRow[col],col,row);
    13971397                            fail = true;
     
    14031403
    14041404        if (sTruth == NULL) {
    1405             psError(__func__,"verified psS16 image failed to be read "
     1405            psError(PS_ERR_UNKNOWN, true,"verified psS16 image failed to be read "
    14061406                    "(%d deg. rotation)",rot);
    14071407            fail = true;
     
    14091409            if (sTruth->numRows != sOut->numRows ||
    14101410                    sTruth->numCols != sOut->numCols) {
    1411                 psError(__func__,"Rotated psS16 image size did not match truth "
     1411                psError(PS_ERR_UNKNOWN, true,"Rotated psS16 image size did not match truth "
    14121412                        "image for %d deg rotation.",rot);
    14131413                fail = true;
     
    14181418                    for (psS32 col=0;col<sTruth->numCols;col++) {
    14191419                        if (fabsf(truthRow[col]-outRow[col]) > 1) {
    1420                             psError(__func__,"Short Image mismatch (%d vs %d) "
     1420                            psError(PS_ERR_UNKNOWN, true,"Short Image mismatch (%d vs %d) "
    14211421                                    "at %d,%d.",
    14221422                                    outRow[col], truthRow[col],col,row);
     
    14301430
    14311431        if (fBiTruth == NULL) {
    1432             psError(__func__,"verified psF32 Bi image failed to be read (%d deg. rotation)",
     1432            psError(PS_ERR_UNKNOWN, true,"verified psF32 Bi image failed to be read (%d deg. rotation)",
    14331433                    rot);
    14341434            fail = true;
    14351435        } else {
    14361436            if (fBiTruth->numRows != fBiOut->numRows || fBiTruth->numCols != fBiOut->numCols) {
    1437                 psError(__func__,"Rotated float image size did not match truth "
     1437                psError(PS_ERR_UNKNOWN, true,"Rotated float image size did not match truth "
    14381438                        "image for %d deg rotation (%dx%d vs %dx%d). BILINEAR",
    14391439                        rot,fBiOut->numCols,fBiOut->numRows,fBiTruth->numCols,fBiTruth->numRows);
     
    14451445                    for (psS32 col=0;col<fBiTruth->numCols;col++) {
    14461446                        if (fabsf(truthRow[col]-outRow[col]) > 1) {
    1447                             psError(__func__,"Float Image mismatch (%f vs %f) at %d,%d. BILINEAR",
     1447                            psError(PS_ERR_UNKNOWN, true,"Float Image mismatch (%f vs %f) at %d,%d. BILINEAR",
    14481448                                    outRow[col], truthRow[col],col,row);
    14491449                            fail = true;
     
    14551455
    14561456        if (sBiTruth == NULL) {
    1457             psError(__func__,"verified psS16 image failed to be read "
     1457            psError(PS_ERR_UNKNOWN, true,"verified psS16 image failed to be read "
    14581458                    "(%d deg. rotation) BILINEAR",rot);
    14591459            fail = true;
     
    14611461            if (sBiTruth->numRows != sBiOut->numRows ||
    14621462                    sBiTruth->numCols != sBiOut->numCols) {
    1463                 psError(__func__,"Rotated psS16 image size did not match truth "
     1463                psError(PS_ERR_UNKNOWN, true,"Rotated psS16 image size did not match truth "
    14641464                        "image for %d deg rotation. BILINEAR",rot);
    14651465                fail = true;
     
    14701470                    for (psS32 col=0;col<sBiTruth->numCols;col++) {
    14711471                        if (fabsf(truthRow[col]-outRow[col]) > 1) {
    1472                             psError(__func__,"Short Image mismatch (%d vs %d) "
     1472                            psError(PS_ERR_UNKNOWN, true,"Short Image mismatch (%d vs %d) "
    14731473                                    "at %d,%d. BILINEAR",
    14741474                                    outRow[col], truthRow[col],col,row);
     
    14871487            s32Out = psImageRotate(s32Out,s32Img,rot,-1.0,PS_INTERPOLATE_FLAT);
    14881488            if( s32Out != NULL ) {
    1489                 psError(__func__,"psImage returned is not NULL for invalid image type.");
     1489                psError(PS_ERR_UNKNOWN, true,"psImage returned is not NULL for invalid image type.");
    14901490                return 5;
    14911491            }
     
    14961496
    14971497    if (fail) {
    1498         psError(__func__,"One or more images didn't match truth or truth did "
     1498        psError(PS_ERR_UNKNOWN, true,"One or more images didn't match truth or truth did "
    14991499                "not exist.");
    15001500        return 10;
     
    15071507    fOut = psImageRotate(fOut,NULL,0,0,PS_INTERPOLATE_FLAT);
    15081508    if (fOut != NULL) {
    1509         psError(__func__,"NULL wasn't returned though the input image was NULL.");
     1509        psError(PS_ERR_UNKNOWN, true,"NULL wasn't returned though the input image was NULL.");
    15101510        return 3;
    15111511    }
     
    15171517    fOut = psImageRotate(fOut, fImg, 33, 0, -1);
    15181518    if (fOut != NULL) {
    1519         psError(__func__,"NULL wasn't returned though the interpolation mode "
     1519        psError(PS_ERR_UNKNOWN, true,"NULL wasn't returned though the interpolation mode "
    15201520                "is invalid.");
    15211521        return 4;
     
    15981598
    15991599    if (fRecycle != fOut) {
    1600         psError(__func__,"psImageShift didn't recycle my image?");
     1600        psError(PS_ERR_UNKNOWN, true,"psImageShift didn't recycle my image?");
    16011601        return 10;
    16021602    }
     
    16091609    fOut = psImageShift(fOut,NULL,8,8,NAN,PS_INTERPOLATE_FLAT);
    16101610    if (fOut != NULL) {
    1611         psError(__func__,"psImageShift didn't return NULL given a NULL input image.");
     1611        psError(PS_ERR_UNKNOWN, true,"psImageShift didn't return NULL given a NULL input image.");
    16121612        return 11;
    16131613    }
     
    16181618    fOut = psImageShift(fOut,fImg,8,8,NAN,-1);
    16191619    if (fOut != NULL ) {
    1620         psError(__func__,"psImageShift didn't return NULL given an invalid interpolation mode.");
     1620        psError(PS_ERR_UNKNOWN, true,"psImageShift didn't return NULL given an invalid interpolation mode.");
    16211621        return 12;
    16221622    }
     
    16751675
    16761676            if (fabsf(fRow[col] - fValue) > FLT_EPSILON) {
    1677                 psError(__func__,"Float image not shifted correctly at %d,%d (%g vs %g)",
     1677                psError(PS_ERR_UNKNOWN, true,"Float image not shifted correctly at %d,%d (%g vs %g)",
    16781678                        col,row,fRow[col],fValue);
    16791679                return 1;
    16801680            }
    16811681            if (sRow[col] != sValue) {
    1682                 psError(__func__,"Short image not shifted correctly at %d,%d (%d vs %d)",
     1682                psError(PS_ERR_UNKNOWN, true,"Short image not shifted correctly at %d,%d (%d vs %d)",
    16831683                        col,row,sRow[col],sValue);
    16841684                return 2;
    16851685            }
    16861686            if (fabsf(fBiRow[col] - fBiValue) > FLT_EPSILON) {
    1687                 psError(__func__,"Float image not shifted correctly at %d,%d (%g vs %g)",
     1687                psError(PS_ERR_UNKNOWN, true,"Float image not shifted correctly at %d,%d (%g vs %g)",
    16881688                        col,row,fBiRow[col],fBiValue);
    16891689                return 1;
    16901690            }
    16911691            if (sBiRow[col] != sBiValue) {
    1692                 psError(__func__,"Short image not shifted correctly at %d,%d (%d vs %d)",
     1692                psError(PS_ERR_UNKNOWN, true,"Short image not shifted correctly at %d,%d (%d vs %d)",
    16931693                        col,row,sBiRow[col],sBiValue);
    16941694                return 2;
Note: See TracChangeset for help on using the changeset viewer.