- Timestamp:
- Sep 23, 2010, 7:02:45 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionMatch.c
r29170 r29215 275 275 } 276 276 277 bool pmSubtractionMaskInvalid (const pmReadout *readout, psImageMaskType maskVal) {278 279 if (!readout) return true;280 281 psImage *image = readout->image;282 psImage *mask = readout->mask;283 psImage *variance = readout->variance;284 for (int y = 0; y < image->numRows; y++) {285 for (int x = 0; x < image->numCols; x++) {286 if (mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal) continue;287 bool valid = false;288 valid = isfinite(image->data.F32[y][x]);289 if (variance) {290 valid &= isfinite(variance->data.F32[y][x]);291 }292 if (valid) continue;293 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = maskVal;294 }295 }296 297 return true;298 }277 // bool pmSubtractionMaskInvalid (const pmReadout *readout, psImageMaskType maskVal) { 278 // 279 // if (!readout) return true; 280 // 281 // psImage *image = readout->image; 282 // psImage *mask = readout->mask; 283 // psImage *variance = readout->variance; 284 // for (int y = 0; y < image->numRows; y++) { 285 // for (int x = 0; x < image->numCols; x++) { 286 // if (mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal) continue; 287 // bool valid = false; 288 // valid = isfinite(image->data.F32[y][x]); 289 // if (variance) { 290 // valid &= isfinite(variance->data.F32[y][x]); 291 // } 292 // if (valid) continue; 293 // mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = maskVal; 294 // } 295 // } 296 // 297 // return true; 298 // } 299 299 300 300 bool pmSubtractionMatchPrecalc(pmReadout *conv1, pmReadout *conv2, const pmReadout *ro1, const pmReadout *ro2, … … 387 387 } 388 388 389 pmSubtractionMaskInvalid(ro1, maskVal); 390 pmSubtractionMaskInvalid(ro2, maskVal); 389 // XXX this is done before calling this function 390 // pmSubtractionMaskInvalid(ro1, maskVal); 391 // pmSubtractionMaskInvalid(ro2, maskVal); 391 392 392 393 // General background subtraction, since this is done in pmSubtractionMatch … … 560 561 memCheck("start"); 561 562 562 pmSubtractionMaskInvalid(ro1, maskVal);563 pmSubtractionMaskInvalid(ro2, maskVal);563 // pmSubtractionMaskInvalid(ro1, maskVal); 564 // pmSubtractionMaskInvalid(ro2, maskVal); 564 565 565 566 psRegion bounds = psRegionSet(NAN, NAN, NAN, NAN); // Bounds of valid pixels
Note:
See TracChangeset
for help on using the changeset viewer.
