IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 7, 2006, 3:03:35 PM (20 years ago)
Author:
desonia
Message:

fixed a leak in psFits table reading and cleaned up things according to
the API Delta report.

-rdd
`

Location:
trunk/psLib/src/imageops
Files:
2 edited

Legend:

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

    r6227 r6354  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-01-28 01:12:11 $
     12 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-02-08 01:03:35 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    689689
    690690psImage* psImageTransform(psImage *output,
    691                           psArray* blankPixels,
     691                          psPixels** blankPixels,
    692692                          const psImage *input,
    693693                          const psImage *inputMask,
     
    706706    }
    707707    psElemType type = input->type.type;
    708     psPixels* tempPixels = NULL;
    709 
    710     if(blankPixels != NULL) {
    711         tempPixels = psPixelsAlloc(blankPixels->nalloc);
    712         tempPixels->n = blankPixels->n;
    713         tempPixels->data = (psPixelCoord*)blankPixels->data;
     708
     709    if (blankPixels != NULL && *blankPixels == NULL) {
     710        *blankPixels = psPixelsAlloc(0);
    714711    }
    715712
     
    786783    psPlane outPosition;
    787784    psPlane* inPosition = NULL;
    788 
    789 
    790 
    791 
    792785
    793786    #define PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \
     
    808801    if (isnan(value)) { \
    809802        if (blankPixels != NULL) { \
    810             p_psPixelsAppend(tempPixels, tempPixels->nalloc, outPosition.x, outPosition.y); \
     803            p_psPixelsAppend(*blankPixels, (*blankPixels)->nalloc, outPosition.x, outPosition.y); \
    811804        } \
    812805        value = exposedValue; \
     
    873866
    874867    psFree(inPosition);
    875     psFree(tempPixels);
    876868
    877869    return output;
  • trunk/psLib/src/imageops/psImageGeomManip.h

    r6227 r6354  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-01-28 01:12:11 $
     10 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-02-08 01:03:35 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    144144psImage* psImageTransform(
    145145    psImage *output,                   ///< psImage to recycle, or NULL
    146     psArray* blankPixels,              ///< list of pixels in output image not set, or NULL if no list is desired.
     146    psPixels** blankPixels,            ///< list of pixels in output image not set, or NULL if no list is desired.
    147147    const psImage *input,              ///< psImage to apply transform to
    148148    const psImage *inputMask,          ///< if not NULL, mask of input psImage
     
    151151    psRegion region,                   ///< the size of the transformed image
    152152    const psPixels* pixels,            /**< if not NULL, consists of psPixelCoords and specifies which pixels in
    153                                                                              *  output image shall be transformed; otherwise, entire image generated*/
     153                                                                                 *  output image shall be transformed; otherwise, entire image generated*/
    154154    psImageInterpolateMode mode,       ///< the interpolation scheme to be used
    155155    double exposedValue                   ///< Exposed value to which non-corresponding pixels are set
Note: See TracChangeset for help on using the changeset viewer.