IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 8, 2025, 4:42:12 PM (12 months ago)
Author:
eugene
Message:

remove old deprecated tests, add some new ones

Location:
trunk/psLib/test
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test

    • Property svn:ignore
      •  

        old new  
        66*.da
        77gmon.out
         8test.00.jpg
         9test.01.jpg
         10test.02.jpg
         11test.03.jpg
         12test.04.jpg
         13test.05.jpg
         14test.06.jpg
         15test.07.jpg
         16test.08.jpg
         17test.09.jpg
         18test.10.jpg
         19test.11.jpg
         20test.12.jpg
         21test.im.fits
         22test.mk.fits
         23test.sm1.fits
         24test.sm2.fits
         25test.sm3.fits
         26test.sm4.fits
         27tmpImages
         28tst_psTrace02_OUT
  • trunk/psLib/test/imageops

    • Property svn:ignore
      •  

        old new  
        3838tap_psImageMapFit
        3939tap_psImageMapFit2
         40tap_psImageCovariance
         41tap_psImageSmoothMask_Threaded
         42test-suite.log
  • trunk/psLib/test/imageops/Makefile.am

    r36375 r42822  
    1818        tap_psImageSmooth \
    1919        tap_psImageSmoothMask_Threaded \
    20         tap_psImageSmooth_PreAlloc \
    2120        tap_psImageStructManip \
    2221        tap_psImageConvolve \
     
    3231        tap_psImageCovariance
    3332
     33#       tap_psImageSmooth_PreAlloc
    3434#       tap_psImageShiftKernel
    3535#       tap_psImageInterpolate
  • trunk/psLib/test/imageops/convolutionBench.c

    r23259 r42822  
    5656    }
    5757
    58     char size[16];
     58    char size[32];
    5959    sprintf(size, "%dx%d", imageCols, imageRows);
    6060    printf("%15s", size);
  • trunk/psLib/test/imageops/tap_psImageGeomManip.c

    r21169 r42822  
    528528
    529529        psImage *in;
    530         psImage *out;
    531         psImage *out2;
    532530        psS32 rows = 64;
    533531        psS32 cols = 64;
     
    544542        // Verify the returned psImage structure pointer is NULL and program
    545543        // execution doesn't stop, if input parameter input is NULL.
    546         out2 = psImageRoll(NULL,NULL,0,0);
     544        psImage *out2 = psImageRoll(NULL,NULL,0,0);
    547545        if (out2 != NULL) {
    548546            psError(PS_ERR_UNKNOWN, true,"psImageRoll did not return NULL though input image was NULL!?");
     
    551549
    552550        psFree(in);
    553         psFree(out);
    554 
    555         #define testRollType(DATATYPE) \
     551        psFree(out2);
     552
     553#define testRollType(DATATYPE) {                          \
    556554        in = psImageAlloc(rows1,cols1,PS_TYPE_##DATATYPE); \
    557555        \
     
    564562        \
    565563        errorFlag = false; \
    566         out = psImageRoll(NULL,in,rows1/4,cols1/4); \
     564        psImage *out = psImageRoll(NULL,in,rows1/4,cols1/4);    \
    567565        for (psS32 row=0;row<rows1;row++) { \
    568566            ps##DATATYPE *inRow = in->data.DATATYPE[(row+rows1/4)%rows1]; \
     
    579577        psFree(in); \
    580578        psFree(out); \
    581         ok(!errorFlag, "psImageRoll() produced the correct data values");
     579        ok(!errorFlag, "psImageRoll() produced the correct data values"); }
    582580
    583581        testRollType(U8);
     
    636634        system("mkdir temp");
    637635        psS32 index = 0;
    638         psBool fail = false;
    639636        psF32 radianRot;
    640637
     
    711708                diag("verified psF32 image failed to be read (%d deg. rotation)", rot);
    712709                errorFlag = true;
    713                 fail = true;
    714710            } else {
    715711                if(fTruth->numRows != fOut->numRows || fTruth->numCols != fOut->numCols) {
     
    788784                     "(%d deg. rotation) BILINEAR",rot);
    789785                errorFlag = true;
    790                 fail = true;
    791786            } else {
    792787                if (sBiTruth->numRows != sBiOut->numRows ||
  • trunk/psLib/test/imageops/tap_psImageInterpolate3.c

    r29929 r42822  
    7474        // point (1) : center of center pixel
    7575        interpOK = psImageInterpolate(&imageVal, NULL, NULL, xCenter + 0.5, yCenter + 0.5, interp);
     76        ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel");
    7677        pt1->data.F32[i] = imageVal;
    7778
    7879        // point (2) : edge of center pixel
    7980        interpOK = psImageInterpolate(&imageVal, NULL, NULL, xCenter + 0.5, yCenter, interp);
     81        ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel");
    8082        pt2->data.F32[i] = imageVal;
    8183
    8284        // point (3) : corner of center pixel
    8385        interpOK = psImageInterpolate(&imageVal, NULL, NULL, xCenter, yCenter, interp);
     86        ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel");
    8487        pt3->data.F32[i] = imageVal;
    8588
     
    102105
    103106        interpOK = psImageInterpolate(&imageVal, &varianceVal, NULL, xCenter + 0.5, yCenter + 0.5, interp);
     107        ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel");
    104108        psStatsInit(stats);
    105109        psVectorStats(stats, pt1, NULL, NULL, 0);
     
    107111       
    108112        interpOK = psImageInterpolate(&imageVal, &varianceVal, NULL, xCenter + 0.5, yCenter, interp);
     113        ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel");
    109114        psStatsInit(stats);
    110115        psVectorStats(stats, pt2, NULL, NULL, 0);
     
    112117       
    113118        interpOK = psImageInterpolate(&imageVal, &varianceVal, NULL, xCenter, yCenter, interp);
     119        ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel");
    114120        psStatsInit(stats);
    115121        psVectorStats(stats, pt3, NULL, NULL, 0);
  • trunk/psLib/test/imageops/tap_psImageMapFit.c

    r20767 r42822  
    7979
    8080        // fit the data to the map
    81         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     81        bool status;
     82        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     83        ok (status, "ok fit");
    8284
    8385        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
     
    153155
    154156        // fit the data to the map
    155         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     157        bool status;
     158        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     159        ok (status, "ok fit");
    156160
    157161        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
     
    235239
    236240        // fit the data to the map
    237         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     241        bool status;
     242        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     243        ok (status, "ok fit");
    238244
    239245        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
     
    318324
    319325        // fit the data to the map
    320         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     326        bool status;
     327        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     328        ok (status, "ok fit");
    321329
    322330        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
     
    384392
    385393        // fit the data to the map
    386         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     394        bool status;
     395        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     396        ok (status, "ok fit");
    387397
    388398        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
     
    445455
    446456        // fit the data to the map
    447         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     457        bool status;
     458        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     459        ok (status, "ok fit");
    448460
    449461        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
     
    526538
    527539        // fit the data to the map
    528         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     540        bool status;
     541        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     542        ok (status, "ok fit");
    529543
    530544        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
     
    595609
    596610        // fit the data to the map
    597         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     611        bool status;
     612        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     613        ok (status, "ok fit");
    598614
    599615        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
     
    686702
    687703        // fit the data to the map
    688         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     704        bool status;
     705        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     706        ok (status, "ok fit");
    689707
    690708        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
     
    753771
    754772        // fit the data to the map
    755         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     773        bool status;
     774        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     775        ok (status, "ok fit");
    756776
    757777        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
     
    814834
    815835        // fit the data to the map
    816         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     836        bool status;
     837        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     838        ok (status, "ok fit");
    817839
    818840        psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32);
  • trunk/psLib/test/imageops/tap_psImageMapFit2.c

    r20767 r42822  
    6161
    6262        // fit the data to the map
    63         psImageMapFit (map, x, y, f, NULL);
     63        bool status;
     64        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     65        ok (status, "ok fit");
     66        // psImageMapFit (map, x, y, f, NULL);
    6467
    6568        psImage *field = psImageAlloc(1000, 1000, PS_TYPE_F32);
     
    124127        for (int ix = 0; ix < 1000; ix += 20) {
    125128            for (int iy = 0; iy < 1000; iy += 20) {
    126                 x->data.F32[x->n] = ix + 0,5;
     129                x->data.F32[x->n] = ix + 0.5;
    127130                y->data.F32[y->n] = iy + 0.5;
    128131                f->data.F32[f->n] = PS_SQR(x->data.F32[x->n]) + PS_SQR(y->data.F32[x->n]);
     
    141144        // XXX this function needs to correct for the mean superpixel position
    142145        // which is sampled...
    143         psImageMapFit (map, NULL, 0, x, y, f, NULL);
     146        bool status;
     147        psImageMapFit (&status, map, NULL, 0, x, y, f, NULL);
     148        ok (status, "ok fit");
     149        // psImageMapFit (map, NULL, 0, x, y, f, NULL);
    144150        psFree (binning);
    145151
  • trunk/psLib/test/imageops/tap_psImageMaskOps.c

    r13123 r42822  
    121121        }
    122122        psImageMaskRegion(img, reg, "=", maskVal);
    123         psBool errorFlag = false;
     123        errorFlag = false;
    124124        for (int i = 0 ; i < numRows ; i++) {
    125125            for (int j = 0 ; j < numCols ; j++) {
     
    149149        maskVal = 0xf;
    150150        psImageMaskRegion(img, reg, "&", maskVal);
    151         psBool errorFlag = false;
     151        errorFlag = false;
    152152        for (int i = 0 ; i < numRows ; i++) {
    153153            for (int j = 0 ; j < numCols ; j++) {
     
    177177        maskVal = 0xf;
    178178        psImageMaskRegion(img, reg, "^", maskVal);
    179         psBool errorFlag = false;
     179        errorFlag = false;
    180180        for (int i = 0 ; i < numRows ; i++) {
    181181            for (int j = 0 ; j < numCols ; j++) {
     
    250250        }
    251251        psImageKeepRegion(img, reg, "=", maskVal);
    252         psBool errorFlag = false;
     252        errorFlag = false;
    253253        for (int i = 0 ; i < numRows ; i++) {
    254254            for (int j = 0 ; j < numCols ; j++) {
     
    278278        maskVal = 0xf;
    279279        psImageKeepRegion(img, reg, "&", maskVal);
    280         psBool errorFlag = false;
     280        errorFlag = false;
    281281        for (int i = 0 ; i < numRows ; i++) {
    282282            for (int j = 0 ; j < numCols ; j++) {
     
    306306        maskVal = 0xf;
    307307        psImageKeepRegion(img, reg, "^", maskVal);
    308         psBool errorFlag = false;
     308        errorFlag = false;
    309309        for (int i = 0 ; i < numRows ; i++) {
    310310            for (int j = 0 ; j < numCols ; j++) {
     
    381381        }
    382382        psImageMaskCircle(img, (psF64) x, (psF64) y, (psF64) radius, "=", maskVal);
    383         psBool errorFlag = false;
     383        errorFlag = false;
    384384        for (int i = 0 ; i < numRows ; i++) {
    385385            for (int j = 0 ; j < numCols ; j++) {
     
    409409        maskVal = 0xf;
    410410        psImageMaskCircle(img, (psF64) x, (psF64) y, (psF64) radius, "&", maskVal);
    411         psBool errorFlag = false;
     411        errorFlag = false;
    412412        for (int i = 0 ; i < numRows ; i++) {
    413413            for (int j = 0 ; j < numCols ; j++) {
     
    437437        maskVal = 0xf;
    438438        psImageMaskCircle(img, (psF64) x, (psF64) y, (psF64) radius, "^", maskVal);
    439         psBool errorFlag = false;
     439        errorFlag = false;
    440440        for (int i = 0 ; i < numRows ; i++) {
    441441            for (int j = 0 ; j < numCols ; j++) {
     
    504504        }
    505505        psImageKeepCircle(img, (psF64) x, (psF64) y, (psF64) radius, "=", maskVal);
    506         psBool errorFlag = false;
     506        errorFlag = false;
    507507        for (int i = 0 ; i < numRows ; i++) {
    508508            for (int j = 0 ; j < numCols ; j++) {
     
    532532        maskVal = 0xf;
    533533        psImageKeepCircle(img, (psF64) x, (psF64) y, (psF64) radius, "&", maskVal);
    534         psBool errorFlag = false;
     534        errorFlag = false;
    535535        for (int i = 0 ; i < numRows ; i++) {
    536536            for (int j = 0 ; j < numCols ; j++) {
     
    560560        maskVal = 0xf;
    561561        psImageKeepCircle(img, (psF64) x, (psF64) y, (psF64) radius, "^", maskVal);
    562         psBool errorFlag = false;
     562        errorFlag = false;
    563563        for (int i = 0 ; i < numRows ; i++) {
    564564            for (int j = 0 ; j < numCols ; j++) {
Note: See TracChangeset for help on using the changeset viewer.