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.

Location:
trunk/psLib/test/image
Files:
6 edited

Legend:

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

    r2204 r2273  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 00:57:33 $
     8 *  @version $Revision: 1.29 $ $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
     
    7171                    continue;
    7272                }
    73                 psError(__func__,"psImageAlloc returned NULL for type %x, size %dx%d.",
     73                psError(PS_ERR_UNKNOWN, true,"psImageAlloc returned NULL for type %x, size %dx%d.",
    7474                        type[t], numCols[i], numRows[i]);
    7575                psFree(image);
     
    7878
    7979            if (image->type.dimen != PS_DIMEN_IMAGE || image->type.type != type[t]) {
    80                 psError(__func__,"psImageAlloc allocated wrong dimen/type (%d/%d), should be "
     80                psError(PS_ERR_UNKNOWN, true,"psImageAlloc allocated wrong dimen/type (%d/%d), should be "
    8181                        "PS_IMAGE_DIMEN/%d", image->type.dimen, image->type.type, type[t]);
    8282                psFree(image);
     
    8585
    8686            if (image->numCols != numCols[i] || image->numRows != numRows[i]) {
    87                 psError(__func__,"psImageAlloc allocated wrong size %dx%d, should be %dx%d (type = %d)",
     87                psError(PS_ERR_UNKNOWN, true,"psImageAlloc allocated wrong size %dx%d, should be %dx%d (type = %d)",
    8888                        image->numCols, image->numRows, numCols[i], numRows[i],type[t]);
    8989                psFree(image);
     
    9292
    9393            if (image->col0 != 0 || image->row0 != 0) {
    94                 psError(__func__,"psImageAlloc returned row0/col0 of %d/%d.  Should be 0/0.",
     94                psError(PS_ERR_UNKNOWN, true,"psImageAlloc returned row0/col0 of %d/%d.  Should be 0/0.",
    9595                        image->row0, image->row0);
    9696                psFree(image);
     
    9999
    100100            if (image->parent != NULL) {
    101                 psError(__func__,"psImageAlloc returned non-NULL parent");
     101                psError(PS_ERR_UNKNOWN, true,"psImageAlloc returned non-NULL parent");
    102102                psFree(image);
    103103                return 5;
     
    105105
    106106            if (image->children != NULL) {
    107                 psError(__func__,"psImageAlloc returned non-NULL children array");
     107                psError(PS_ERR_UNKNOWN, true,"psImageAlloc returned non-NULL children array");
    108108                psFree(image);
    109109                return 7;
     
    123123                        for (psS32 c=0;c<cols;c++) {
    124124                            if (image->data.U16[r][c] != 2*c+r) {
    125                                 psError(__func__,"Could not set all pixels in uint16 image at (%d,%d)",c,r);
     125                                psError(PS_ERR_UNKNOWN, true,"Could not set all pixels in uint16 image at (%d,%d)",c,r);
    126126                                psFree(image);
    127127                                return 8;
     
    143143                        for (psS32 c=0;c<cols;c++) {
    144144                            if (fabsf(image->data.F32[r][c] - (2.0f*c+r)) > FLT_EPSILON) {
    145                                 psError(__func__,"Could not set all pixels in float image at (%d,%d)",c,r);
     145                                psError(PS_ERR_UNKNOWN, true,"Could not set all pixels in float image at (%d,%d)",c,r);
    146146                                psFree(image);
    147147                                return 8;
     
    163163                        for (psS32 c=0;c<cols;c++) {
    164164                            if (fabs(image->data.F64[r][c] - (2.0f*c+r)) > DBL_EPSILON) {
    165                                 psError(__func__,"Could not set all pixels in double image at (%d,%d)",c,r);
     165                                psError(PS_ERR_UNKNOWN, true,"Could not set all pixels in double image at (%d,%d)",c,r);
    166166                                psFree(image);
    167167                                return 8;
     
    184184                            if (fabsf(crealf(image->data.C32[r][c]) - r) > FLT_EPSILON ||
    185185                                    fabsf(cimagf(image->data.C32[r][c]) - c) > FLT_EPSILON ) {
    186                                 psError(__func__,"Could not set all pixels in complex image at (%d,%d)",c,r);
     186                                psError(PS_ERR_UNKNOWN, true,"Could not set all pixels in complex image at (%d,%d)",c,r);
    187187                                psFree(image);
    188188                                return 8;
     
    205205                        for (psS32 c=0;c<cols;c++) {
    206206                            if (image->data.PTR[r][c] != temp) {
    207                                 psError(__func__, "Could not set pixel in pointer image at (%d,%d): %x %x",
     207                                psError(PS_ERR_UNKNOWN, true, "Could not set pixel in pointer image at (%d,%d): %x %x",
    208208                                        c,r,image->data.PTR[r][c],temp);
    209209                                psFree(image);
     
    229229                        for (psS32 c=0;c<cols;c++) {
    230230                            if (image->data.U8[r][c] != (uint8_t)(r + c)) {
    231                                 psError(__func__,"Could not set all pixels in image (type=%d) at (%d,%d)",
     231                                psError(PS_ERR_UNKNOWN, true,"Could not set all pixels in image (type=%d) at (%d,%d)",
    232232                                        type[t],c,r);
    233233                                psFree(image);
     
    281281    // Verify the returned psImage structure pointer is equal to the input parameter output.
    282282    if (img2 != img3) {
    283         psError(__func__,"the image given for recycled wasn't");
     283        psError(PS_ERR_UNKNOWN, true,"the image given for recycled wasn't");
    284284        return 1;
    285285    }
     
    289289    img4 = psImageCopy(NULL,img,PS_TYPE_F32);
    290290    if (img4 == NULL) {
    291         psError(__func__,"output image doesn't exist");
     291        psError(PS_ERR_UNKNOWN, true,"output image doesn't exist");
    292292        return 4;
    293293    }
    294294    if (img4->type.type != img->type.type) {
    295         psError(__func__,"output image is not the same type as input image");
     295        psError(PS_ERR_UNKNOWN, true,"output image is not the same type as input image");
    296296        return 4;
    297297    }
     
    301301        for (unsigned col=0;col<c;col++) {
    302302            if( imgInRow[col] != imgOutRow[col] ) {
    303                 psError(__func__,"Input image not equal to output image at %d,%d!",
     303                psError(PS_ERR_UNKNOWN, true,"Input image not equal to output image at %d,%d!",
    304304                        col, row);
    305305                return 4;
     
    321321    img2 = psImageCopy(img2,img,PS_TYPE_##OUT); \
    322322    if (img2 == NULL) { \
    323         psError(__func__,"psImageCopy failed to copy U8."); \
     323        psError(PS_ERR_UNKNOWN, true,"psImageCopy failed to copy U8."); \
    324324        return 2; \
    325325    } \
     
    329329        for (psU32 col=0;col<c;col++) { \
    330330            if (abs(imgRow[col] - (ps##IN)(row+col)) > 0.5) { \
    331                 psError(__func__,"Input image was changed at %d,%d!", \
     331                psError(PS_ERR_UNKNOWN, true,"Input image was changed at %d,%d!", \
    332332                        col,row); \
    333333                return 2; \
    334334            } \
    335335            if (abs(img2Row[col] - (ps##OUT)(imgRow[col])) > 0.5) { \
    336                 psError(__func__,"returned psImage values after copy don't match at %d,%d " \
     336                psError(PS_ERR_UNKNOWN, true,"returned psImage values after copy don't match at %d,%d " \
    337337                        "(%d vs %d)",\
    338338                        col,row,img2Row[col], (ps##OUT)(imgRow[col])); \
     
    382382    img3 = psImageCopy(NULL,NULL,PS_TYPE_F32);
    383383    if (img3 != NULL) {
    384         psError(__func__,"psImageCopy didn't return NULL when input image was NULL.");
     384        psError(PS_ERR_UNKNOWN, true,"psImageCopy didn't return NULL when input image was NULL.");
    385385        return 3;
    386386    }
  • trunk/psLib/test/image/tst_psImageConvolve.c

    r2204 r2273  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2004-10-27 00:57:33 $
     7 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2004-11-04 01:05:00 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5252
    5353        if (k == NULL) {
    54             psError(__func__,"psKernelAlloc returned NULL for [%d:%d,%d:%d].",
     54            psError(PS_ERR_UNKNOWN, true,"psKernelAlloc returned NULL for [%d:%d,%d:%d].",
    5555                    xMin[i], xMax[i], yMin[i], yMax[i]);
    5656            return i*10+1;
     
    5959        if (k->xMin != xMin[i] || k->xMax != xMax[i] ||
    6060                k->yMin != yMin[i] || k->yMax != yMax[i]) {
    61             psError(__func__,"Min/max members, [%d:%d,%d:%d], of psKernel wrong. Should be [%d:%d,%d:%d].",
     61            psError(PS_ERR_UNKNOWN, true,"Min/max members, [%d:%d,%d:%d], of psKernel wrong. Should be [%d:%d,%d:%d].",
    6262                    k->xMin,k->xMax, k->yMin, k->yMax,
    6363                    xMin[i], xMax[i], yMin[i], yMax[i]);
     
    6767        if (k->image->numCols != xMax[i]-xMin[i]+1 ||
    6868                k->image->numRows != yMax[i]-yMin[i]+1) {
    69             psError(__func__,"Size of the kernel image is wrong (%dx%d vs %dx%d).",
     69            psError(PS_ERR_UNKNOWN, true,"Size of the kernel image is wrong (%dx%d vs %dx%d).",
    7070                    xMax[i]-xMin[i]+1, yMax[i]-yMin[i]+1,
    7171                    k->image->numCols, k->image->numRows);
     
    7575        for (psS32 j=yMin[i]; j<yMax[i]; j++) {
    7676            if (k->kernel[j]+xMin[i] != k->image->data.PS_TYPE_KERNEL_DATA[j-yMin[i]]) {
    77                 psError(__func__,"The kernel pointer was set wrong for row %d.",
     77                psError(PS_ERR_UNKNOWN, true,"The kernel pointer was set wrong for row %d.",
    7878                        j);
    7979                return i*10+4;
     
    8787    k = psKernelAlloc(5, -5, -2, 2);
    8888    if (k == NULL) {
    89         psError(__func__,"psKernelAlloc returned NULL for xMin > xMax.");
     89        psError(PS_ERR_UNKNOWN, true,"psKernelAlloc returned NULL for xMin > xMax.");
    9090        return i*10+5;
    9191    }
    9292
    9393    if (k->xMin != -5 || k->xMax != 5) {
    94         psError(__func__,"psKernelAlloc didn't swap xMin & xMax.");
     94        psError(PS_ERR_UNKNOWN, true,"psKernelAlloc didn't swap xMin & xMax.");
    9595        return i*10+6;
    9696    }
     
    101101    k = psKernelAlloc(-2, 2, 5, -5);
    102102    if (k == NULL) {
    103         psError(__func__,"psKernelAlloc returned NULL for yMin > yMax.");
     103        psError(PS_ERR_UNKNOWN, true,"psKernelAlloc returned NULL for yMin > yMax.");
    104104        return i*10+7;
    105105    }
    106106
    107107    if (k->yMin != -5 || k->yMax != 5) {
    108         psError(__func__,"psKernelAlloc didn't swap yMin & yMax.");
     108        psError(PS_ERR_UNKNOWN, true,"psKernelAlloc didn't swap yMin & yMax.");
    109109        return i*10+8;
    110110    }
     
    136136
    137137    if (result == NULL) {
    138         psError(__func__,"psKernelGenerate returned NULL.");
     138        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned NULL.");
    139139        return 1;
    140140    }
     
    142142    if (result->xMin != -1 || result->xMax != 1 ||
    143143            result->yMin != -2 || result->yMax != 2) {
    144         psError(__func__,"psKernelGenerate result had a range of [%d:%d,%d:%d].  Suppose to be [0:1,1:2].",
     144        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result had a range of [%d:%d,%d:%d].  Suppose to be [0:1,1:2].",
    145145                result->xMin, result->xMax, result->yMin, result->yMax);
    146146        return 2;
     
    154154    }
    155155    if (fabsf(1.0 - sum) > FLT_EPSILON) {
    156         psError(__func__,"psKernelGenerate result is not normalized (sum=%g).",
     156        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result is not normalized (sum=%g).",
    157157                sum);
    158158
     
    166166            fabsf(result->kernel[-1][ 0] - 2.0/10.0) > FLT_EPSILON ||
    167167            fabsf(result->kernel[-2][-1] - 0.0/10.0) > FLT_EPSILON) {
    168         psError(__func__,"psKernelGenerate result values, %g,%g;%g,%g, are wrong. Suppose to be 2,6;1,0.",
     168        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result values, %g,%g;%g,%g, are wrong. Suppose to be 2,6;1,0.",
    169169                result->kernel[-1][0], result->kernel[1][1],
    170170                result->kernel[2][0], result->kernel[-2][-1]);
     
    191191
    192192    if (result == NULL) {
    193         psError(__func__,"psKernelGenerate returned NULL.");
     193        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned NULL.");
    194194        return 5;
    195195    }
     
    197197    if (result->xMin != 0 || result->xMax != 1 ||
    198198            result->yMin != 0 || result->yMax != 3) {
    199         psError(__func__,"psKernelGenerate result had a range of [%d:%d,%d:%d].  Suppose to be [0:1,1:2].",
     199        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result had a range of [%d:%d,%d:%d].  Suppose to be [0:1,1:2].",
    200200                result->xMin, result->xMax, result->yMin, result->yMax);
    201201        return 6;
     
    209209    }
    210210    if (fabsf(1.0 - sum) > FLT_EPSILON) {
    211         psError(__func__,"psKernelGenerate result is not normalized (sum=%g).",
     211        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result is not normalized (sum=%g).",
    212212                sum);
    213213
     
    220220            fabsf(result->kernel[3][1] - 8.0/21.0) > FLT_EPSILON ||
    221221            fabsf(result->kernel[2][1] - 10.0/21.0) > FLT_EPSILON) {
    222         psError(__func__,"psKernelGenerate result values, %g,%g;%g,%g, are wrong. Suppose to be 2,6;1,0.",
     222        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result values, %g,%g;%g,%g, are wrong. Suppose to be 2,6;1,0.",
    223223                result->kernel[1][0], result->kernel[1][1],
    224224                result->kernel[2][0], result->kernel[2][1]);
     
    246246    result = psKernelGenerate(tVec, xVec, yVec, false);
    247247    if (result == NULL) {
    248         psError(__func__,"psKernelGenerate returned NULL.");
     248        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned NULL.");
    249249        return 9;
    250250    }
     
    254254            fabsf(result->kernel[ 1][ 1] - 6.0/8.0) > FLT_EPSILON ||
    255255            fabsf(result->kernel[ 0][ 0] - 1.0/8.0) > FLT_EPSILON) {
    256         psError(__func__,"psKernelGenerate result values wrong for truncated time vector.");
     256        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result values wrong for truncated time vector.");
    257257
    258258        return 10;
     
    264264    result = psKernelGenerate(NULL, xVec, yVec, true);
    265265    if (result != NULL) {
    266         psError(__func__,"psKernelGenerate returned a kernel with no time vector.");
     266        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned a kernel with no time vector.");
    267267        return 11;
    268268    }
     
    271271    result = psKernelGenerate(tVec, NULL, yVec, true);
    272272    if (result != NULL) {
    273         psError(__func__,"psKernelGenerate returned a kernel with no x vector.");
     273        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned a kernel with no x vector.");
    274274        return 11;
    275275    }
     
    278278    result = psKernelGenerate(tVec, xVec, NULL, true);
    279279    if (result != NULL) {
    280         psError(__func__,"psKernelGenerate returned a kernel with no y vector.");
     280        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned a kernel with no y vector.");
    281281        return 11;
    282282    }
     
    336336 
    337337    if (out == NULL) {
    338         psError(__func__, "psImageConvolve returned a NULL for direct gaussian case.");
     338        psError(PS_ERR_UNKNOWN, true, "psImageConvolve returned a NULL for direct gaussian case.");
    339339        return 1;
    340340    }
    341341 
    342342    if (out->numCols != c || out->numRows != r) {
    343         psError(__func__, "psImageConvolve result image is %dx%d, but expected %dx%d.",
     343        psError(PS_ERR_UNKNOWN, true, "psImageConvolve result image is %dx%d, but expected %dx%d.",
    344344                out->numCols, out->numRows,
    345345                c,r);
     
    350350        char* typeStr;
    351351        PS_TYPE_NAME(typeStr,out->type.type);
    352         psError(__func__, "psImageConvolve result image is of type %s, not psF32.",
     352        psError(PS_ERR_UNKNOWN, true, "psImageConvolve result image is of type %s, not psF32.",
    353353                typeStr);
    354354        return 3;
     
    359359        for (psS32 j=-1;j<1;j++) {
    360360            if (fabsf(out->data.F32[r/2+i][c/2+j] - g->kernel[i][j]) > 0.0001) {
    361                 psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
     361                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
    362362                        c/2+j,r/2+i,
    363363                        out->data.F32[r/2+i][c/2+j], g->kernel[i][j]);
     
    365365            }
    366366            if (i >= 0 && j >= 0 && fabsf(out->data.F32[i][j] - g->kernel[i][j]) > 0.0001) {
    367                 psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
     367                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
    368368                        j,i,
    369369                        out->data.F32[i][j], g->kernel[i][j]);
     
    371371            }
    372372            if (i <= 0 && fabsf(out->data.F32[r-1+i][c/2+j] - g->kernel[i][j]) > 0.0001) {
    373                 psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
     373                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
    374374                        c/2+j,r-1+i,
    375375                        out->data.F32[r-1+i][c/2+j], g->kernel[i][j]);
     
    397397 
    398398    if (out == NULL) {
    399         psError(__func__, "psImageConvolve returned a NULL for gaussian case.");
     399        psError(PS_ERR_UNKNOWN, true, "psImageConvolve returned a NULL for gaussian case.");
    400400        return 10;
    401401    }
    402402 
    403403    if (out != out2) {
    404         psError(__func__, "psImageConvolve didn't recycle the supplied out image struct.");
     404        psError(PS_ERR_UNKNOWN, true, "psImageConvolve didn't recycle the supplied out image struct.");
    405405        return 11;
    406406    }
    407407 
    408408    if (out->numCols != c || out->numRows != r) {
    409         psError(__func__, "psImageConvolve result image is %dx%d, but expected %dx%d.",
     409        psError(PS_ERR_UNKNOWN, true, "psImageConvolve result image is %dx%d, but expected %dx%d.",
    410410                out->numCols, out->numRows,
    411411                c,r);
     
    416416        char* typeStr;
    417417        PS_TYPE_NAME(typeStr,out->type.type);
    418         psError(__func__, "psImageConvolve result image is of type %s, not psF32.",
     418        psError(PS_ERR_UNKNOWN, true, "psImageConvolve result image is of type %s, not psF32.",
    419419                typeStr);
    420420        return 13;
     
    426426        for (psS32 j=-1;j<1;j++) {
    427427            if (fabsf(out->data.F32[r/2+i][c/2+j] - g->kernel[i][j]) > 0.0001) {
    428                 psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
     428                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
    429429                        c/2+j,r/2+i,
    430430                        out->data.F32[r/2+i][c/2+j], g->kernel[i][j]);
     
    433433            }
    434434            if (i >= 0 && j >= 0 && fabsf(out->data.F32[i][j] - g->kernel[i][j]) > 0.0001) {
    435                 psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
     435                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
    436436                        j,i,
    437437                        out->data.F32[i][j], g->kernel[i][j]);
     
    439439            }
    440440            if (i <= 0 && fabsf(out->data.F32[r-1+i][c/2+j] - g->kernel[i][j]) > 0.0001) {
    441                 psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
     441                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
    442442                        c/2+j,r-1+i,
    443443                        out->data.F32[r-1+i][c/2+j], g->kernel[i][j]);
  • trunk/psLib/test/image/tst_psImageExtraction.c

    r2204 r2273  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2004-10-27 00:57:33 $
     8*  @version $Revision: 1.19 $ $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
     
    8787    \
    8888    if (out->n != TRUTH_SIZE) { \
    89         psError(__func__,"Number of results is wrong (%d, not %d)", \
     89        psError(PS_ERR_UNKNOWN,true,"Number of results is wrong (%d, not %d)", \
    9090                out->n,n); \
    9191        return TESTNUM*4+1; \
     
    9393    \
    9494    if (positions->n != TRUTH_SIZE) { \
    95         psError(__func__,"Number of results for positions vector is wrong (%d, not %d)", \
     95        psError(PS_ERR_UNKNOWN,true,"Number of results for positions vector is wrong (%d, not %d)", \
    9696                out->n,n); \
    9797        return TESTNUM*4+2; \
     
    100100    for (psS32 i=0;i<out->n;i++) { \
    101101        if (fabs(out->data.F64[i]-image->data.TYPE[r/10+TRUTHPIX_Y][c/10+TRUTHPIX_X]) > 1.0/(psF64)r) { \
    102             psError(__func__,"Improper result at position %d.  Got %g, expected %g",i, \
     102            psError(PS_ERR_UNKNOWN,true,"Improper result at position %d.  Got %g, expected %g",i, \
    103103                    out->data.F64[i],image->data.TYPE[r/10+TRUTHPIX_Y][c/10+TRUTHPIX_X]); \
    104104            return TESTNUM*4+3; \
     
    106106        if (DIRECTION == PS_CUT_X_POS || DIRECTION == PS_CUT_X_NEG) { \
    107107            if (positions->data.U32[i] != c/10+TRUTHPIX_X) { \
    108                 psError(__func__,"Improper positions (%d vs %d) result @ %d.", \
     108                psError(PS_ERR_UNKNOWN,true,"Improper positions (%d vs %d) result @ %d.", \
    109109                        positions->data.U32[i],c/10+TRUTHPIX_X,i); \
    110110                return TESTNUM*4+4; \
     
    112112        } else { \
    113113            if (positions->data.U32[i] != r/10+TRUTHPIX_Y) { \
    114                 psError(__func__,"Improper positions (%d vs %d) result @ %d.", \
     114                psError(PS_ERR_UNKNOWN,true,"Improper positions (%d vs %d) result @ %d.", \
    115115                        positions->data.U32[i],r/10+TRUTHPIX_Y,i); \
    116116                return TESTNUM*4+4; \
     
    165165                        stat );
    166166    if ( out != NULL ) {
    167         psError( __func__, "Giving a NULL image, psImageSlice didn't return NULL as expected" );
     167        psError( PS_ERR_UNKNOWN,true, "Giving a NULL image, psImageSlice didn't return NULL as expected" );
    168168        return 101;
    169169    }
     
    184184                        NULL );
    185185    if ( out != NULL ) {
    186         psError( __func__, "Giving a NULL stat struct, psImageSlice didn't return NULL as expected" );
     186        psError( PS_ERR_UNKNOWN,true, "Giving a NULL stat struct, psImageSlice didn't return NULL as expected" );
    187187        return 102;
    188188    }
     
    202202                        stat);
    203203    if ( out != NULL ) {
    204         psError( __func__, "Giving a bogus direction flag, psImageSlice didn't return NULL as expected" );
     204        psError( PS_ERR_UNKNOWN,true, "Giving a bogus direction flag, psImageSlice didn't return NULL as expected" );
    205205        return 103;
    206206    }
     
    220220                        stat );
    221221    if ( out != NULL ) {
    222         psError( __func__, "Giving a 0x0 region, psImageSlice didn't return NULL as expected" );
     222        psError( PS_ERR_UNKNOWN,true, "Giving a 0x0 region, psImageSlice didn't return NULL as expected" );
    223223        return 104;
    224224    }
     
    238238                        stat );
    239239    if ( out != NULL ) {
    240         psError( __func__, "Giving an invalid x position, psImageSlice didn't return NULL as expected" );
     240        psError( PS_ERR_UNKNOWN,true, "Giving an invalid x position, psImageSlice didn't return NULL as expected" );
    241241        return 105;
    242242    }
     
    251251                        stat );
    252252    if ( out != NULL ) {
    253         psError( __func__, "Giving an invalid y position, psImageSlice didn't return NULL as expected" );
     253        psError( PS_ERR_UNKNOWN,true, "Giving an invalid y position, psImageSlice didn't return NULL as expected" );
    254254        return 106;
    255255    }
     
    264264                        stat);
    265265    if ( out != NULL ) {
    266         psError( __func__, "Giving an invalid numCols, psImageSlice didn't return NULL as expected" );
     266        psError( PS_ERR_UNKNOWN,true, "Giving an invalid numCols, psImageSlice didn't return NULL as expected" );
    267267        return 107;
    268268    }
     
    277277                        stat);
    278278    if ( out != NULL ) {
    279         psError( __func__, "Giving an invalid numRows, psImageSlice didn't return NULL as expected" );
     279        psError( PS_ERR_UNKNOWN,true, "Giving an invalid numRows, psImageSlice didn't return NULL as expected" );
    280280        return 108;
    281281    }
     
    296296                        stat);
    297297    if ( out != NULL ) {
    298         psError( __func__, "Giving an invalid numRows, psImageSlice didn't return NULL as expected" );
     298        psError( PS_ERR_UNKNOWN,true, "Giving an invalid numRows, psImageSlice didn't return NULL as expected" );
    299299        return 109;
    300300    }
     
    314314                        stat);
    315315    if ( out != NULL ) {
    316         psError( __func__, "Mask size different than image size didn't return NULL as expected" );
     316        psError( PS_ERR_UNKNOWN,true, "Mask size different than image size didn't return NULL as expected" );
    317317        return 110;
    318318    }
     
    330330                         stat);
    331331    if ( out != NULL ) {
    332         psError( __func__, "Mask invalid type didn't return NULL as expected.");
     332        psError( PS_ERR_UNKNOWN,true, "Mask invalid type didn't return NULL as expected.");
    333333        return 111;
    334334    }
     
    345345                        stat);
    346346    if ( out != NULL ) {
    347         psError( __func__, "Input image with invalid type didn't return NULL as expected.");
     347        psError( PS_ERR_UNKNOWN,true, "Input image with invalid type didn't return NULL as expected.");
    348348        return 112;
    349349    }
     
    390390
    391391    if (subset2->numCols != c/2 || subset2->numRows != r/2) {
    392         psError(__func__,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
     392        psError(PS_ERR_UNKNOWN,true,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
    393393                subset2->numCols, subset2->numRows, c/2,r/2);
    394394        return 1;
     
    396396
    397397    if (subset3->numCols != c/2 || subset3->numRows != r/2) {
    398         psError(__func__,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
     398        psError(PS_ERR_UNKNOWN,true,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
    399399                subset3->numCols, subset3->numRows, c/2,r/2);
    400400        return 2;
     
    407407        for (psS32 col=0;col<c/2;col++) {
    408408            if (subset2->data.U32[row][col] != original->data.U32[row+r/4][col+c/4]) {
    409                 psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
     409                psError(PS_ERR_UNKNOWN,true,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
    410410                        row,col,subset2->data.U32[row][col], original->data.U32[row+r/4][col+c/4]);
    411411                return 3;
    412412            }
    413413            if (subset3->data.U32[row][col] != original->data.U32[row][col]) {
    414                 psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
     414                psError(PS_ERR_UNKNOWN,true,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
    415415                        row,col,subset2->data.U32[row][col], original->data.U32[row][col]);
    416416                return 4;
     
    423423
    424424    if (subset2->type.type != PS_TYPE_U32) {
    425         psError(__func__,"psImageSubset output type was not proper(%d, should be %d).",
     425        psError(PS_ERR_UNKNOWN,true,"psImageSubset output type was not proper(%d, should be %d).",
    426426                subset2->type.type, PS_TYPE_U32);
    427427        return 6;
    428428    }
    429429    if (subset3->type.type != PS_TYPE_U32) {
    430         psError(__func__,"psImageSubset output type was not proper(%d, should be %d).",
     430        psError(PS_ERR_UNKNOWN,true,"psImageSubset output type was not proper(%d, should be %d).",
    431431                subset3->type.type, PS_TYPE_U32);
    432432        return 7;
     
    437437
    438438    if (subset2->col0 != c/4 || subset2->row0 != r/4) {
    439         psError(__func__,"psImageSubset didn't set col0/row0 for subset2 (%d/%d, should be %d/%d).",
     439        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't set col0/row0 for subset2 (%d/%d, should be %d/%d).",
    440440                subset2->col0,subset2->row0,c/4,r/4);
    441441        return 8;
    442442    }
    443443    if (subset3->col0 != 0 || subset3->row0 != 0) {
    444         psError(__func__,"psImageSubset didn't set col0/row0 for subset3 (%d/%d, should be %d/%d).",
     444        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't set col0/row0 for subset3 (%d/%d, should be %d/%d).",
    445445                subset3->col0,subset3->row0,0,0);
    446446        return 9;
     
    451451
    452452    if (subset2->parent != original || subset3->parent != original) {
    453         psError(__func__,"psImageSubset didn't set parent.");
     453        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't set parent.");
    454454        return 10;
    455455    }
     
    458458
    459459    if (subset2->children != NULL || subset3->children != NULL) {
    460         psError(__func__,"psImageSubset didn't set children to NULL.");
     460        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't set children to NULL.");
    461461        return 11;
    462462    }
     
    467467
    468468    if (original->children == NULL || original->children->n != 2) {
    469         psError(__func__,"psImageSubset didn't increment number of children by one per subset.");
     469        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't increment number of children by one per subset.");
    470470        return 12;
    471471    }
    472472    if (original->children->data[0] != subset2 || original->children->data[1] != subset3) {
    473         psError(__func__,"psImageSubset didn't properly store the children pointers.");
     473        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't properly store the children pointers.");
    474474        return 13;
    475475    }
     
    482482    subset1 = psImageSubset(NULL,0,0,c/2,r/2);
    483483    if (subset1 != NULL) {
    484         psError(__func__,"psImageSubset didn't return NULL when input image was NULL.");
     484        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when input image was NULL.");
    485485        return 14;
    486486    }
     
    494494    subset1 = psImageSubset(original,0,r/2,c/2,r/2);
    495495    if (subset1 != NULL) {
    496         psError(__func__,"psImageSubset didn't return NULL when numRows=0.");
     496        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when numRows=0.");
    497497        return 15;
    498498    }
     
    500500    subset1 = psImageSubset(original,c/2,0,c/2,r/2);
    501501    if (subset1 != NULL) {
    502         psError(__func__,"psImageSubset didn't return NULL when numCols=0.");
     502        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when numCols=0.");
    503503        return 16;
    504504    }
    505505    if (memcmp(original,&preSubsetStruct,sizeof(psImage)) != 0) {
    506         psError(__func__,"psImageSubset changed the original struct though it failed to subset.");
     506        psError(PS_ERR_UNKNOWN,true,"psImageSubset changed the original struct though it failed to subset.");
    507507        return 17;
    508508    }
     
    516516    subset1 = psImageSubset(original,0,0,c/2,r*2);
    517517    if (subset1 != NULL) {
    518         psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
     518        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset origin was outside of "
    519519                "image (via cols).");
    520520        return 18;
     
    523523    subset1 = psImageSubset(original,0,0,c*2,r/2);
    524524    if (subset1 != NULL) {
    525         psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
     525        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset origin was outside of "
    526526                "image (via rows).");
    527527        return 19;
     
    530530    subset1 = psImageSubset(original,-1,0,c/2,r/2);
    531531    if (subset1 != NULL) {
    532         psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
     532        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset origin was outside of "
    533533                "image (col0=-1).");
    534534        return 20;
     
    537537    subset1 = psImageSubset(original,0,-1,c/2,r/2);
    538538    if (subset1 != NULL) {
    539         psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
     539        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset origin was outside of "
    540540                "image (row0=-1).");
    541541        return 21;
     
    550550    subset1 = psImageSubset(original,0,0,c/2,r+1);
    551551    if (subset1 != NULL) {
    552         psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via rows).");
     552        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset was outside of image (via rows).");
    553553        return 22;
    554554    }
     
    556556    subset1 = psImageSubset(original,0,0,c+1,r/2);
    557557    if (subset1 != NULL) {
    558         psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via cols).");
     558        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset was outside of image (via cols).");
    559559        return 23;
    560560    }
     
    562562    subset1 = psImageSubset(original,0,0,c+1,r+1);
    563563    if (subset1 != NULL) {
    564         psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via row+cols).");
     564        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset was outside of image (via row+cols).");
    565565        return 24;
    566566    }
     
    575575    // Verify the returned psImage structure member Nchildren is set to zero.
    576576    if (original->children != NULL && original->children->n > 0) {
    577         psError(__func__,"psImageFreeChildren didn't set number of children to zero.");
     577        psError(PS_ERR_UNKNOWN,true,"psImageFreeChildren didn't set number of children to zero.");
    578578        return 25;
    579579    }
     
    586586            preSubsetStruct.col0 != original->col0) {
    587587
    588         psError(__func__,"psImageFreeChildren modified parent's non-children elements.");
     588        psError(PS_ERR_UNKNOWN,true,"psImageFreeChildren modified parent's non-children elements.");
    589589        return 27;
    590590    }
     
    626626
    627627        if (subset == NULL) {
    628             psError(__func__,"psImageSubsection returned a NULL with a subset of %s.",
     628            psError(PS_ERR_UNKNOWN,true,"psImageSubsection returned a NULL with a subset of %s.",
    629629                    sectionStr);
    630630            return 10*i+1;
     
    632632
    633633        if (subset->type.type != PS_TYPE_U32) {
    634             psError(__func__,"psImageSubsection output type was not proper(%d, should be %d).",
     634            psError(PS_ERR_UNKNOWN,true,"psImageSubsection output type was not proper(%d, should be %d).",
    635635                    subset->type.type, PS_TYPE_U32);
    636636            return 10*i+2;
     
    638638
    639639        if (subset->col0 != x1[i] || subset->row0 != y1[i]) {
    640             psError(__func__,"psImageSubsection didn't set properly col0/row0 (%d/%d, should be %d/%d).",
     640            psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't set properly col0/row0 (%d/%d, should be %d/%d).",
    641641                    subset->col0,subset->row0,x1[i],y1[i]);
    642642            return 10*i+3;
     
    644644
    645645        if (subset->parent != original) {
    646             psError(__func__,"psImageSubsection didn't set parent.");
     646            psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't set parent.");
    647647            return 10*i+4;
    648648        }
    649649
    650650        if (subset->children != NULL) {
    651             psError(__func__,"psImageSubsection didn't set children to NULL.");
     651            psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't set children to NULL.");
    652652            return 10*i+5;
    653653        }
    654654
    655655        if (original->children == NULL || original->children->n != i+1) {
    656             psError(__func__,"psImageSubsection didn't increment number of children by one per subset.");
     656            psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't increment number of children by one per subset.");
    657657            return 10*i+6;
    658658        }
     
    660660
    661661        if (original->children->data[i] != subset) {
    662             psError(__func__,"psImageSubsection didn't properly store the children pointer.");
     662            psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't properly store the children pointer.");
    663663            return 10*i+7;
    664664        }
     
    667667        psS32 numRows = y2[i]-y1[i]+1;
    668668        if (subset->numCols != numCols || subset->numRows != numRows) {
    669             psError(__func__,"psImageSubsection output size was not proper(%dx%d, should be %dx%d).",
     669            psError(PS_ERR_UNKNOWN,true,"psImageSubsection output size was not proper(%dx%d, should be %dx%d).",
    670670                    subset->numCols, subset->numRows, numCols, numRows);
    671671            return 10*i+8;
     
    675675            for (psS32 col=0;col<numCols;col++) {
    676676                if (subset->data.U32[row][col] != original->data.U32[row+y1[i]][col+x1[i]]) {
    677                     psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
     677                    psError(PS_ERR_UNKNOWN,true,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
    678678                            row,col,subset->data.U32[row][col], original->data.U32[row+y1[i]][col+x1[i]]);
    679679                    return 10*i+9;
     
    686686    subset = psImageSubsection(original,"[64:32,32:64]");
    687687    if (subset != NULL) {
    688         psError(__func__,"psImageSubsection didn't return NULL when x1 > x2.");
     688        psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't return NULL when x1 > x2.");
    689689        return 10*i+10;
    690690    }
     
    693693    subset = psImageSubsection(original,"[32:64,64:32]");
    694694    if (subset != NULL) {
    695         psError(__func__,"psImageSubsection didn't return NULL when y1 > y2.");
     695        psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't return NULL when y1 > y2.");
    696696        return 10*i+11;
    697697    }
     
    700700    subset = psImageSubsection(original,"[64:256,32:64]"); // assumes c<256
    701701    if (subset != NULL) {
    702         psError(__func__,"psImageSubsection didn't return NULL when x2 > c.");
     702        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when x2 > c.");
    703703        return 10*i+12;
    704704    }
     
    707707    subset = psImageSubsection(original,"[32:64,64:256]"); // assumes r==256
    708708    if (subset != NULL) {
    709         psError(__func__,"psImageSubsection didn't return NULL when y2 > r.");
     709        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when y2 > r.");
    710710        return 10*i+13;
    711711    }
     
    714714    subset = psImageSubsection(original,"32:64,32:64");
    715715    if (subset != NULL) {
    716         psError(__func__,"psImageSubsection didn't return NULL when subsection was '32:64,32:64'.");
     716        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when subsection was '32:64,32:64'.");
    717717        return 10*i+14;
    718718    }
     
    721721    subset = psImageSubsection(original,"[32-64,32-64]");
    722722    if (subset != NULL) {
    723         psError(__func__,"psImageSubsection didn't return NULL when subsection was '[32-64,32-64]'.");
     723        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when subsection was '[32-64,32-64]'.");
    724724        return 10*i+15;
    725725    }
     
    728728    subset = psImageSubsection(original,"[32:64,32]");
    729729    if (subset != NULL) {
    730         psError(__func__,"psImageSubsection didn't return NULL when subsection was '[32:64,32]'.");
     730        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when subsection was '[32:64,32]'.");
    731731        return 10*i+16;
    732732    }
     
    735735    subset = psImageSubsection(NULL,"[32:64,32:64]");
    736736    if (subset != NULL) {
    737         psError(__func__,"psImageSubsection didn't return NULL when image was NULL.");
     737        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when image was NULL.");
    738738        return 10*i+17;
    739739    }
     
    742742    subset = psImageSubsection(original,NULL);
    743743    if (subset != NULL) {
    744         psError(__func__,"psImageSubsection didn't return NULL when subsection was NULL.");
     744        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when subsection was NULL.");
    745745        return 10*i+18;
    746746    }
  • trunk/psLib/test/image/tst_psImageFFT.c

    r2204 r2273  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 00:57:33 $
     8 *  @version $Revision: 1.13 $ $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
     
    8585    img2 = psImageFFT(img2,img,PS_FFT_FORWARD);
    8686    if (img2->type.type != PS_TYPE_C32) {
    87         psError(__func__,"FFT didn't produce complex values?");
     87        psError(PS_ERR_UNKNOWN, true,"FFT didn't produce complex values?");
    8888        return 1;
    8989    }
    9090    if (img2->numCols != m || img2->numRows != n) {
    91         psError(__func__,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
     91        psError(PS_ERR_UNKNOWN, true,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
    9292                img2->numCols,img2->numRows,m,n);
    9393        return 2;
     
    103103                if (! (col == 0 && (row == 1 || row == n-1))
    104104                        && ! (row == 0 && (col==1 || col == n-1)) ) {
    105                     psError(__func__,"Result invalid at %d,%d (%.2f)",col,row,mag);
     105                    psError(PS_ERR_UNKNOWN, true,"Result invalid at %d,%d (%.2f)",col,row,mag);
    106106                    return 3;
    107107                }
     
    109109                if ( (col == 0 && (row == 1 || row == n-1))
    110110                        || (row == 0 && (col==1 || col == n-1)) ) {
    111                     psError(__func__,"Result invalid at %d,%d (%.2f)",col,row,mag);
     111                    psError(PS_ERR_UNKNOWN, true,"Result invalid at %d,%d (%.2f)",col,row,mag);
    112112                    return 4;
    113113                }
     
    120120
    121121    if (img3->type.type != PS_TYPE_C32) {
    122         psError(__func__,"FFT didn't produce complex values?");
     122        psError(PS_ERR_UNKNOWN, true,"FFT didn't produce complex values?");
    123123        return 5;
    124124    }
    125125
    126126    if (img3->numCols != m || img3->numRows != n) {
    127         psError(__func__,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
     127        psError(PS_ERR_UNKNOWN, true,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
    128128                img3->numCols,img3->numRows,m,n);
    129129        return 6;
     
    136136            psF32 pixel = creal(img3Row[col])/m/n;
    137137            if (fabsf(pixel-imgRow[col]) > 0.1) {
    138                 psError(__func__,"Reverse FFT didn't give original image back (%d,%d %.2f vs %.2f)",
     138                psError(PS_ERR_UNKNOWN, true,"Reverse FFT didn't give original image back (%d,%d %.2f vs %.2f)",
    139139                        col,row,pixel,imgRow[col]);
    140140                return 7;
     
    149149        char* typeStr;
    150150        PS_TYPE_NAME(typeStr,img3->type.type)
    151         psError(__func__,"FFT asked to make real result, but I got a %s type image?",typeStr);
     151        psError(PS_ERR_UNKNOWN, true,"FFT asked to make real result, but I got a %s type image?",typeStr);
    152152        return 8;
    153153    }
    154154
    155155    if (img3->numCols != m || img3->numRows != n) {
    156         psError(__func__,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
     156        psError(PS_ERR_UNKNOWN, true,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
    157157                img3->numCols,img3->numRows,m,n);
    158158        return 9;
     
    165165            psF32 pixel = img3Row[col]/m/n;
    166166            if (fabsf(pixel-imgRow[col]) > 0.1) {
    167                 psError(__func__,"Reverse FFT didn't give original image back (%d,%d %.2f vs %.2f)",
     167                psError(PS_ERR_UNKNOWN, true,"Reverse FFT didn't give original image back (%d,%d %.2f vs %.2f)",
    168168                        col,row,pixel,imgRow[col]);
    169169                return 10;
     
    175175    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error.");
    176176    if (psImageFFT(NULL,img2,PS_FFT_REVERSE|PS_FFT_FORWARD) != NULL) {
    177         psError(__func__,"PS_FFT_REVERSE|PS_FFT_FORWARD option produced something?");
     177        psError(PS_ERR_UNKNOWN, true,"PS_FFT_REVERSE|PS_FFT_FORWARD option produced something?");
    178178        return 11;
    179179    }
     
    181181    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error.");
    182182    if (psImageFFT(NULL,img2,PS_FFT_FORWARD|PS_FFT_REAL_RESULT) != NULL) {
    183         psError(__func__,"PS_FFT_FORWARD|PS_FFT_REAL_RESULT option produced something?");
     183        psError(PS_ERR_UNKNOWN, true,"PS_FFT_FORWARD|PS_FFT_REAL_RESULT option produced something?");
    184184        return 12;
    185185    }
     
    188188    img4 = psImageFFT(NULL,NULL,PS_FFT_FORWARD);
    189189    if (img4 != NULL ) {
    190         psError(__func__,"psImageFFT should return null for a null input image.");
     190        psError(PS_ERR_UNKNOWN, true,"psImageFFT should return null for a null input image.");
    191191        return 10;
    192192    }
     
    197197    img5 = psImageFFT(NULL,img4,PS_FFT_REAL_RESULT);
    198198    if (img5 != NULL) {
    199         psError(__func__,"psImageFFT should return null for an invalid FFT direction.");
     199        psError(PS_ERR_UNKNOWN, true,"psImageFFT should return null for an invalid FFT direction.");
    200200        return 11;
    201201    }
     
    229229    img2 = psImageReal(img2,img);
    230230    if (img2 == NULL) {
    231         psError(__func__,"psImageReal returned a NULL?");
     231        psError(PS_ERR_UNKNOWN, true,"psImageReal returned a NULL?");
    232232        return 1;
    233233    }
    234234    if (img2->type.type != PS_TYPE_F32) {
    235         psError(__func__,"psImageReal returned a wrong type (%d)?",
     235        psError(PS_ERR_UNKNOWN, true,"psImageReal returned a wrong type (%d)?",
    236236                img2->type.type);
    237237        return 2;
     
    240240    img3 = psImageImaginary(img3,img);
    241241    if (img3 == NULL) {
    242         psError(__func__,"psImageImaginary returned a NULL?");
     242        psError(PS_ERR_UNKNOWN, true,"psImageImaginary returned a NULL?");
    243243        return 3;
    244244    }
    245245    if (img3->type.type != PS_TYPE_F32) {
    246         psError(__func__,"psImageImaginary returned a wrong type (%d)?",
     246        psError(PS_ERR_UNKNOWN, true,"psImageImaginary returned a wrong type (%d)?",
    247247                img3->type.type);
    248248        return 4;
     
    255255        for (psU32 col=0;col<m;col++) {
    256256            if (fabsf(img2Row[col] - row) > FLT_EPSILON) {
    257                 psError(__func__,"psImageReal didn't return the real portion at n=%d",
     257                psError(PS_ERR_UNKNOWN, true,"psImageReal didn't return the real portion at n=%d",
    258258                        n);
    259259                return 5;
    260260            }
    261261            if (fabsf(img3Row[col] - col) > FLT_EPSILON) {
    262                 psError(__func__,"psImageImaginary didn't return the imag portion at n=%d",
     262                psError(PS_ERR_UNKNOWN, true,"psImageImaginary didn't return the imag portion at n=%d",
    263263                        n);
    264264                return 6;
     
    307307    // 3. verify that the result is a psC32
    308308    if (img3->type.type != PS_TYPE_C32) {
    309         psError(__func__,"Image Type from psImageComplex is not complex? (%d)",
     309        psError(PS_ERR_UNKNOWN, true,"Image Type from psImageComplex is not complex? (%d)",
    310310                img3->type.type);
    311311        return 1;
     
    319319            if (fabsf(crealf(img3Row[col]) - row) > FLT_EPSILON ||
    320320                    fabsf(cimagf(img3Row[col]) - col) > FLT_EPSILON) {
    321                 psError(__func__,"psImageComplex result is invalid (%d,%d, %.2f+%.2fi)",
     321                psError(PS_ERR_UNKNOWN, true,"psImageComplex result is invalid (%d,%d, %.2f+%.2fi)",
    322322                        col,row,crealf(img3Row[col]),cimagf(img3Row[col]));
    323323                return 2;
     
    334334    // 8. verify that an appropriate error occurred. (this partially has to be done via inspection)
    335335    if (img3 != NULL) {
    336         psError(__func__,"psImageComplex returned a image though input types mismatched.");
     336        psError(PS_ERR_UNKNOWN, true,"psImageComplex returned a image though input types mismatched.");
    337337        return 3;
    338338    }
     
    347347    // 11. verify thet an appropriate error occurred.
    348348    if (img3 != NULL) {
    349         psError(__func__,"psImageComplex returned a image though input sizes mismatched.");
     349        psError(PS_ERR_UNKNOWN, true,"psImageComplex returned a image though input sizes mismatched.");
    350350        return 4;
    351351    }
     
    380380    // 3. verify result is psC32
    381381    if (img2->type.type != PS_TYPE_C32) {
    382         psError(__func__,"the psImageConjugate didn't return a C32 image.");
     382        psError(PS_ERR_UNKNOWN, true,"the psImageConjugate didn't return a C32 image.");
    383383        return 1;
    384384    }
     
    390390            if (fabsf(crealf(img2Row[col]) - row) > FLT_EPSILON ||
    391391                    fabsf(cimagf(img2Row[col]) + col) > FLT_EPSILON) {
    392                 psError(__func__,"psImageComplex result is invalid (%d,%d, %.2f+%.2fi)",
     392                psError(PS_ERR_UNKNOWN, true,"psImageComplex result is invalid (%d,%d, %.2f+%.2fi)",
    393393                        col,row,crealf(img2Row[col]),cimagf(img2Row[col]));
    394394                return 2;
     
    425425    // 3. verify result is psF32
    426426    if (img2->type.type != PS_TYPE_F32) {
    427         psError(__func__,"the type was not PS_TYPE_F32.");
     427        psError(PS_ERR_UNKNOWN, true,"the type was not PS_TYPE_F32.");
    428428        return 1;
    429429    }
     
    438438
    439439            if (fabsf(img2Row[col] - power) > 2.0f*FLT_EPSILON) {
    440                 psError(__func__,"psImagePowerSpectrum result is invalid (%d,%d, %.2f vs %.2f)",
     440                psError(PS_ERR_UNKNOWN, true,"psImagePowerSpectrum result is invalid (%d,%d, %.2f vs %.2f)",
    441441                        col,row,img2Row[col],power);
    442442                return 2;
  • trunk/psLib/test/image/tst_psImageIO.c

    r2204 r2273  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 00:57:33 $
     8 *  @version $Revision: 1.11 $ $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
     
    9797        remove(filename); \
    9898        if (! psImageWriteSection(img3,0,0,1,NULL,0,filename)) { \
    99             psError(__func__,"Failed to write test image %s",filename); \
     99            psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
    100100            return 1; \
    101101        } \
    102102        if (! psImageWriteSection(img,0,0,0,NULL,0,filename)) { \
    103             psError(__func__,"Failed to write test image %s",filename); \
     103            psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
    104104            return 2; \
    105105        } \
    106106        if (! psImageWriteSection(img,0,0,1,NULL,1,filename)) { \
    107             psError(__func__,"Failed to write test image %s",filename); \
     107            psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
    108108            return 3; \
    109109        } \
    110110        if (! psImageWriteSection(img3,0,0,0,NULL,1,filename)) { \
    111             psError(__func__,"Failed to write test image %s",filename); \
     111            psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
    112112            return 4; \
    113113        } \
     
    119119        img = psImageReadSection(img,readM0,readN0,readM,readN,0,NULL,0,filename); \
    120120        /*        if (img_ref != img) { */ \
    121         /*            psError(__func__,"psImageReadSection didn't recycle the psImage?"); */ \
     121        /*            psError(PS_ERR_UNKNOWN, true,"psImageReadSection didn't recycle the psImage?"); */ \
    122122        /*            return 5; */ \
    123123        /*        } */ \
    124124        img3 = psImageReadSection(img3,readM0,readN0,readM,readN,1,NULL,0,filename); \
    125125        if (img3 == NULL) { \
    126             psError(__func__,"Failed to read test image %s",filename); \
     126            psError(PS_ERR_UNKNOWN, true,"Failed to read test image %s",filename); \
    127127            return 6; \
    128128        } \
     
    134134            for (psU32 col = readM0; col < readM; col++) { \
    135135                if (fabsf(imgRow[col-readM0]-img2Row[col]) > FLT_EPSILON) { \
    136                     psError(__func__,"Image changed in I/O operation at %d,%d,0 (%.2f vs %.2f) for %s", \
     136                    psError(PS_ERR_UNKNOWN, true,"Image changed in I/O operation at %d,%d,0 (%.2f vs %.2f) for %s", \
    137137                            col,row,(psF32)imgRow[col-readM0],(psF32)img2Row[col],filename); \
    138138                    return 7; \
    139139                } \
    140140                if (fabsf(img3Row[col-readM0]-img4Row[col]) > FLT_EPSILON) { \
    141                     psError(__func__,"Image changed in I/O operation at %d,%d,1 (%.2f vs %.2f) for %s", \
     141                    psError(PS_ERR_UNKNOWN, true,"Image changed in I/O operation at %d,%d,1 (%.2f vs %.2f) for %s", \
    142142                            col,row,(psF32)img3Row[col-readM0],(psF32)img4Row[col],filename); \
    143143                    return 8; \
     
    152152        img = psImageReadSection(img,readM0,readN0,readM,readN,1,NULL,1,filename); \
    153153        if (img == NULL) { \
    154             psError(__func__,"Failed to read test image %s",filename); \
     154            psError(PS_ERR_UNKNOWN, true,"Failed to read test image %s",filename); \
    155155            return 9; \
    156156        } \
     
    162162            for (psU32 col = readM0; col < readM; col++) { \
    163163                if (fabsf(imgRow[col-readM0]-img2Row[col]) > FLT_EPSILON) { \
    164                     psError(__func__,"Image changed in I/O operation at %d,%d,0 (%.2f vs %.2f) for %s", \
     164                    psError(PS_ERR_UNKNOWN, true,"Image changed in I/O operation at %d,%d,0 (%.2f vs %.2f) for %s", \
    165165                            col,row,(psF32)imgRow[col-readM0],(psF32)img2Row[col],filename); \
    166166                    return 10; \
    167167                } \
    168168                if (fabsf(img3Row[col-readM0]-img4Row[col]) > FLT_EPSILON) { \
    169                     psError(__func__,"Image changed in I/O operation at %d,%d,1 (%.2f vs %.2f) for %s", \
     169                    psError(PS_ERR_UNKNOWN, true,"Image changed in I/O operation at %d,%d,1 (%.2f vs %.2f) for %s", \
    170170                            col,row,(psF32)img3Row[col-readM0],(psF32)img4Row[col],filename); \
    171171                    return 11; \
     
    204204    image = psImageReadSection(image,0,0,M,N,0,NULL,0,"foobar.fits");
    205205    if (image != NULL) {
    206         psError(__func__,"Image returned though filename did not exist.");
     206        psError(PS_ERR_UNKNOWN, true,"Image returned though filename did not exist.");
    207207        return 12;
    208208    }
     
    220220    image = psImageReadSection(image,0,0,M,N,0,NULL,0,NULL);
    221221    if (image != NULL) {
    222         psError(__func__,"Image returned though filename was NULL.");
     222        psError(PS_ERR_UNKNOWN, true,"Image returned though filename was NULL.");
    223223        return 13;
    224224    }
     
    233233    image = psImageReadSection(image,0,0,M,N,0,NULL,4,"tmpImages/MxN_F32.fits");
    234234    if (image != NULL) {
    235         psError(__func__,"Image returned though extnum was invalid.");
     235        psError(PS_ERR_UNKNOWN, true,"Image returned though extnum was invalid.");
    236236        return 14;
    237237    }
     
    239239    image = psImageReadSection(image,0,0,M,N,0,"bogus",0,"tmpImages/MxN_F32.fits");
    240240    if (image != NULL) {
    241         psError(__func__,"Image returned though extnum was invalid.");
     241        psError(PS_ERR_UNKNOWN, true,"Image returned though extnum was invalid.");
    242242        return 15;
    243243    }
     
    302302        ;
    303303    if (! psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeTest.fits")) {
    304         psError(__func__,"Couldn't write writeTest.fits.");
     304        psError(PS_ERR_UNKNOWN, true,"Couldn't write writeTest.fits.");
    305305        return 14;
    306306    }
    307307    if (! psImageWriteSection(img2,0,0,0,NULL,0,"tmpImages/writeTest.fits")) {
    308         psError(__func__,"Couldn't overwrite writeTest.fits.");
     308        psError(PS_ERR_UNKNOWN, true,"Couldn't overwrite writeTest.fits.");
    309309        return 15;
    310310    }
     
    315315    img = psImageReadSection(NULL,0,0,m,n,0,NULL,0,"tmpImages/writeTest.fits");
    316316    if (img == NULL) {
    317         psError(__func__,"Could not read in writeTest.fits.");
     317        psError(PS_ERR_UNKNOWN, true,"Could not read in writeTest.fits.");
    318318        return 16;
    319319    }
     
    322322        for (psU32 col=0;col<m;col++) {
    323323            if (fabsf(imgRow[col] - (row+2*col)) > FLT_EPSILON) {
    324                 psError(__func__,"The image values were not overwritten at %d,%d (%.2f vs %.2f)",
     324                psError(PS_ERR_UNKNOWN, true,"The image values were not overwritten at %d,%d (%.2f vs %.2f)",
    325325                        col,row,imgRow[col],(row+2*col));
    326326                return 17;
     
    337337    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message because input image is null.");
    338338    if ( psImageWriteSection(NULL,0,0,0,NULL,0,"tmpImages/writeTest.fits")) {
    339         psError(__func__,"psImageWriteSection did not return false when input image is NULL.");
     339        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false when input image is NULL.");
    340340        return 20;
    341341    }
     
    347347    GENIMAGE(img,32,32,S8,row+2*col);
    348348    if ( psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeTest.fits")) {
    349         psError(__func__,"psImageWriteSection did not return false when input image type invalid.");
     349        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false when input image type invalid.");
    350350        return 21;
    351351    }
     
    358358    GENIMAGE(img,32,32,U8,row+2*col);
    359359    if ( psImageWriteSection(img,0,0,0,NULL,0,"panstarrs/writeFits.fits")) {
    360         psError(__func__,"psImageWriteSection did not return false for invalid path name.");
     360        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false for invalid path name.");
    361361        return 22;
    362362    }
     
    370370    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error for passing invalid FITS file.");
    371371    if ( psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeInvalidFile.fits")) {
    372         psError(__func__,"psImageWriteSection did not return false for invalid FITS file.");
     372        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false for invalid FITS file.");
    373373        return 22;
    374374    }
     
    381381    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error for invalid extension name.");
    382382    if ( psImageWriteSection(img,0,0,0,"ext2",0,"tmpImages/writeTest.fits")) {
    383         psError(__func__,"psImageWriteSection did not return false for invalid extension name.");
     383        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false for invalid extension name.");
    384384        return 23;
    385385    }
     
    390390    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error for invalid extension number.");
    391391    if ( psImageWriteSection(img,0,0,0,NULL,99,"tmpImages/writeTest.fits")) {
    392         psError(__func__,"psImageWriteSection did not return false for invalid extension number.");
     392        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false for invalid extension number.");
    393393        return 24;
    394394    }
  • 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.