IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 17, 2009, 2:38:04 PM (17 years ago)
Author:
Paul Price
Message:

Use image size if TRIMSEC isn't available.

File:
1 edited

Legend:

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

    r24794 r24843  
    263263        pmCell *cell = readout->parent; // The parent cell
    264264        bool mdok = true;       // Status of MD lookup
    265         psRegion *trimsec = psMetadataLookupPtr(&mdok, cell->concepts, "CELL.TRIMSEC"); // Trim section
     265        psRegion *trimsec = cell ? psMetadataLookupPtr(&mdok, cell->concepts, "CELL.TRIMSEC") : NULL; // Trim section
    266266        if (!mdok || !trimsec || psRegionIsNaN(*trimsec)) {
    267             psWarning("CELL.TRIMSEC is not set for readout %ld --- ignored.\n", i);
     267            psWarning("CELL.TRIMSEC is not set for readout %ld --- attempting to use image size.\n", i);
     268            xSize = PS_MAX(xSize, readout->image->numCols);
     269            ySize = PS_MAX(ySize, readout->image->numRows);
     270            xMin = PS_MIN(xMin, 0);
     271            xMax = PS_MAX(xMax, readout->image->numCols - 1);
     272            yMin = PS_MIN(yMin, 0);
     273            yMax = PS_MAX(yMax, readout->image->numRows - 1);
    268274        } else {
    269275            xSize = PS_MAX(xSize, trimsec->x1 - trimsec->x0);
Note: See TracChangeset for help on using the changeset viewer.