- Timestamp:
- Jan 19, 2006, 11:47:06 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_p0/psModules/src/imsubtract/pmSubtractBias.c
r6078 r6080 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1.6.8.1.2. 3$ $Name: not supported by cvs2svn $14 * @date $Date: 2006-01-20 0 6:03:29$13 * @version $Revision: 1.6.8.1.2.4 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2006-01-20 09:47:06 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 102 102 assert(sub); 103 103 104 // Get the trim sections 105 psRegion *inTrimsec = psMetadataLookupPtr(NULL, in->parent->concepts, "CELL.TRIMSEC"); 106 psRegion *subTrimsec = psMetadataLookupPtr(NULL, sub->parent->concepts, "CELL.TRIMSEC"); 107 psImage *inImage = psImageSubset(in->image, *inTrimsec); // The input image 108 psImage *subImage = psImageSubset(sub->image, *subTrimsec); // The image to be subtracted 109 psImage *inMask = in->mask ? psImageSubset(in->mask, *inTrimsec) : NULL; // The input mask 110 psImage *subMask = sub->mask ? psImageSubset(sub->mask, *subTrimsec) : NULL; // The input mask 104 psImage *inImage = in->image; // The input image 105 psImage *inMask = in->mask; // The input mask 106 psImage *subImage = sub->image; // The image to be subtracted 107 psImage *subMask = sub->mask; // The mask for the subtraction image 111 108 112 109 // Offsets of the cells … … 425 422 PS_ASSERT_READOUT_TYPE(in, PS_TYPE_F32, NULL); 426 423 427 pmCell *cell = in->parent; // The parent cell 428 psRegion *trimsec = psMetadataLookupPtr(NULL, cell->concepts, "CELL.TRIMSEC"); // The trim region 429 psImage *image = psImageSubset(in->image, *trimsec); // The image corresponding to the trim region 424 psImage *image = in->image; // The input image 430 425 431 426 // Overscan processing … … 438 433 } 439 434 440 // Get the list of overscans 441 psList *overscanRegions = psMetadataLookupPtr(NULL, cell->concepts, "CELL.BIASSEC"); 442 psList *overscans = psListAlloc(NULL); // List of the overscan images 443 psListIterator *iter = psListIteratorAlloc(overscanRegions, PS_LIST_HEAD, false); // Iterator 444 psRegion *biassec = NULL; // A BIASSEC region from the list 445 while ((biassec = psListGetAndIncrement(iter))) { 446 psImage *overscan = psImageSubset(in->image, *biassec); 447 psListAdd(overscans, PS_LIST_TAIL, overscan); 448 psFree(overscan); 449 } 450 psFree(iter); 435 psList *overscans = in->bias; // List of the overscan images 451 436 452 437 psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN); // A new psStats, to avoid clobbering original … … 482 467 483 468 // We do the regular overscan subtraction 484 bool readRows = psMetadataLookupBool(NULL, cell->concepts, "CELL.READDIR"); // Read direction 469 470 bool readRows = psMetadataLookupBool(NULL, in->parent->concepts, "CELL.READDIR");// Read direction 485 471 486 472 if (readRows) {
Note:
See TracChangeset
for help on using the changeset viewer.
