Changeset 13766 for trunk/psModules/src/imcombine/pmReadoutCombine.c
- Timestamp:
- Jun 11, 2007, 3:34:12 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmReadoutCombine.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmReadoutCombine.c
r13756 r13766 104 104 int xSize = 0, ySize = 0; // The size of the output image 105 105 106 int xMin = INT_MAX; 107 int yMin = INT_MAX; 108 int xMax = 0; 109 int yMax = 0; 110 106 111 bool valid = false; // Do we have a single valid input? 107 112 for (long i = 0; i < inputs->n; i++) { … … 113 118 } 114 119 115 // XXX the use of trimsec here to judge the output size is inconsistent with the values of 116 // minInputRows,etc below 117 # if (0) 120 // use the trimsec to define the max full range of the output pixels 118 121 pmCell *cell = readout->parent; // The parent cell 119 122 bool mdok = true; // Status of MD lookup … … 124 127 xSize = PS_MAX(xSize, trimsec->x1 - trimsec->x0); 125 128 ySize = PS_MAX(ySize, trimsec->y1 - trimsec->y0); 126 } 127 # endif 129 xMin = PS_MIN(xMin, trimsec->x0); 130 xMax = PS_MAX(xMax, trimsec->x1); 131 yMin = PS_MIN(yMin, trimsec->y0); 132 yMax = PS_MAX(yMax, trimsec->y1); 133 } 128 134 129 135 if (params->weights && !readout->weight) { … … 136 142 137 143 // Range of pixels on output image 138 minInputRows = PS_M IN(minInputRows, readout->row0);139 maxInputRows = PS_M AX(maxInputRows, readout->row0 + readout->image->numRows);140 minInputCols = PS_M IN(minInputCols, readout->col0);141 maxInputCols = PS_M AX(maxInputCols, readout->col0 + readout->image->numCols);144 minInputRows = PS_MAX (xMin, PS_MIN(minInputRows, readout->row0)); 145 maxInputRows = PS_MIN (xMax, PS_MAX(maxInputRows, readout->row0 + readout->image->numRows)); 146 minInputCols = PS_MAX (yMin, PS_MIN(minInputCols, readout->col0)); 147 maxInputCols = PS_MIN (yMax, PS_MAX(maxInputCols, readout->col0 + readout->image->numCols)); 142 148 psTrace("psModules.imcombine", 7, "Readout %ld: offset %d,%d; size %dx%d\n", i, 143 149 readout->col0, readout->row0, readout->image->numCols, readout->image->numRows); 144 150 } 145 146 // full size of the output image147 xSize = maxInputCols - minInputCols;148 ySize = maxInputRows - minInputRows;149 151 150 152 if (!valid) {
Note:
See TracChangeset
for help on using the changeset viewer.
