Changeset 26803
- Timestamp:
- Feb 6, 2010, 1:56:48 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/ppSub/src/ppSubCamera.c
r26649 r26803 23 23 24 24 // Define an input file 25 static pmFPAfile *defineInputFile(pmConfig *config,// Configuration 25 static pmFPAfile *defineInputFile(bool *success, 26 pmConfig *config,// Configuration 26 27 pmFPAfile *bind, // File to which to bind, or NULL 27 28 char *filerule, // Name of file rule … … 32 33 bool status; 33 34 35 *success = false; 36 34 37 // look for the file on the RUN metadata 35 38 pmFPAfile *file = pmFPAfileDefineFromRun(&status, bind, config, filerule); // File to return … … 47 50 if (!status) { 48 51 psError(PS_ERR_UNKNOWN, false, "Failed to load file definition for %s", filerule); 49 return false;52 return NULL; 50 53 } 51 54 } 52 55 53 56 if (!file) { 57 // no file defined 58 *success = true; 54 59 return NULL; 55 60 } … … 60 65 } 61 66 67 *success = true; 62 68 return file; 63 69 } … … 136 142 bool ppSubCamera(ppSubData *data) 137 143 { 144 bool success = true; 145 138 146 psAssert(data, "Require processing data"); 139 147 pmConfig *config = data->config; … … 141 149 142 150 // Input image 143 pmFPAfile *input = defineInputFile( config, NULL, "PPSUB.INPUT", "INPUT", PM_FPA_FILE_IMAGE);144 if (! input) {151 pmFPAfile *input = defineInputFile(&success, config, NULL, "PPSUB.INPUT", "INPUT", PM_FPA_FILE_IMAGE); 152 if (!success) { 145 153 psError(PS_ERR_IO, false, "Failed to build FPA from PPSUB.INPUT"); 146 154 return false; 147 155 } 148 defineInputFile(config, input, "PPSUB.INPUT.MASK", "INPUT.MASK", PM_FPA_FILE_MASK); 149 pmFPAfile *inVar = defineInputFile(config, input, "PPSUB.INPUT.VARIANCE", "INPUT.VARIANCE", 150 PM_FPA_FILE_VARIANCE); 151 defineInputFile(config, NULL, "PPSUB.INPUT.SOURCES", "INPUT.SOURCES", PM_FPA_FILE_CMF); 156 157 defineInputFile(&success, config, input, "PPSUB.INPUT.MASK", "INPUT.MASK", PM_FPA_FILE_MASK); 158 if (!success) { 159 psError(PS_ERR_IO, false, "Failed to build FPA from PPSUB.INPUT.MASK"); 160 return false; 161 } 162 163 pmFPAfile *inVar = defineInputFile(&success, config, input, "PPSUB.INPUT.VARIANCE", "INPUT.VARIANCE", PM_FPA_FILE_VARIANCE); 164 if (!success) { 165 psError(PS_ERR_IO, false, "Failed to build FPA from PPSUB.INPUT.VARIANCE"); 166 return false; 167 } 168 169 defineInputFile(&success, config, NULL, "PPSUB.INPUT.SOURCES", "INPUT.SOURCES", PM_FPA_FILE_CMF); 170 if (!success) { 171 psError(PS_ERR_IO, false, "Failed to build FPA from PPSUB.INPUT.SOURCES"); 172 return false; 173 } 152 174 153 175 // Reference image 154 pmFPAfile *ref = defineInputFile( config, NULL, "PPSUB.REF", "REF", PM_FPA_FILE_IMAGE);155 if (! ref) {176 pmFPAfile *ref = defineInputFile(&success, config, NULL, "PPSUB.REF", "REF", PM_FPA_FILE_IMAGE); 177 if (!success) { 156 178 psError(PS_ERR_IO, false, "Failed to build FPA from PPSUB.REF"); 157 179 return false; 158 180 } 159 defineInputFile(config, ref, "PPSUB.REF.MASK", "REF.MASK", PM_FPA_FILE_MASK); 160 pmFPAfile *refVar = defineInputFile(config, ref, "PPSUB.REF.VARIANCE", "REF.VARIANCE", 161 PM_FPA_FILE_VARIANCE); 162 defineInputFile(config, NULL, "PPSUB.REF.SOURCES", "REF.SOURCES", PM_FPA_FILE_CMF); 163 181 182 defineInputFile(&success, config, ref, "PPSUB.REF.MASK", "REF.MASK", PM_FPA_FILE_MASK); 183 if (!success) { 184 psError(PS_ERR_IO, false, "Failed to build FPA from PPSUB.REF.MASK"); 185 return false; 186 } 187 188 pmFPAfile *refVar = defineInputFile(&success, config, ref, "PPSUB.REF.VARIANCE", "REF.VARIANCE", PM_FPA_FILE_VARIANCE); 189 if (!success) { 190 psError(PS_ERR_IO, false, "Failed to build FPA from PPSUB.REF.VARIANCE"); 191 return false; 192 } 193 194 defineInputFile(&success, config, NULL, "PPSUB.REF.SOURCES", "REF.SOURCES", PM_FPA_FILE_CMF); 195 if (!success) { 196 psError(PS_ERR_IO, false, "Failed to build FPA from PPSUB.REF.SOURCES"); 197 return false; 198 } 164 199 165 200 // Now that the camera has been determined, we can read the recipe
Note:
See TracChangeset
for help on using the changeset viewer.
