Changeset 6817 for trunk/ppImage/src/ppImageDetrendMask.c
- Timestamp:
- Apr 7, 2006, 5:57:23 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageDetrendMask.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageDetrendMask.c
r6747 r6817 1 #include <stdio.h> 2 #include "psmodules.h" 3 #include "ppImageDetrend.h" 1 #include "ppImage.h" 4 2 5 3 # define MASK_MODE (PM_MASK_TRAP | PM_MASK_BADCOL | PM_MASK_SAT) … … 7 5 // XXX pass 'concepts' not 'cell' to this function? 8 6 9 bool ppImageDetrendMask(pm Cell *cell, pmReadout *input, pmReadout *mask) {7 bool ppImageDetrendMask(pmReadout *input, pmReadout *mask) { 10 8 11 float saturation = psMetadataLookupF32(NULL, cell->concepts, "CELL.SATURATION"); 9 psImage *image = NULL; 10 11 float saturation = psMetadataLookupF32(NULL, input->parent->concepts, "CELL.SATURATION"); 12 12 13 13 // Need to change this later to grow the mask by the size of the convolution kernel 14 14 // XXX does this function respect the mask / image cell region information? 15 15 // XXX should probably take pmRegion *mask 16 pmMaskBadPixels(input, mask->image, MASK_MODE, saturation, PM_MASK_TRAP, 0); 16 17 if (mask->image->type.type != PS_TYPE_MASK) { 18 image = psImageCopy (NULL, mask->image, PS_TYPE_MASK); 19 } else { 20 image = psMemIncrRefCounter (mask->image); 21 } 22 23 pmMaskBadPixels(input, image, MASK_MODE, saturation, PM_MASK_TRAP, 0); 24 psFree (image); 17 25 18 26 return true; 19 27 } 28 29 30 // XXX the translation here should not be needed 31 // the mask should (but is not) be read in using the mask read functions 32 // by identifying the image type as a mask (in pmFPAfile). 33 // currently, pmFPAfileReadImage converts the image to F32
Note:
See TracChangeset
for help on using the changeset viewer.
