Changeset 12629
- Timestamp:
- Mar 28, 2007, 9:17:36 AM (19 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 2 edited
-
pmFPAMosaic.c (modified) (5 diffs)
-
pmFPAMosaic.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMosaic.c
r12589 r12629 990 990 // the mosaic image. 991 991 992 bool pmChipMosaic(pmChip *target, const pmChip *source )992 bool pmChipMosaic(pmChip *target, const pmChip *source, bool deepCopy) 993 993 { 994 994 // Target exists, and has only a single cell … … 1012 1012 psRegion *chipRegion = NULL; // Region on the HDU that corresponds to the chip 1013 1013 int xBin = 0, yBin = 0; // Binning for the chip mosaic 1014 if ( (chipRegion = niceChip(&xBin, &yBin, source))) {1014 if (!deepCopy && (chipRegion = niceChip(&xBin, &yBin, source))) { 1015 1015 // Case 1 --- we need only cut out the region 1016 1016 psTrace("psModules.camera", 1, "Case 1 mosaicking: simple cut-out.\n"); … … 1047 1047 return false; 1048 1048 } 1049 chipRegion = psRegionAlloc(NAN, NAN, NAN, NAN); // We've cut and paste, so there's no valid trimsec 1049 chipRegion = psRegionAlloc(0, 0, 0, 0); // We've cut and paste, so there's no valid trimsec 1050 *chipRegion = psRegionForImage (mosaicImage, *chipRegion); 1050 1051 } 1051 1052 psTrace("psModules.camera", 1, "xBin,yBin: %d,%d\n", xBin, yBin); … … 1105 1106 1106 1107 1107 bool pmFPAMosaic(pmFPA *target, const pmFPA *source )1108 bool pmFPAMosaic(pmFPA *target, const pmFPA *source, bool deepCopy) 1108 1109 { 1109 1110 // Target exists, and has only a single chip with single cell … … 1133 1134 psRegion *fpaRegion = NULL; // Region on the HDU that corresponds to the FPA 1134 1135 int xBin = 0, yBin = 0; // Binning for the FPA mosaic 1135 if ( (fpaRegion = niceFPA(&xBin, &yBin, source))) {1136 if (!deepCopy && (fpaRegion = niceFPA(&xBin, &yBin, source))) { 1136 1137 // Case 1 --- we need only cut out the region 1137 1138 psTrace("psModules.camera", 1, "Case 1 mosaicking: simple cut-out.\n"); -
trunk/psModules/src/camera/pmFPAMosaic.h
r11253 r12629 4 4 * @author Paul Price, IfA 5 5 * 6 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $7 * @date $Date: 2007-0 1-24 02:54:14$6 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-03-28 19:17:36 $ 8 8 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 9 9 */ … … 24 24 /// the pixels, if possible. 25 25 bool pmChipMosaic(pmChip *target, ///< Target chip --- may contain only a single cell 26 const pmChip *source ///< Source chip whose cells will be mosaicked 27 ); 26 const pmChip *source, ///< Source chip whose cells will be mosaicked 27 bool deepCopy ///< require a deep copy (disregard 'nice' chip) 28 ); 28 29 29 30 /// Mosaic all cells within an FPA … … 33 34 /// CELL.X0 and CELL.Y0 offsets. This is useful for getting an image of the FPA on the sky. The mosaicking 34 35 /// is done so as to avoid performing a deep copy of the pixels, if possible. 35 bool pmFPAMosaic(pmFPA *target, ///< Target FPA --- may contain only a single chip with a single cell 36 const pmFPA *source ///< FPA whose chips and cells will be mosaicked 37 ); 36 bool pmFPAMosaic(pmFPA *target, ///< Target FPA --- may contain only a single chip with a single cell 37 const pmFPA *source, ///< FPA whose chips and cells will be mosaicked 38 bool deepCopy ///< require a deep copy (disregard 'nice' chip) 39 ); // 38 40 /// @} 39 41 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
