IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 25, 2007, 1:53:06 PM (19 years ago)
Author:
Paul Price
Message:

Need to adjust region for possible subregion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmShutterCorrection.c

    r15254 r15381  
    832832    for (int j = 0; j < MEASURE_SAMPLES; j++) {
    833833        psRegion *region = data->regions->data[j]; // Region of interest
    834         psImage *subImage = psImageSubset(readout->image, *region); // Sub-image
     834        psRegion adjusted = *region;    // Adjusted region, compensating for offsets
     835        adjusted.x0 += readout->image->col0;
     836        adjusted.x1 += readout->image->col0;
     837        adjusted.y0 += readout->image->row0;
     838        adjusted.y1 += readout->image->row0;
     839        psImage *subImage = psImageSubset(readout->image, adjusted); // Sub-image
    835840        psImage *subMask = NULL;        // Sub-image of mask
    836841        if (readout->mask) {
    837             subMask = psImageSubset(readout->mask, *region);
     842            subMask = psImageSubset(readout->mask, ajusted);
    838843        }
    839844        if (!psImageStats(stats, subImage, subMask, maskVal)) {
    840             psString regionString = psRegionToString(*region);
     845            psString regionString = psRegionToString(adjusted);
    841846            psWarning("Unable to measure sample statistics at %s in image.\n",
    842847                      regionString);
Note: See TracChangeset for help on using the changeset viewer.