IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2007, 9:17:36 AM (19 years ago)
Author:
magnier
Message:

add option to force deep copy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAMosaic.c

    r12589 r12629  
    990990// the mosaic image.
    991991
    992 bool pmChipMosaic(pmChip *target, const pmChip *source)
     992bool pmChipMosaic(pmChip *target, const pmChip *source, bool deepCopy)
    993993{
    994994    // Target exists, and has only a single cell
     
    10121012    psRegion *chipRegion = NULL;        // Region on the HDU that corresponds to the chip
    10131013    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))) {
    10151015        // Case 1 --- we need only cut out the region
    10161016        psTrace("psModules.camera", 1, "Case 1 mosaicking: simple cut-out.\n");
     
    10471047            return false;
    10481048        }
    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);
    10501051    }
    10511052    psTrace("psModules.camera", 1, "xBin,yBin: %d,%d\n", xBin, yBin);
     
    11051106
    11061107
    1107 bool pmFPAMosaic(pmFPA *target, const pmFPA *source)
     1108bool pmFPAMosaic(pmFPA *target, const pmFPA *source, bool deepCopy)
    11081109{
    11091110    // Target exists, and has only a single chip with single cell
     
    11331134    psRegion *fpaRegion = NULL;         // Region on the HDU that corresponds to the FPA
    11341135    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))) {
    11361137        // Case 1 --- we need only cut out the region
    11371138        psTrace("psModules.camera", 1, "Case 1 mosaicking: simple cut-out.\n");
Note: See TracChangeset for help on using the changeset viewer.