- Timestamp:
- Aug 26, 2010, 9:18:39 AM (16 years ago)
- Location:
- branches/sc_branches/trunkTest
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppSub/src/ppSubBackground.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/sc_branches/trunkTest
- Property svn:mergeinfo changed
-
branches/sc_branches/trunkTest/ppSub/src/ppSubBackground.c
r26982 r29060 67 67 for (int y = 0; y < numRows; y++) { 68 68 for (int x = 0; x < numCols; x++) { 69 // special case 1: NAN the masked pixels 69 70 if (mask && mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskBad) { 70 image->data.F32[y][x] = 0.0; 71 } else { 72 float value = psImageUnbinPixel(x + 0.5, y + 0.5, modelImage, binning); // Background value 73 if (!isfinite(value)) { 74 image->data.F32[y][x] = NAN; 75 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskBad; 76 } else { 77 image->data.F32[y][x] -= value; 78 } 79 } 71 image->data.F32[y][x] = NAN; 72 continue; 73 } 74 // special case 1: NAN & mask pixels without a valid background model 75 float value = psImageUnbinPixel(x + 0.5, y + 0.5, modelImage, binning); // Background value 76 if (!isfinite(value)) { 77 image->data.F32[y][x] = NAN; 78 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskBad; 79 continue; 80 } 81 image->data.F32[y][x] -= value; 80 82 } 81 83 }
Note:
See TracChangeset
for help on using the changeset viewer.
