IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 8, 2007, 12:30:21 PM (19 years ago)
Author:
Paul Price
Message:

Changes to support automatically generated mosaicked camera configurations. Added pmFPAfileDefineChipMosaic and ...FPAMosaic that define fpa files using the new mosaicked camera configurations. Added mosaicLevel to pmFPAfile to prevent the mosaicked files being written out at too low a level. Changes to concept reads so that all concepts are read as available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfileIO.c

    r10827 r10966  
    465465
    466466    // 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
    468469        psTrace("psModules.camera", 6, "skip writing of %s at this level %s: dataLevel is %s",
    469470                file->name, pmFPALevelToName(level), pmFPALevelToName(file->dataLevel));
     
    472473
    473474    // 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))) {
    475478        if (!pmFPAfileOpen (file, view, config)) {
    476479            psError(PS_ERR_IO, false, "failed to open %s", file->filename);
     
    540543
    541544// create the data elements (headers, images) appropriate for this view
    542 bool pmFPAfileCreate (pmFPAfile *file, const pmFPAview *view)
     545bool pmFPAfileCreate (pmFPAfile *file, const pmFPAview *view, const pmConfig *config)
    543546{
    544547    PS_ASSERT_PTR_NON_NULL(file, false);
     
    571574
    572575    // do we need to write this file?
    573     if (level != file->fileLevel) {
     576    if (level != file->fileLevel || file->mosaicLevel != PM_FPA_LEVEL_NONE) {
    574577        psTrace("psModules.camera", 6, "skip creation of %s at this level %s: fileLevel is %s",
    575578                file->name, pmFPALevelToName(level), pmFPALevelToName(file->fileLevel));
     
    581584    case PM_FPA_FILE_MASK:
    582585    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        }
    589611    case PM_FPA_FILE_SX:
    590612    case PM_FPA_FILE_RAW:
     
    727749                goto failure;
    728750            }
    729             if (!pmFPAfileCreate(file, view)) {
     751            if (!pmFPAfileCreate(file, view, config)) {
    730752                psError(PS_ERR_IO, false, "failed CREATE in FPA_BEFORE block for %s", file->name);
    731753                goto failure;
Note: See TracChangeset for help on using the changeset viewer.