Changeset 16600 for trunk/psModules/src/camera/pmReadoutStack.c
- Timestamp:
- Feb 22, 2008, 9:18:11 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmReadoutStack.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmReadoutStack.c
r15974 r16600 9 9 10 10 bool pmReadoutUpdateSize(pmReadout *readout, int minCols, int minRows, 11 int numCols, int numRows, bool mask) 11 int numCols, int numRows, bool mask, bool weight, 12 psMaskType blank) 12 13 { 13 14 PS_ASSERT_PTR_NON_NULL(readout, false); 14 15 15 16 if (readout->image) { 16 *(psS32*) &(readout->col0)= PS_MIN(minCols, readout->col0);17 *(psS32*) &(readout->row0)= PS_MIN(minRows, readout->row0);17 readout->col0 = PS_MIN(minCols, readout->col0); 18 readout->row0 = PS_MIN(minRows, readout->row0); 18 19 } else { 19 *(psS32*) &(readout->col0)= minCols;20 *(psS32*) &(readout->row0)= minRows;20 readout->col0 = minCols; 21 readout->row0 = minRows; 21 22 } 22 23 … … 28 29 // Generate the new output image by extending the current one, or making a whole new one 29 30 psImage *newImage = psImageAlloc(numCols, numRows, PS_TYPE_F32); 30 psImageInit(newImage, 0.0);31 psImageInit(newImage, NAN); 31 32 psImageOverlaySection(newImage, readout->image, readout->col0, readout->row0, "="); 32 33 psFree(readout->image); … … 40 41 if (readout->mask->numCols < numCols || readout->mask->numRows < numRows) { 41 42 psImage *newMask = psImageAlloc(numCols, numRows, PS_TYPE_MASK); 42 psImageInit(newMask, 0);43 psImageInit(newMask, blank); 43 44 psImageOverlaySection(newMask, readout->mask, readout->col0, readout->row0, "="); 44 45 psFree(readout->mask); 45 46 readout->mask = newMask; 47 } 48 } 49 50 if (weight) { 51 if (!readout->weight) { 52 readout->weight = psImageAlloc(numCols, numRows, PS_TYPE_F32); 53 } 54 if (readout->weight->numCols < numCols || readout->weight->numRows < numRows) { 55 psImage *newWeight = psImageAlloc(numCols, numRows, PS_TYPE_F32); 56 psImageInit(newWeight, NAN); 57 psImageOverlaySection(newWeight, readout->weight, readout->col0, readout->row0, "="); 58 psFree(readout->weight); 59 readout->weight = newWeight; 46 60 } 47 61 } … … 51 65 52 66 bool pmReadoutStackValidate(int *minInputColsPtr, int *maxInputColsPtr, int *minInputRowsPtr, 53 int *maxInputRowsPtr, int *numColsPtr, int *numRowsPtr, 67 int *maxInputRowsPtr, int *numColsPtr, int *numRowsPtr, 54 68 const psArray *inputs) 55 69 {
Note:
See TracChangeset
for help on using the changeset viewer.
