IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7125


Ignore:
Timestamp:
May 16, 2006, 1:12:20 PM (20 years ago)
Author:
drobbin
Message:

fixed tests for ImageRow/Col F32, F64. Edited value comparisons to check correct values.

Location:
trunk/psLib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImagePixelExtract.c

    r7124 r7125  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-05-16 20:40:26 $
     10 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-05-16 23:12:20 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    103103        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    104104                "Specified psImage has invalid type for this function.\n");
     105        psFree(out);
    105106        return NULL;
    106107    }
  • trunk/psLib/test/imageops/tst_psImagePixelExtract.c

    r7124 r7125  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2006-05-16 20:40:26 $
     8*  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-05-16 23:12:20 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    10871087    //Test recycling of non-NULL vector & correct output
    10881088    rowcol = psImageCol(rowcol, image, 1);
    1089     if (rowcol->data.F64[0] != 6.666 && rowcol->data.F64[2] != 66.666) {
     1089    double test1, test2;
     1090    double TOLTST = .001;
     1091    test1 = fabs(rowcol->data.F64[0]-6.6);
     1092    test2 = fabs(rowcol->data.F64[2]-66.666);
     1093    if ( (test1>TOLTST) || (test2>TOLTST) ) {
    10901094        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
    10911095                "psImageCol failed to return correct values.\n");
    10921096        return 3;
     1097    }
     1098    rowcol = psImageRow(rowcol, image, 1);
     1099    test1 = fabs(rowcol->data.F64[0]-66.6);
     1100    test2 = fabs(rowcol->data.F64[2]-666.66);
     1101    if ( (test1>TOLTST) || (test2>TOLTST) ) {
     1102        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     1103                "psImageRow failed to return correct values.\n");
     1104        return 4;
    10931105    }
    10941106
     
    11411153    //Test recycling of non-NULL vector & correct output
    11421154    rowcol = psImageCol(rowcol, image, 1);
    1143     //    test1 = abs(rowcol->data.F32[0]-66.6);
    1144     //    test2 = abs(rowcol->data.F32[2]-666.66);
    1145     test1 = abs(rowcol->data.F32[0]-6.6);
    1146     test2 = abs(rowcol->data.F32[2]-66.666);
     1155    test1 = fabs(rowcol->data.F32[0]-6.6);
     1156    test2 = fabs(rowcol->data.F32[2]-66.666);
    11471157    if ( (test1>TOLTST) || (test2>TOLTST) ) {
    11481158        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
Note: See TracChangeset for help on using the changeset viewer.