IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 22, 2007, 4:55:01 PM (19 years ago)
Author:
Paul Price
Message:

Adding psImageInterpolateStatus, a status enum which is returned by psImageInterpolate to indicate the relative success. Relatively small API change should leave most implimentations unaffected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageInterpolate.h

    r12741 r13483  
    77 * @author Paul Price, Institute for Astronomy
    88 *
    9  * @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    10  * @date $Date: 2007-04-04 22:42:02 $
     9 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     10 * @date $Date: 2007-05-23 02:55:01 $
    1111 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii
    1212 */
    1313
    14 #ifndef PS_IMAGE_PIXEL_INTERPOLATE_H
    15 #define PS_IMAGE_PIXEL_INTERPOLATE_H
     14#ifndef PS_IMAGE_INTERPOLATE_H
     15#define PS_IMAGE_INTERPOLATE_H
    1616
    1717
     
    2828} psImageInterpolateMode;
    2929
     30/// Status of interpolation
     31typedef enum {
     32    PS_INTERPOLATE_STATUS_ERROR = 0,    ///< There was an error
     33    PS_INTERPOLATE_STATUS_OFF,          ///< The pixel fell completely off the image or in the border
     34    PS_INTERPOLATE_STATUS_BAD,          ///< The pixel is bad
     35    PS_INTERPOLATE_STATUS_POOR,         ///< The pixel is poor
     36    PS_INTERPOLATE_STATUS_GOOD,         ///< The pixel is good
     37} psImageInterpolateStatus;
    3038
    3139/// Options for general interpolation.
     
    3543/// included.
    3644typedef struct {
    37     psImageInterpolateMode mode;        // Interpolation mode
    38     const psImage *image;               // Input image for interpolation
    39     const psImage *variance;            // Variance image for interpolation
    40     const psImage *mask;                // Mask image for interpolation
    41     psMaskType maskVal;                 // Value to mask
    42     double badImage;                    // Image value if x,y location is not good
    43     double badVariance;                 // Variance value if x,y location is not good
    44     psMaskType badMask;                 // Mask value to give bad pixels
    45     psMaskType poorMask;                // Mask value to give poor pixels
    46     float poorFrac;                     // Fraction of flux in bad pixels before output is marked bad
     45    psImageInterpolateMode mode;        ///< Interpolation mode
     46    const psImage *image;               ///< Input image for interpolation
     47    const psImage *variance;            ///< Variance image for interpolation
     48    const psImage *mask;                ///< Mask image for interpolation
     49    psMaskType maskVal;                 ///< Value to mask
     50    double badImage;                    ///< Image value if x,y location is not good
     51    double badVariance;                 ///< Variance value if x,y location is not good
     52    psMaskType badMask;                 ///< Mask value to give bad pixels
     53    psMaskType poorMask;                ///< Mask value to give poor pixels
     54    float poorFrac;                     ///< Fraction of flux in bad pixels before output is marked bad
    4755} psImageInterpolateOptions;
    4856
     
    6472
    6573/// Interpolate image pixel value given floating point coordinates.
    66 bool psImageInterpolate(double *imageValue, ///< Return value for image
    67                         double *varianceValue, ///< Return value for variance
    68                         psMaskType *maskValue, ///< Return value for mask
    69                         float x, float y, ///< Location to which to interpolate
    70                         const psImageInterpolateOptions *options ///< Options for interpolation
     74psImageInterpolateStatus psImageInterpolate(double *imageValue, ///< Return value for image
     75                                            double *varianceValue, ///< Return value for variance
     76                                            psMaskType *maskValue, ///< Return value for mask
     77                                            float x, float y, ///< Location to which to interpolate
     78                                            const psImageInterpolateOptions *options ///< Options
    7179    );
    7280
Note: See TracChangeset for help on using the changeset viewer.