IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2758


Ignore:
Timestamp:
Dec 17, 2004, 4:32:54 PM (22 years ago)
Author:
evanalst
Message:

Add case for 1D image.

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

Legend:

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

    r2753 r2758  
    55 * @author Eric Van Alst, MHPCC
    66 *
    7  * @version $Revision: 1.2 $
     7 * @version $Revision: 1.3 $
    88 *          $Name: not supported by cvs2svn $
    9  * @date $Date: 2004-12-17 22:33:21 $
     9 * @date $Date: 2004-12-18 02:32:53 $
    1010 *
    1111 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2727#define CHECK_INTERP_VALUE(img,x,y,mask,maskval,exposed,TYPE,expected) \
    2828val = (psF32)psImagePixelInterpolate(img,x,y,mask,maskval,exposed,PS_INTERPOLATE_##TYPE); \
     29printf("returned = %.2f    expected = %.2f\n",val,expected); \
    2930if(val != expected) { \
    3031    psError(PS_ERR_UNKNOWN,true,"Return value is not as expected."); \
     
    4142static psS32 testInterpolateError(void);
    4243static psS32 testInterpolateMaskFlatBilinear(void);
     44static psS32 testInterpolate1D(void);
     45
    4346testDescription tests[] = {
    4447                              {testInterpolateFlatBilinear,999,"psImagePixelInterpolate",0,false},
    4548                              {testInterpolateError,999,"psImagePixelInterpolate",0,false},
    4649                              {testInterpolateMaskFlatBilinear,999,"psImagePixelInterpolate",0,false},
     50                              {testInterpolate1D,999,"psImagePixelInterpolate",0,false},
    4751                              {NULL}
    4852                          };
     
    263267}
    264268
     269// Perform interpolation for a 1D image
     270psS32 testInterpolate1D(void)
     271{
     272    psImage* img1 = NULL;
     273    psF32 val = 0;
     274
     275    GENIMAGE(img1,10,1,F32,row+col)
     276    CHECK_INTERP_VALUE(img1,4.0,0.0,NULL,0,100.0,BILINEAR,3.5)
     277
     278    psFree(img1);
     279
     280    return 0;
     281}
     282
  • trunk/psLib/test/image/verified/tst_psImageInterpolate.stderr

    r2753 r2758  
    3838---> TESTPOINT PASSED (psImagePixelInterpolate{psImagePixelInterpolate} | tst_psImageInterpolate.c)
    3939
     40/***************************** TESTPOINT ******************************************\
     41*             TestFile: tst_psImageInterpolate.c                                   *
     42*            TestPoint: psImagePixelInterpolate{psImagePixelInterpolate}           *
     43*             TestType: Positive                                                   *
     44\**********************************************************************************/
     45
     46
     47---> TESTPOINT PASSED (psImagePixelInterpolate{psImagePixelInterpolate} | tst_psImageInterpolate.c)
     48
Note: See TracChangeset for help on using the changeset viewer.