IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 20, 2007, 10:12:44 AM (19 years ago)
Author:
magnier
Message:

adding output target to psImageConvolveDirect API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageConvolve.c

    r13350 r14332  
    77/// @author Eugene Magnier, IfA
    88///
    9 /// @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
    10 /// @date $Date: 2007-05-11 16:48:31 $
     9/// @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
     10/// @date $Date: 2007-07-20 20:12:31 $
    1111///
    1212/// Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    200200}
    201201
    202 psImage *psImageConvolveDirect(const psImage *in,
     202psImage *psImageConvolveDirect(psImage *out,
     203                               const psImage *in,
    203204                               const psKernel *kernel)
    204205{
     
    222223    int numCols = in->numCols;          // Number of columns
    223224
    224     psImage *out;                       // Image to be returned
    225 
    226225#if 1
    227226
     
    231230    case PS_TYPE_##TYPE: { \
    232231        ps##TYPE **inData = in->data.TYPE; /* Dereference input data */ \
    233         out = psImageAlloc(numCols, numRows, PS_TYPE_##TYPE); \
     232        out = psImageRecycle(out, numCols, numRows, PS_TYPE_##TYPE); \
    234233        for (int row = 0; row < numRows; row++) { \
    235234            ps##TYPE *outRow = out->data.TYPE[row]; \
     
    253252    case PS_TYPE_##TYPE: { \
    254253        ps##TYPE **inData = in->data.TYPE; /* Dereference input data */ \
    255         out = psImageAlloc(numCols, numRows, PS_TYPE_##TYPE); \
     254        out = psImageRecycle(out, numCols, numRows, PS_TYPE_##TYPE); \
    256255        psImageInit(out, 0.0); \
    257256        for (int ky = yMin; ky <= yMax; ky++) { \
Note: See TracChangeset for help on using the changeset viewer.