- Timestamp:
- Mar 29, 2010, 3:55:49 PM (16 years ago)
- Location:
- branches/eam_branches/20100225
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psModules/src/imcombine/pmStackReject.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20100225
- Property svn:mergeinfo changed
-
branches/eam_branches/20100225/psModules/src/imcombine/pmStackReject.c
r27004 r27517 10 10 #include "pmSubtractionThreads.h" 11 11 #include "pmSubtractionKernels.h" 12 13 #include "pmStackReject.h" 12 14 13 15 #define PIXEL_LIST_BUFFER 100 // Number of pixels to add to list at a time … … 101 103 102 104 if (!pmSubtractionThreaded()) { 103 pmSubtractionThreadsInit( NULL, NULL);105 pmSubtractionThreadsInit(); 104 106 } 105 107 … … 115 117 116 118 117 psPixels *pmStackReject(const psPixels *in, int numCols, int numRows, float threshold, float poorFrac,118 int stride,const psArray *subRegions, const psArray *subKernels)119 psPixels *pmStackReject(const psPixels *in, int numCols, int numRows, float threshold, int stride, 120 const psArray *subRegions, const psArray *subKernels) 119 121 { 120 122 PS_ASSERT_PIXELS_NON_NULL(in, NULL); … … 222 224 } 223 225 psTrace("psModules.imcombine", 7, "Found %ld bad pixels", bad->n); 224 225 // Now, grow the mask to include everything that touches a bad pixel in the convolution 226 psImage *source = psPixelsToMask(NULL, bad, psRegionSet(0, numCols - 1, 0, numRows - 1), 226 psFree(convolved); 227 228 return bad; 229 } 230 231 232 psPixels *pmStackRejectGrow(const psPixels *in, int numCols, int numRows, float poorFrac, 233 const psArray *subRegions, const psArray *subKernels) 234 { 235 PS_ASSERT_PIXELS_NON_NULL(in, NULL); 236 PS_ASSERT_ARRAY_NON_NULL(subRegions, NULL); 237 PS_ASSERT_ARRAY_NON_NULL(subKernels, NULL); 238 PS_ASSERT_ARRAYS_SIZE_EQUAL(subRegions, subKernels, NULL); 239 240 psImage *source = psPixelsToMask(NULL, in, psRegionSet(0, numCols - 1, 0, numRows - 1), 227 241 PM_STACK_MASK_BAD); // Mask image to grow 228 242 … … 243 257 bool oldThreads = psImageConvolveSetThreads(false); // Old value of threading for psImageColvolve 244 258 245 psImage *target = psImage Recycle(convolved,numCols, numRows, PS_TYPE_IMAGE_MASK); // Grown image259 psImage *target = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK); // Grown image 246 260 psImageInit(target, 0); 247 261 for (int i = 0; i < subRegions->n; i++) { … … 326 340 327 341 psFree(source); 328 bad = psPixelsFromMask(bad, target, PM_STACK_MASK_ALL); 342 psPixels *bad = psPixelsFromMask(NULL, target, PM_STACK_MASK_ALL); // All bad pixels 343 psFree(target); 329 344 psTrace("psModules.imcombine", 7, "Total %ld bad pixels", bad->n); 330 345
Note:
See TracChangeset
for help on using the changeset viewer.
