IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18900


Ignore:
Timestamp:
Aug 4, 2008, 3:51:57 PM (18 years ago)
Author:
Paul Price
Message:

Removing need for additional image allocation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmFootprintArrayGrow.c

    r18898 r18900  
    33 * @author RHL, Princeton & IfA; EAM, IfA
    44 *
    5  * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    6  * @date $Date: 2008-08-05 01:36:17 $
     5 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     6 * @date $Date: 2008-08-05 01:51:57 $
    77 * Copyright 2006 Institute for Astronomy, University of Hawaii
    88 */
     
    4444    // Use a separable convolution: should be faster
    4545    idImage = (psImage*)psBinaryOp(idImage, idImage, "MIN", psScalarAlloc(1, PS_TYPE_S32));
    46     psImage *maskImage = psImageCopy(NULL, idImage, PS_TYPE_MASK);
    47     psImage *grownIdImage = psImageConvolveMask(NULL, maskImage, 0xff, 0xff, -1, 1, -1, 1);
    48     psFree(maskImage);
     46    psImage *grownIdImage = psImageCopy(NULL, idImage, PS_TYPE_MASK);
     47    if (!psImageConvolveMask(grownIdImage, grownIdImage, 0x0f, 0xf0, -1, 1, -1, 1)) {
     48        psError(PS_ERR_UNKNOWN, false, "Unable to grow mask.");
     49        psFree(grownIdImage);
     50        psFree(idImage);
     51        return NULL;
     52    }
    4953#else
    5054    if (r <= 0) {
Note: See TracChangeset for help on using the changeset viewer.