IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2006, 4:43:57 PM (20 years ago)
Author:
drobbin
Message:

Made several changes to image functions/tests w.r.t. subimage v. parent image issue.

Location:
trunk/psLib/test/imageops
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/imageops/tst_psImagePixelExtract.c

    r6484 r6750  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2006-02-24 23:43:15 $
     8*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-04-01 02:43:57 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2121static psS32 testImageCut(void);
    2222static psS32 testImageRadialCut(void);
     23static psS32 testImageRowColError(void);
    2324static psS32 testImageRowColF32(void);
    2425static psS32 testImageRowColF64(void);
     
    3738                              {testImageSlice, 552, "psImageSlice", 0, false},
    3839                              {testImageCut, 555, "psImageCut", 0, false},
    39                               {testImageRadialCut, 557, "psImageRadialCut", 0, false},
     40                              {testImageRadialCut, 556, "psImageRadialCut", 0, false},
     41                              {testImageRowColError, 557, "testImageRowColError", 0, false},
    4042                              {testImageRowColF32, 558, "psImageRowColF32", 0, false},
    4143                              {testImageRowColF64, 559, "psImageRowColF64", 0, false},
     
    765767}
    766768
    767 psS32 testImageRowColF64(void)
    768 {
    769     psVector *rowcol = NULL;
    770     psVector *empty = NULL;
     769psS32 testImageRowColError(void)
     770{
    771771    psImage *image = NULL;
    772     psImage *emptyImage = NULL;
     772    psVector *out = NULL;
     773    int num = 0;
     774
     775    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
     776    out = psImageRow(NULL, image, num);
     777    if (out != NULL) {
     778        return 1;
     779    }
     780
    773781
    774782    image = psImageAlloc(3, 3, PS_TYPE_F64);
    775     rowcol = psVectorAlloc(3, PS_TYPE_F64);
    776 
     783    *(psS32*)&(image->row0) = 5;
     784    *(psS32*)&(image->col0) = 10;
    777785    image->data.F64[0][0] = 666.666;
    778786    image->data.F64[1][0] = 66.6;
     
    785793    image->data.F64[2][2] = 66.66;
    786794
     795
     796
     797    psFree(out);
     798    psFree(image);
     799    return 0;
     800}
     801
     802psS32 testImageRowColF64(void)
     803{
     804    psVector *rowcol = NULL;
     805    psVector *empty = NULL;
     806    psImage *image = NULL;
     807    psImage *emptyImage = NULL;
     808
     809    image = psImageAlloc(3, 3, PS_TYPE_F64);
     810    rowcol = psVectorAlloc(3, PS_TYPE_F64);
     811
     812    image->data.F64[0][0] = 666.666;
     813    image->data.F64[1][0] = 66.6;
     814    image->data.F64[2][0] = 6.66;
     815    image->data.F64[0][1] = 6.6;
     816    image->data.F64[1][1] = 6.666;
     817    image->data.F64[2][1] = 66.666;
     818    image->data.F64[0][2] = 666.6;
     819    image->data.F64[1][2] = 666.66;
     820    image->data.F64[2][2] = 66.66;
     821
    787822    //Test for error with NULL image
    788823    empty = psImageCol(empty, emptyImage, 0);
  • trunk/psLib/test/imageops/tst_psImageStats.c

    r6306 r6750  
    543543    psRegion reg;
    544544    reg.x0 = 0;
    545     reg.x1 = 1;
     545    reg.x1 = 0;
    546546    reg.y0 = 0;
    547     reg.y1 = 5;
     547    reg.y1 = 4;
     548
     549    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
    548550    numPix = psImageCountPixelMask(in, reg, 1);
    549 
    550551    if (numPix != -1) {
    551552        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     
    587588    if (numPix2 != 2) {
    588589        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
    589                 "psImageCountPixelMask returned incorrect pixel count %ld\n", numPix2);
     590                "psImageCountPixelMask returned incorrect pixel count %ld (!=2)\n", numPix2);
    590591        return 4;
    591592    }
     
    613614    reg.x1 = 1;
    614615    reg.y1 = 1;
     616    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
    615617    numPix2 = psImageCountPixelMask(in2, reg, 1);
    616618    if (numPix2 != -1) {
  • trunk/psLib/test/imageops/verified/tst_psImageInterpolate.stderr

    r4547 r6750  
    1717    Following should generate an error message
    1818<DATE><TIME>|<HOST>|E|psImagePixelInterpolate (FILE:LINENO)
    19     Can not operate on a NULL psImage.
     19    Unallowable operation: psImage input or its data is NULL.
    2020<DATE><TIME>|<HOST>|I|testInterpolateError
    2121    Following should generate an error message
  • trunk/psLib/test/imageops/verified/tst_psImagePixelExtract.stderr

    r6631 r6750  
    2424    Following should be an error.
    2525<DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO)
    26     Specified psRegion parameter, x0=301.000000, is out of range [0,300].
    27 <DATE><TIME>|<HOST>|I|testImageSlice
    28     Following should be an error.
    29 <DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO)
    30     Specified psRegion parameter, y0=201.000000, is out of range [0,200].
    31 <DATE><TIME>|<HOST>|I|testImageSlice
    32     Following should be an error.
    33 <DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO)
    34     Specified psRegion parameter, x1=301.000000=301, is out of range [0,300].
    35 <DATE><TIME>|<HOST>|I|testImageSlice
    36     Following should be an error.
    37 <DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO)
    38     Specified psRegion parameter, y1=201.000000=201, is out of range [0,200].
     26    Specified psRegion parameter, x0=301.000000, is out of range [0,299].
     27<DATE><TIME>|<HOST>|I|testImageSlice
     28    Following should be an error.
     29<DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO)
     30    Specified psRegion parameter, y0=201.000000, is out of range [0,199].
     31<DATE><TIME>|<HOST>|I|testImageSlice
     32    Following should be an error.
     33<DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO)
     34    Specified psRegion parameter, x1=301.000000=301, is out of range [0,299].
     35<DATE><TIME>|<HOST>|I|testImageSlice
     36    Following should be an error.
     37<DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO)
     38    Specified psRegion parameter, y1=201.000000=201, is out of range [0,199].
    3939<DATE><TIME>|<HOST>|I|testImageSlice
    4040    Following should be an error.
     
    6161    The following should be an error.
    6262<DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
    63     Specified line, (-1.000000,10.000000)->(240.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199].
    64 <DATE><TIME>|<HOST>|I|testImageCut
    65     The following should be an error.
    66 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
    67     Specified line, (300.000000,10.000000)->(240.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199].
    68 <DATE><TIME>|<HOST>|I|testImageCut
    69     The following should be an error.
    70 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
    71     Specified line, (20.000000,10.000000)->(-1.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199].
    72 <DATE><TIME>|<HOST>|I|testImageCut
    73     The following should be an error.
    74 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
    75     Specified line, (20.000000,10.000000)->(300.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199].
    76 <DATE><TIME>|<HOST>|I|testImageCut
    77     The following should be an error.
    78 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
    79     Specified line, (20.000000,-1.000000)->(240.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199].
    80 <DATE><TIME>|<HOST>|I|testImageCut
    81     The following should be an error.
    82 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
    83     Specified line, (20.000000,200.000000)->(240.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199].
    84 <DATE><TIME>|<HOST>|I|testImageCut
    85     The following should be an error.
    86 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
    87     Specified line, (20.000000,10.000000)->(240.000000,-1.000000), does not entirely lie in psImage's boundaries, [0:299,0:199].
    88 <DATE><TIME>|<HOST>|I|testImageCut
    89     The following should be an error.
    90 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
    91     Specified line, (20.000000,10.000000)->(240.000000,200.000000), does not entirely lie in psImage's boundaries, [0:299,0:199].
     63    Specified psRegion parameter, x0=-1.000000, is out of range [0,300].
     64<DATE><TIME>|<HOST>|I|testImageCut
     65    The following should be an error.
     66<DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
     67    Specified psRegion parameter, x0=300.000000, is out of range [0,300].
     68<DATE><TIME>|<HOST>|I|testImageCut
     69    The following should be an error.
     70<DATE><TIME>|<HOST>|I|testImageCut
     71    The following should be an error.
     72<DATE><TIME>|<HOST>|I|testImageCut
     73    The following should be an error.
     74<DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
     75    Specified psRegion parameter, y0=-1.000000, is out of range [0,200].
     76<DATE><TIME>|<HOST>|I|testImageCut
     77    The following should be an error.
     78<DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO)
     79    Specified psRegion parameter, y0=200.000000, is out of range [0,200].
     80<DATE><TIME>|<HOST>|I|testImageCut
     81    The following should be an error.
     82<DATE><TIME>|<HOST>|I|testImageCut
     83    The following should be an error.
    9284<DATE><TIME>|<HOST>|I|testImageCut
    9385    Following should be an error (NULL image).
     
    148140/***************************** TESTPOINT ******************************************\
    149141*             TestFile: tst_psImagePixelExtract.c                                  *
     142*            TestPoint: psImage{testImageRowColError}                              *
     143*             TestType: Positive                                                   *
     144\**********************************************************************************/
     145
     146<DATE><TIME>|<HOST>|I|testImageRowColError
     147    Following should generate error message
     148<DATE><TIME>|<HOST>|E|psImageRow (FILE:LINENO)
     149    Can not operate on a NULL psImage.
     150
     151---> TESTPOINT PASSED (psImage{testImageRowColError} | tst_psImagePixelExtract.c)
     152
     153/***************************** TESTPOINT ******************************************\
     154*             TestFile: tst_psImagePixelExtract.c                                  *
    150155*            TestPoint: psImage{psImageRowColF32}                                  *
    151156*             TestType: Positive                                                   *
  • trunk/psLib/test/imageops/verified/tst_psImageStats.stderr

    r5839 r6750  
    622622\**********************************************************************************/
    623623
     624<HOST>|I|testImageCountPixel
     625    Following should generate error message
    624626<HOST>|E|psImageCountPixelMask (FILE:LINENO)
    625     Can not operate on a NULL psImage.
     627    Unallowable operation: psImage mask or its data is NULL.
     628<HOST>|I|testImageCountPixel
     629    Following should generate error message
    626630<HOST>|E|psImageCountPixelMask (FILE:LINENO)
    627     psRegion input contains 0 pixels
     631    Specified psRegion parameter, x0=1.000000, is out of range [0,0].
    628632
    629633---> TESTPOINT PASSED (psImage{psImageCountPixel} | tst_psImageStats.c)
Note: See TracChangeset for help on using the changeset viewer.