Changeset 7125
- Timestamp:
- May 16, 2006, 1:12:20 PM (20 years ago)
- Location:
- trunk/psLib
- Files:
-
- 2 edited
-
src/imageops/psImagePixelExtract.c (modified) (2 diffs)
-
test/imageops/tst_psImagePixelExtract.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImagePixelExtract.c
r7124 r7125 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-05-16 2 0:40:26$10 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-05-16 23:12:20 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 103 103 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 104 104 "Specified psImage has invalid type for this function.\n"); 105 psFree(out); 105 106 return NULL; 106 107 } -
trunk/psLib/test/imageops/tst_psImagePixelExtract.c
r7124 r7125 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-05-16 2 0:40:26$8 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-05-16 23:12:20 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1087 1087 //Test recycling of non-NULL vector & correct output 1088 1088 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) ) { 1090 1094 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 1091 1095 "psImageCol failed to return correct values.\n"); 1092 1096 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; 1093 1105 } 1094 1106 … … 1141 1153 //Test recycling of non-NULL vector & correct output 1142 1154 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); 1147 1157 if ( (test1>TOLTST) || (test2>TOLTST) ) { 1148 1158 psError(PS_ERR_BAD_PARAMETER_VALUE, false,
Note:
See TracChangeset
for help on using the changeset viewer.
