- Timestamp:
- Sep 27, 2009, 11:36:17 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/psModules/src/imcombine/pmStackReject.c
r21351 r25626 43 43 if (box > 0) { 44 44 // Convolve a subimage, then stick it in the target 45 // XXX if (threaded) {46 // XXX psMutexLock(source);47 // XXX }48 45 psImage *mask = psImageSubset(source, psRegionSet(xMin - box, xMax + box, 49 46 yMin - box, yMax + box)); // Mask to convolve 50 // XXX if (threaded) {51 // XXX psMutexUnlock(source);52 // XXX }53 47 psImage *convolved = psImageConvolveMask(NULL, mask, PM_STACK_MASK_BAD, PM_STACK_MASK_CONVOLVE, 54 48 -box, box, -box, box); // Convolved mask 55 // XXX if (threaded) {56 // XXX psMutexLock(source);57 // XXX }58 49 psFree(mask); 59 // XXX if (threaded) {60 // XXX psMutexUnlock(source);61 // XXX }62 50 63 51 int numBytes = (xMax - xMin) * PSELEMTYPE_SIZEOF(PS_TYPE_IMAGE_MASK); // Number of bytes to copy … … 162 150 pmReadout *inRO = pmReadoutAlloc(NULL); // Readout with input image 163 151 inRO->image = image; 164 // XXX if (threaded) {165 // XXX psMutexInit(image);166 // XXX }167 152 for (int i = 0; i < numRegions; i++) { 168 153 psRegion *region = subRegions->data[i]; // Region of interest 169 154 pmSubtractionKernels *kernels = subKernels->data[i]; // Kernel of interest 170 if (!pmSubtractionConvolve( convRO, NULL, inRO, NULL, NULL, stride, 0, 0, 1.0, 0.0,155 if (!pmSubtractionConvolve(NULL, convRO, NULL, inRO, NULL, stride, 0, 0, 1.0, 0.0, 171 156 region, kernels, false, true)) { 172 157 psError(PS_ERR_UNKNOWN, false, "Unable to convolve mask image in region %d.", i); … … 211 196 } 212 197 } 213 // XXX if (threaded) {214 // XXX psMutexDestroy(image);215 // XXX }216 198 psFree(inRO); 217 199 psImage *convolved = psMemIncrRefCounter(convRO->image); … … 264 246 psImage *target = psImageRecycle(convolved, numCols, numRows, PS_TYPE_IMAGE_MASK); // Grown image 265 247 psImageInit(target, 0); 266 // XXX if (threaded) {267 // XXX psMutexInit(source);268 // XXX }269 248 for (int i = 0; i < subRegions->n; i++) { 270 249 psRegion *region = subRegions->data[i]; // Subtraction region … … 287 266 psArray *args = job->args; // Job arguments 288 267 psArrayAdd(args, 1, target); 289 // XXX psMutexLock(source);290 268 psArrayAdd(args, 1, source); 291 // XXX psMutexUnlock(source);292 269 psArrayAdd(args, 1, kernels); 293 270 PS_ARRAY_ADD_SCALAR(args, numCols, PS_TYPE_S32); … … 332 309 } 333 310 334 // XXX psMutexDestroy(source);335 311 } 336 312
Note:
See TracChangeset
for help on using the changeset viewer.
