Changeset 28484 for branches/pap/ppImage/src/ppImageMosaic.c
- Timestamp:
- Jun 24, 2010, 2:59:09 PM (16 years ago)
- Location:
- branches/pap
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppImage/src/ppImageMosaic.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/ppImage/src/ppImageMosaic.c
r27989 r28484 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 if (psMetadataLookupBool(&status, config->arguments, "INPUT_IS_DARK")) { 34 darkNumbers = psVectorAlloc(inChip->cells->n, PS_TYPE_S32); 35 psVectorInit(darkNumbers, 0); 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.
