Changeset 42856
- Timestamp:
- May 9, 2025, 2:37:03 PM (14 months ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubCamera.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubCamera.c
r42624 r42856 359 359 } 360 360 361 int did_rewrite = 0; 362 361 363 // Use a temporary config for the reference image, keeping the main user, site, 362 364 // system, files, arguments entries. This allows the reference image to be from a … … 371 373 pmFPAfile *ref = defineInputFile(&success, refconfig, NULL, "PPSUB.REF", "REF", PM_FPA_FILE_IMAGE); 372 374 if (!success) { 373 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF"); 374 return false; 375 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF"); 376 377 psErrorClear(); 378 fprintf(stderr,"%s\n", config->cameraName); 379 psStringSubstitute(&( config->cameraName ),"GPC1","GPC2"); 380 fprintf(stderr,"%s\n", config->cameraName); 381 did_rewrite = 1; 382 383 ref = defineInputFile(&success, config, NULL, "PPSUB.REF", "REF", PM_FPA_FILE_IMAGE); 384 if (!success) { 385 return false; 386 } 375 387 } 376 388 // Reference mask … … 397 409 pmFPAfile *src = defineInputFile(&success, srcconfig, NULL, "PPSUB.REF.SOURCES", "REF.SOURCES", PM_FPA_FILE_CMF); 398 410 if (!success) { 399 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF.SOURCES"); 400 return false; 411 if (did_rewrite == 1) { 412 // Sometimes we use the warp sources instead of the stack 413 psErrorClear(); 414 did_rewrite = 0; 415 416 fprintf(stderr,"%s\n", config->cameraName); 417 psStringSubstitute(&( config->cameraName ),"GPC2","GPC1"); 418 fprintf(stderr,"%s\n", config->cameraName); 419 defineInputFile(&success, config, NULL, "PPSUB.REF.SOURCES", "REF.SOURCES", PM_FPA_FILE_CMF); 420 if (!success) { 421 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF.SOURCES"); 422 return false; 423 } 424 } 425 else { 426 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF.SOURCES"); 427 return false; 428 } 401 429 } 402 430 // copy src->format(RULE) PSCAMERA from input->format(RULE) 403 431 ppSubCopyPSCamera (src, input); 404 432 psFree (srcconfig); 433 434 if (did_rewrite == 1) { 435 fprintf(stderr,"%s\n", config->cameraName); 436 psStringSubstitute(&( config->cameraName ),"GPC2","GPC1"); 437 fprintf(stderr,"%s\n", config->cameraName); 438 } 405 439 406 440 // Now that the camera has been determined, we can read the recipe
Note:
See TracChangeset
for help on using the changeset viewer.
