Changeset 7999 for trunk/psLib/src/imageops/psImageGeomManip.c
- Timestamp:
- Jul 27, 2006, 2:44:05 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageGeomManip.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageGeomManip.c
r7766 r7999 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.2 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 6-30 02:20:06$12 * @version $Revision: 1.27 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-07-28 00:44:05 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 48 48 psMaskType* maskData = NULL; 49 49 psStats* myStats; 50 double statVal;51 50 52 51 if (in == NULL) { … … 72 71 } 73 72 74 if (p_psGetStatValue(stats, &statVal) == false) { 73 psStatsOptions statistic = psStatsSingleOption(stats->options); // Statistics option to use 74 if (statistic == 0) { 75 75 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 76 76 PS_ERRORTEXT_psImage_BAD_STAT, … … 108 108 out = psImageRecycle(out, outCols, outRows, in->type.type); 109 109 110 #define PS_IMAGE_REBIN_CASE( type) \111 case PS_TYPE_## type: { \112 ps## type*outRowData; \113 ps## type* vecData = vec->data.type; \114 psMaskType *inRowMask = NULL; \110 #define PS_IMAGE_REBIN_CASE(TYPE) \ 111 case PS_TYPE_##TYPE: { \ 112 ps##TYPE *outRowData; \ 113 ps##TYPE *vecData = vec->data.TYPE; \ 114 psMaskType *inRowMask = NULL; \ 115 115 for (psS32 row = 0; row < outRows; row++) { \ 116 outRowData = out->data. type[row]; \117 psS32 inCurrentRow = row *scale; \118 psS32 inNextRow = (row +1)*scale; \116 outRowData = out->data.TYPE[row]; \ 117 psS32 inCurrentRow = row * scale; \ 118 psS32 inNextRow = (row + 1) * scale; \ 119 119 for (psS32 col = 0; col < outCols; col++) { \ 120 psS32 inCurrentCol = col *scale; \121 psS32 inNextCol = (col +1)*scale; \120 psS32 inCurrentCol = col * scale; \ 121 psS32 inNextCol = (col + 1) * scale; \ 122 122 psS32 n = 0; \ 123 123 for (psS32 inRow = inCurrentRow; inRow < inNextRow && inRow < inRows; inRow++) { \ 124 ps## type* inRowData = in->data.type[inRow]; \124 ps##TYPE* inRowData = in->data.TYPE[inRow]; \ 125 125 if (mask != NULL) { \ 126 126 inRowMask = mask->data.PS_TYPE_MASK_DATA[inRow]; \ … … 134 134 } \ 135 135 vec->n = n; \ 136 myStats = psVectorStats(myStats,vec,NULL,maskVec,maskVal); \ 137 p_psGetStatValue(myStats,&statVal); \ 138 outRowData[col] = (ps##type)statVal; \ 136 myStats = psVectorStats(myStats, vec, NULL, maskVec, maskVal); \ 137 outRowData[col] = (ps##TYPE)psStatsGetValue(myStats, statistic); \ 139 138 } \ 140 139 } \
Note:
See TracChangeset
for help on using the changeset viewer.
