Changeset 9997 for trunk/psModules/src/detrend/pmShutterCorrection.c
- Timestamp:
- Nov 14, 2006, 4:50:13 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmShutterCorrection.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmShutterCorrection.c
r9984 r9997 400 400 continue; 401 401 } 402 images->data[i] = image;402 images->data[i] = psMemIncrRefCounter(image); 403 403 if (image->type.type != PS_TYPE_F32) { 404 404 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Bad type for image: %x\n", image->type.type); … … 429 429 goto MEASURE_ERROR; 430 430 } 431 masks->data[i] = mask;431 masks->data[i] = psMemIncrRefCounter(mask); 432 432 433 433 if (mask->type.type != PS_TYPE_U8) { … … 452 452 goto MEASURE_ERROR; 453 453 } 454 masks->data[i] = mask;455 456 if ( mask->type.type != PS_TYPE_F32) {454 weights->data[i] = psMemIncrRefCounter(weight); 455 456 if (weight->type.type != PS_TYPE_F32) { 457 457 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Bad type for weights: %x\n", weight->type.type); 458 458 goto MEASURE_ERROR; … … 484 484 psRegion *region = regions->data[j]; // Region of interest 485 485 psImage *subImage = psImageSubset(image, *region); // Sub-image 486 if (!psImageStats(stats, subImage, masks->data[i], maskVal)) { 486 psImage *subMask = NULL; 487 if (mask) { 488 subMask = psImageSubset(mask, *region); 489 } 490 if (!psImageStats(stats, subImage, subMask, maskVal)) { 487 491 psString regionString = psRegionToString(*region); 488 492 psWarning("Unable to measure sample statistics at %s in image %ld.\n",
Note:
See TracChangeset
for help on using the changeset viewer.
