Changeset 8004 for trunk/psModules/src/imcombine/pmImageCombine.c
- Timestamp:
- Jul 27, 2006, 5:21:19 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmImageCombine.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmImageCombine.c
r7769 r8004 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 6-30 23:59:49 $10 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-07-28 03:21:19 $ 12 12 * 13 13 * XXX: pmRejectPixels() has a known bug with the pmImageTransform() call. … … 45 45 psS32 numIter, ///< Number of rejection iterations 46 46 psF32 sigmaClip, ///< Number of standard deviations at which to reject 47 constpsStats *stats) ///< Statistics to use in the combination47 psStats *stats) ///< Statistics to use in the combination 48 48 { 49 49 … … 98 98 } 99 99 PS_ASSERT_PTR_NON_NULL(stats, combine); 100 psStatsOptions statistic = psStatsSingleOption(stats->options); 101 if (statistic == 0) { 102 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Multiple or no statistics options set: %x\n", statistic); 103 return combine; 104 } 100 105 101 106 // Allocate and initialize the combined image, if necessary. … … 185 190 // Combine all the pixels, using the specified stat. 186 191 187 stats = psVectorStats((psStats *) stats, pixelData, pixelErrors, pixelMask, maskVal); 188 psF64 combinedPixel; 189 psBool rc = p_psGetStatValue(stats, &combinedPixel); 190 if (rc != true) { 191 psLogMsg(__func__, PS_LOG_WARN, "WARNING: could not combine pixels (%d, %d) with the specified stat.\n", row, col); 192 } 192 stats = psVectorStats(stats, pixelData, pixelErrors, pixelMask, maskVal); 193 psF64 combinedPixel = psStatsGetValue(stats, statistic); 194 193 195 if (iter == 0) { 194 196 combine->data.F32[row][col] = (psF32) combinedPixel; … … 202 204 for (psS32 im = 0 ; im < numImages ; im++) { 203 205 stdevStats = psVectorStats(stdevStats, pixelData, pixelErrors, pixelMask, maskVal); 204 psF64 stdev; 205 psBool rc = p_psGetStatValue(stdevStats, &stdev); 206 if (rc != true) { 207 psLogMsg(__func__, PS_LOG_WARN, "WARNING: could not compute the standard deviation of pixel (%d, %d).\n", row, col); 208 psLogMsg(__func__, PS_LOG_WARN, "WARNING: could not combine pixels (%d, %d) with the specified stat.\n", row, col); 209 } 206 psF64 stdev = stdevStats->sampleStdev; 210 207 211 208 if (!(pixelMask->data.U8[im] & maskVal)) { … … 289 286 } 290 287 // Combine all the pixels, using the specified stat. 291 stats = psVectorStats((psStats *) stats, pixelData, pixelErrors, pixelMask, maskVal); 292 psF64 tmpF64; 293 psBool rc = p_psGetStatValue(stats, &tmpF64); 294 combine->data.F32[row][col] = (psF32) tmpF64; 295 if (rc != true) { 296 psLogMsg(__func__, PS_LOG_WARN, "WARNING: could not combine pixels (%d, %d) with the specified stat.\n", row, col); 297 } 288 stats = psVectorStats(stats, pixelData, pixelErrors, pixelMask, maskVal); 289 combine->data.F32[row][col] = psStatsGetValue(stats, statistic); 298 290 } 299 291 }
Note:
See TracChangeset
for help on using the changeset viewer.
