Changeset 18556 for trunk/ppImage/src/ppImageParseCamera.c
- Timestamp:
- Jul 15, 2008, 10:26:37 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageParseCamera.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageParseCamera.c
r18422 r18556 20 20 } 21 21 22 // if MASK or WEIGHT was supplied on command line, bind files to 'input' 22 // if MASK or WEIGHT was supplied on command line, bind files to 'input'. 23 23 // the mask and weight will be mosaicked with the image 24 24 pmFPAfile *inputMask = pmFPAfileBindFromArgs(&status, input, config, "PPIMAGE.INPUT.MASK", "PPIMAGE.INPUT.MASK"); … … 27 27 return NULL; 28 28 } 29 if (inputMask && inputMask->type != PM_FPA_FILE_MASK) { 29 if (inputMask) { 30 if (inputMask->type != PM_FPA_FILE_MASK) { 30 31 psError(PS_ERR_IO, true, "PPIMAGE.INPUT.MASK is not of type MASK"); 31 32 return NULL; 33 } 32 34 } 33 35 … … 66 68 } 67 69 if (options->doMask) { 70 68 71 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK, PM_DETREND_TYPE_MASK)) { 69 72 psError (PS_ERR_IO, false, "Can't find a mask image source"); … … 71 74 return NULL; 72 75 } 73 // Need to read the names of bit masks from the mask header and set them in the recipe 76 // XXX have ppImageDefineFile return the pmFPAfile? 77 pmFPAfile *mask = psMetadataLookupPtr(&status, config->files, "PPIMAGE.MASK"); 78 psAssert (mask, "mask not defined? not possible!"); 79 80 // Need to read the names of bit masks from the mask header and set them in the 81 // recipe. If we are loading this from the detrend db, this action will happen 82 // when the file is resolved. 83 if (!mask->detrend) { 84 // XXX need to load the mask bit names from one of the headers 85 // this grabs the first available hdu : no guarantee that it will be valid, though 86 pmHDU *hdu = pmHDUGetFirst (mask->fpa); 87 if (!hdu) { 88 psError(PS_ERR_IO, true, "no valid HDU for PPIMAGE.INPUT.MASK"); 89 return NULL; 90 } 91 // XXX is this consistent with the pmConfigMaskReadHeader call above? 92 if (!pmConfigMaskReadHeader (config, hdu->header)) { 93 psError(PS_ERR_IO, false, "error in mask bits"); 94 return NULL; 95 } 96 } 74 97 } 75 98 if (options->doShutter) {
Note:
See TracChangeset
for help on using the changeset viewer.
