Changeset 25825 for branches/pap/ppStack/src/ppStackCamera.c
- Timestamp:
- Oct 9, 2009, 2:57:04 PM (17 years ago)
- File:
-
- 1 edited
-
branches/pap/ppStack/src/ppStackCamera.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppStack/src/ppStackCamera.c
r25787 r25825 233 233 234 234 // Output image 235 pmFPA * fpa= pmFPAConstruct(config->camera, config->cameraName); // FPA to contain the output236 if (! fpa) {235 pmFPA *outFPA = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain the output 236 if (!outFPA) { 237 237 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration."); 238 238 return false; 239 239 } 240 pmFPAfile *output = pmFPAfileDefineOutput(config, fpa, "PPSTACK.OUTPUT");241 psFree( fpa); // Drop reference240 pmFPAfile *output = pmFPAfileDefineOutput(config, outFPA, "PPSTACK.OUTPUT"); 241 psFree(outFPA); // Drop reference 242 242 if (!output) { 243 243 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK.OUTPUT")); … … 250 250 output->save = true; 251 251 252 if (!pmFPAAddSourceFromFormat( fpa, "Stack", output->format)) {252 if (!pmFPAAddSourceFromFormat(outFPA, "Stack", output->format)) { 253 253 psError(PS_ERR_UNKNOWN, false, "Unable to generate output FPA."); 254 psFree(fpa);255 254 return false; 256 255 } … … 295 294 } 296 295 297 #if 0296 #if 1 298 297 // Unconvolved stack 299 pmFPAfile *unConv = pmFPAfileDefineOutput(config, fpa, "PPSTACK.OUTPUT.UNCONV"); 300 psFree(fpa); // Drop reference 298 pmFPA *unconvFPA = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain unconvolved output 299 if (!unconvFPA) { 300 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration."); 301 return false; 302 } 303 pmFPAfile *unConv = pmFPAfileDefineOutput(config, unconvFPA, "PPSTACK.UNCONV"); 304 psFree(unconvFPA); // Drop reference 301 305 if (!unConv) { 302 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK. OUTPUT.UNCONV"));306 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK.UNCONV")); 303 307 return false; 304 308 } 305 309 if (unConv->type != PM_FPA_FILE_IMAGE) { 306 psError(PS_ERR_IO, true, "PPSTACK. OUTPUT.UNCONV is not of type IMAGE");310 psError(PS_ERR_IO, true, "PPSTACK.UNCONV is not of type IMAGE"); 307 311 return false; 308 312 } 309 313 unConv->save = true; 310 314 311 if (!pmFPAAddSourceFromFormat( fpa, "Stack", unConv->format)) {315 if (!pmFPAAddSourceFromFormat(unconvFPA, "Stack", unConv->format)) { 312 316 psError(PS_ERR_UNKNOWN, false, "Unable to generate output FPA."); 313 psFree(fpa);314 317 return false; 315 318 }
Note:
See TracChangeset
for help on using the changeset viewer.
