Changeset 10966 for trunk/psModules/src/camera/pmFPAfileIO.c
- Timestamp:
- Jan 8, 2007, 12:30:21 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileIO.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileIO.c
r10827 r10966 465 465 466 466 // do we need to write this file? 467 if (level != file->dataLevel) { 467 if ((file->mosaicLevel == PM_FPA_LEVEL_NONE && level != file->dataLevel) || // No mosaicking happening 468 (file->mosaicLevel != PM_FPA_LEVEL_NONE && level != file->mosaicLevel)) { // Mosaicking happening 468 469 psTrace("psModules.camera", 6, "skip writing of %s at this level %s: dataLevel is %s", 469 470 file->name, pmFPALevelToName(level), pmFPALevelToName(file->dataLevel)); … … 472 473 473 474 // do we need to open this file? 474 if (level >= file->fileLevel) { 475 if (level >= file->fileLevel && 476 (file->mosaicLevel == PM_FPA_LEVEL_NONE || 477 (file->mosaicLevel != PM_FPA_LEVEL_NONE && level >= file->mosaicLevel))) { 475 478 if (!pmFPAfileOpen (file, view, config)) { 476 479 psError(PS_ERR_IO, false, "failed to open %s", file->filename); … … 540 543 541 544 // create the data elements (headers, images) appropriate for this view 542 bool pmFPAfileCreate (pmFPAfile *file, const pmFPAview *view )545 bool pmFPAfileCreate (pmFPAfile *file, const pmFPAview *view, const pmConfig *config) 543 546 { 544 547 PS_ASSERT_PTR_NON_NULL(file, false); … … 571 574 572 575 // do we need to write this file? 573 if (level != file->fileLevel ) {576 if (level != file->fileLevel || file->mosaicLevel != PM_FPA_LEVEL_NONE) { 574 577 psTrace("psModules.camera", 6, "skip creation of %s at this level %s: fileLevel is %s", 575 578 file->name, pmFPALevelToName(level), pmFPALevelToName(file->fileLevel)); … … 581 584 case PM_FPA_FILE_MASK: 582 585 case PM_FPA_FILE_WEIGHT: 583 case PM_FPA_FILE_FRINGE: 584 // create FPA structure component based on view 585 pmFPAAddSourceFromView (file->fpa, view, file->format); 586 psTrace ("pmFPAfile", 5, "created fpa data elements for %s (fpa: %p)\n", file->name, file->fpa); 587 break; 588 586 case PM_FPA_FILE_FRINGE: { 587 // create FPA structure component based on view 588 #if 0 589 psMetadata *format = file->format; // Camera format configuration 590 if (!format) { 591 // It's likely a mosaic, for which we don't yet know the appropriate format 592 const psMetadata *camera = file->fpa->camera; // Camera configuration 593 psMetadata *formats = psMetadataLookupMetadata(NULL, camera, "FORMATS"); // The FORMATS 594 if (!formats) { 595 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find FORMATS in camera configuration.\n"); 596 return false; 597 } 598 format = psMetadataLookupMetadata(NULL, formats, config->formatName); 599 if (!format) { 600 psError(PS_ERR_UNEXPECTED_NULL, false, 601 "Unable to find format %s in camera configuration.\n", config->formatName); 602 return false; 603 } 604 file->format = psMemIncrRefCounter(format); 605 } 606 #endif 607 pmFPAAddSourceFromView (file->fpa, view, file->format); 608 psTrace ("pmFPAfile", 5, "created fpa data elements for %s (fpa: %p)\n", file->name, file->fpa); 609 break; 610 } 589 611 case PM_FPA_FILE_SX: 590 612 case PM_FPA_FILE_RAW: … … 727 749 goto failure; 728 750 } 729 if (!pmFPAfileCreate(file, view )) {751 if (!pmFPAfileCreate(file, view, config)) { 730 752 psError(PS_ERR_IO, false, "failed CREATE in FPA_BEFORE block for %s", file->name); 731 753 goto failure;
Note:
See TracChangeset
for help on using the changeset viewer.
