Changeset 21183 for trunk/ppImage/src/ppImageReplaceBackground.c
- Timestamp:
- Jan 26, 2009, 8:40:07 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageReplaceBackground.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageReplaceBackground.c
r20863 r21183 30 30 // XXX Should this be options->maskValue or options->maskValue & ~options->satMask? 31 31 // The latter will leave saturated pixels high 32 ps MaskType maskVal = options->maskValue;32 psImageMaskType maskVal = options->maskValue; 33 33 34 34 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) 35 psMetadataAdd U8(psphotRecipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", maskVal);35 psMetadataAddImageMask(psphotRecipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", maskVal); 36 36 37 37 // Since we are working on a chip-mosaicked image, there should only be a single cell and readout … … 146 146 if (!isfinite(value)) { 147 147 image->data.F32[y][x] = NAN; 148 mask->data.PS_TYPE_ MASK_DATA[y][x] |= options->badMask;148 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= options->badMask; 149 149 } else { 150 150 image->data.F32[y][x] -= value; … … 157 157 for (int y = 0; y < numRows; y++) { 158 158 for (int x = 0; x < numCols; x++) { 159 if (mask && mask->data.PS_TYPE_ MASK_DATA[y][x] & maskVal) {159 if (mask && mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal) { 160 160 image->data.F32[y][x] = 0.0; 161 161 } else { … … 163 163 if (!isfinite(value)) { 164 164 image->data.F32[y][x] = NAN; 165 mask->data.PS_TYPE_ MASK_DATA[y][x] |= options->badMask;165 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= options->badMask; 166 166 } else { 167 167 image->data.F32[y][x] -= value;
Note:
See TracChangeset
for help on using the changeset viewer.
