Changeset 28263 for trunk/ppImage/src/ppImageMosaic.c
- Timestamp:
- Jun 8, 2010, 4:00:13 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageMosaic.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageMosaic.c
r27989 r28263 28 28 } 29 29 30 // If the input is a dark (normalising and mosaicking) then it looks like a video cell and will be ignored 31 // by pmChipMosaic. We therefore hack the structure so it doesn't look like a video cell. 32 psVector *darkNumbers = NULL; // Number of dark readouts for each cell 33 psVectorInit(darkNumbers, 0); 34 if (psMetadataLookupBool(&status, config->arguments, "INPUT_IS_DARK")) { 35 darkNumbers = psVectorAlloc(inChip->cells->n, PS_TYPE_S32); 36 for (int i = 0; i < inChip->cells->n; i++) { 37 pmCell *cell = inChip->cells->data[i]; 38 if (!cell) { 39 continue; 40 } 41 darkNumbers->data.S32[i] = cell->readouts->n; 42 cell->readouts->n = 1; 43 } 44 } 45 30 46 psTrace("pmChipMosaic", 5, "mosaic chip %s to %s (xbin,ybin: %d,%d to %d,%d)\n", 31 47 in->name, out->name, in->xBin, in->yBin, out->xBin, out->yBin); … … 34 50 // image products pure trimmed images, but also increases the memory footprint. 35 51 status = pmChipMosaic(outChip, inChip, true, options->blankMask); 52 53 // Restore dark structure 54 if (darkNumbers) { 55 for (int i = 0; i < inChip->cells->n; i++) { 56 pmCell *cell = inChip->cells->data[i]; 57 if (!cell) { 58 continue; 59 } 60 cell->readouts->n = darkNumbers->data.S32[i]; 61 } 62 psFree(darkNumbers); 63 } 64 36 65 return status; 37 66 }
Note:
See TracChangeset
for help on using the changeset viewer.
