IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20442


Ignore:
Timestamp:
Oct 28, 2008, 12:08:37 PM (18 years ago)
Author:
Paul Price
Message:

We shouldn't copy the concepts from the input cell, because that is
done by pmFPACopy, pmChipCopyStructure, etc. This function just does
the mechanics of binning. We shouldn't even update the CELL.XBIN,
CELL.YBIN because that would apply the correction twice.

File:
1 edited

Legend:

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

    r19710 r20442  
    2929
    3030    // Output image
    31     psImage *outImage = out->image = psImageRecycle(out->image,  numColsOut, numRowsOut, PS_TYPE_F32);
     31    psImage *outImage;
     32    if (out->image && out->image->numCols >= numColsOut && out->image->numRows >= numRowsOut) {
     33        outImage = out->image;
     34    } else {
     35        outImage = out->image = psImageRecycle(out->image,  numColsOut, numRowsOut, PS_TYPE_F32);
     36    }
    3237
    3338    int xLast = numColsIn - 1, yLast = numRowsIn - 1; // Last index
     
    6671        outCell->data_exists = outCell->parent->data_exists = true;
    6772
    68         if (in->parent) {
    69             pmCell *inCell = in->parent;// Input cell
    70             psAssert(outCell != inCell, "Can't copy in place!");
    71             psFree(outCell->concepts);
    72             outCell->concepts = psMetadataCopy(NULL, inCell->concepts);
    73         }
    74 
    75         // Update the concepts with the new values for the binning
    76         psMetadataItem *binItem = psMetadataLookup(outCell->concepts, "CELL.XBIN");
    77         binItem->data.S32 *= xBin;
    78         binItem = psMetadataLookup(outCell->concepts, "CELL.YBIN");
    79         binItem->data.S32 *= yBin;
     73        // We would copy the concepts from the input cell, except that is done by pmFPACopy,
     74        // pmChipCopyStructure, etc.  This function just does the mechanics of binning.
     75        // We don't even update the CELL.XBIN, CELL.YBIN because that would apply the correction twice.
    8076    }
    8177
Note: See TracChangeset for help on using the changeset viewer.