IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 21, 2004, 1:39:48 PM (22 years ago)
Author:
desonia
Message:

Beefed up the psImageInterpolate function to support all real types and various methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/image/psImageStats.h

    r1079 r1251  
    1010 *  @author George Gusciora, MHPCC
    1111 *
    12  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-06-24 02:39:34 $
     12 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-07-21 23:39:48 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1919
    2020
     21#include "psType.h"
    2122#include "psVector.h"
    2223#include "psImage.h"
    2324#include "psStats.h"
    2425#include "psFunctions.h"
     26
     27typedef enum {
     28    PS_INTERPOLATE_FLAT,
     29    PS_INTERPOLATE_BILINEAR
     30} psImageInterpolateMode;
    2531
    2632/// This routine must determine the various statistics for the image.
     
    4854                     );
    4955
    50 float psImagePixelInterpolation(psImage *input,
    51                                 float x,
    52                                 float y);
     56
     57
     58psF32 psImagePixelInterpolate(
     59    const psImage *input,
     60    float x,
     61    float y,
     62    psF32 unexposedValue,
     63    psImageInterpolateMode mode
     64);
     65
     66#define p_psImagePixelInterpolateFcns(TYPE) \
     67inline psF64 p_psImagePixelInterpolateFLAT_##TYPE( \
     68        const psImage *input, \
     69        float x, \
     70        float y, \
     71        psF64 unexposedValue \
     72                                                 ); \
     73inline psF64 p_psImagePixelInterpolateBILINEAR_##TYPE( \
     74        const psImage *input, \
     75        float x, \
     76        float y, \
     77        psF64 unexposedValue \
     78                                                     ); \
     79
     80p_psImagePixelInterpolateFcns(U8)
     81p_psImagePixelInterpolateFcns(U16)
     82p_psImagePixelInterpolateFcns(U32)
     83p_psImagePixelInterpolateFcns(U64)
     84p_psImagePixelInterpolateFcns(S8)
     85p_psImagePixelInterpolateFcns(S16)
     86p_psImagePixelInterpolateFcns(S32)
     87p_psImagePixelInterpolateFcns(S64)
     88p_psImagePixelInterpolateFcns(F32)
     89p_psImagePixelInterpolateFcns(F64)
     90
    5391#endif
Note: See TracChangeset for help on using the changeset viewer.