Changeset 20442
- Timestamp:
- Oct 28, 2008, 12:08:37 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPABin.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPABin.c
r19710 r20442 29 29 30 30 // 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 } 32 37 33 38 int xLast = numColsIn - 1, yLast = numRowsIn - 1; // Last index … … 66 71 outCell->data_exists = outCell->parent->data_exists = true; 67 72 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. 80 76 } 81 77
Note:
See TracChangeset
for help on using the changeset viewer.
