Changeset 20180 for trunk/dvoTools/src/dvoApplyCorrParseCamera.c
- Timestamp:
- Oct 15, 2008, 5:51:49 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/dvoTools/src/dvoApplyCorrParseCamera.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dvoTools/src/dvoApplyCorrParseCamera.c
r11862 r20180 4 4 5 5 # include "dvoApplyCorr.h" 6 bool dvoApplyCorrSelectCorrFile (pmConfig *config, pmFPA *input); 6 7 7 8 dvoApplyCorrOptions *dvoApplyCorrParseCamera (pmConfig *config) { … … 29 30 return NULL; 30 31 } 32 output->save = TRUE; 31 33 32 34 // find the flat-field correction image (from command-line, config file, or detrend db) 33 status = false; 34 pmFPAfileDefineFromArgs (&status, config, "DVOFLAT.CORR", "CORR"); 35 psErrorClear(); 36 pmFPAfileDefineFromConf (&status, config, "DVOFLAT.CORR"); 37 psErrorClear(); 38 pmFPAfileDefineFromDetDB (&status, config, "DVOFLAT.CORR", input->fpa, PM_DETREND_TYPE_FLAT_CORRECTION); 35 status = dvoApplyCorrSelectCorrFile (config, input->fpa); 39 36 if (!status) { 40 37 psError (PS_ERR_IO, false, "can't find a flat-field correction image source"); … … 52 49 if (! pmFPASelectChip(output->fpa, chipNum, false)) { 53 50 psError(PS_ERR_IO, false, "Chip number %d doesn't exist in camera.\n", chipNum); 54 return false;51 return NULL; 55 52 } 56 53 } … … 59 56 return (options); 60 57 } 58 59 bool dvoApplyCorrSelectCorrFile (pmConfig *config, pmFPA *input) { 60 61 bool status; 62 pmFPAfile *file = NULL; 63 64 file = pmFPAfileDefineFromArgs (&status, config, "DVOFLAT.CORR", "CORR"); 65 if (!status) { 66 psError (PS_ERR_UNKNOWN, false, "failed to load file definition"); 67 return false; 68 } 69 if (file) { 70 if (file->type != PM_FPA_FILE_IMAGE) { 71 psError(PS_ERR_IO, true, "DVOFLAT.CORR is not of type IMAGE"); 72 return false; 73 } 74 return true; 75 } 76 77 file = pmFPAfileDefineFromConf (&status, config, "DVOFLAT.CORR"); 78 if (!status) { 79 psError (PS_ERR_UNKNOWN, false, "failed to load file definition"); 80 return false; 81 } 82 if (file) { 83 if (file->type != PM_FPA_FILE_IMAGE) { 84 psError(PS_ERR_IO, true, "DVOFLAT.CORR is not of type IMAGE"); 85 return false; 86 } 87 return true; 88 } 89 90 file = pmFPAfileDefineFromDetDB (&status, config, "DVOFLAT.CORR", input, PM_DETREND_TYPE_FLAT_CORRECTION); 91 if (!status) { 92 psError (PS_ERR_UNKNOWN, false, "failed to load file definition"); 93 return false; 94 } 95 if (file) { 96 if (file->type != PM_FPA_FILE_IMAGE) { 97 psError(PS_ERR_IO, true, "DVOFLAT.CORR is not of type IMAGE"); 98 return false; 99 } 100 return true; 101 } 102 return false; 103 }
Note:
See TracChangeset
for help on using the changeset viewer.
