Changeset 17006 for trunk/ppStack/src/ppStackReadout.c
- Timestamp:
- Mar 17, 2008, 11:39:43 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackReadout.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackReadout.c
r16987 r17006 66 66 } 67 67 68 if (!pmStackCombine(outRO, stack, maskBad, maskBlank, kernelSize, iter, combineRej, useVariance, safe)) { 68 if (!pmStackCombine(outRO, stack, maskBad, maskBlank, kernelSize, iter, combineRej, true, 69 useVariance, safe)) { 69 70 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts with rejection."); 70 71 psFree(stack); … … 85 86 for (int i = 0; i < stack->n; i++) { 86 87 pmStackData *data = stack->data[i]; // Data for this image 87 psImage *inspected = psPixelsToMask(NULL, data-> pixels,88 psImage *inspected = psPixelsToMask(NULL, data->inspect, 88 89 psRegionSet(0, outRO->image->numCols - 1, 89 90 0, outRO->image->numRows - 1), … … 105 106 psMetadataAddPtr(readout->analysis, PS_LIST_TAIL, PPSTACK_INSPECT_PIXELS, 106 107 PS_DATA_PIXELS | PS_META_DUPLICATE_OK, "Pixels to inspect from initial combination", 107 data->pixels); 108 } 109 108 data->inspect); 109 } 110 110 psFree(stack); 111 111 … … 144 144 psList *fpaList = psListAlloc(NULL); // List of input FPAs, for concept averaging 145 145 psList *cellList = psListAlloc(NULL); // List of input cells, for concept averaging 146 int numGood = num; // Number of good inputs: images that haven't been completely rejected 146 147 for (int i = 0; i < num; i++) { 148 if (!rejected->data[i]) { 149 // Image completely rejected 150 numGood--; 151 continue; 152 } 153 147 154 pmReadout *ro = readouts->data[i]; 148 155 assert(ro); … … 201 208 202 209 pmStackData *data = pmStackDataAlloc(ro, weighting); 203 data-> pixels= psMemIncrRefCounter(rejected->data[i]);210 data->reject = psMemIncrRefCounter(rejected->data[i]); 204 211 stack->data[i] = data; 205 212 } … … 212 219 continue; 213 220 } 214 psImage *reject = psPixelsToMask(NULL, data-> pixels,221 psImage *reject = psPixelsToMask(NULL, data->reject, 215 222 psRegionSet(0, outRO->image->numCols - 1, 216 223 0, outRO->image->numRows - 1), … … 227 234 #endif 228 235 229 if (!pmStackCombine(outRO, stack, maskBad, maskBlank, 0, 0, NAN, useVariance, false)) {236 if (!pmStackCombine(outRO, stack, maskBad, maskBlank, 0, 0, NAN, numGood != num, useVariance, false)) { 230 237 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts."); 231 238 psFree(fpaList);
Note:
See TracChangeset
for help on using the changeset viewer.
