contrib/mul/vil3d/vil3d_tricub_interp.txx File Reference


Detailed Description

Tricubic interpolation functions for 3D images.

Definition in file vil3d_tricub_interp.txx.

#include "vil3d_tricub_interp.h"
#include <vcl_limits.h>
#include <vil/vil_round.h>

Go to the source code of this file.


Defines

#define vil3d_I(dx, dy, dz)   (pix1[(dx)*xstep+(dy)*ystep+(dz)*zstep])
#define vil3d_I(dx, dy, dz)   (pix1[(dx)*xstep+(dy)*ystep+(dz)*zstep])
#define VIL3D_TRICUB_INTERP_INSTANTIATE(T)

Functions

template<class T>
double vil3d_tricub_interp_raw (double x, double y, double z, const T *data, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep, vcl_ptrdiff_t zstep)
 Compute tricubic interpolation at (x,y,z), no bound checks.
template<class T>
double vil3d_tricub_interp_safe_trilinear_extend (double x, double y, double z, const T *data, int nx, int ny, int nz, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep, vcl_ptrdiff_t zstep)
 Compute tricubic interpolation at (x,y,z), with bound checks.

Define Documentation

#define vil3d_I ( dx,
dy,
dz   )     (pix1[(dx)*xstep+(dy)*ystep+(dz)*zstep])

#define vil3d_I ( dx,
dy,
dz   )     (pix1[(dx)*xstep+(dy)*ystep+(dz)*zstep])

#define VIL3D_TRICUB_INTERP_INSTANTIATE (  ) 

Value:

template double vil3d_tricub_interp_raw (double x, double y, double z, const T* data,  \
                                         vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep, vcl_ptrdiff_t zstep); \
template double vil3d_tricub_interp_safe_trilinear_extend (double x, double y, double z, const T* data,  \
                                                           int nx, int ny, int nz, \
                                                           vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep, vcl_ptrdiff_t zstep)

Definition at line 417 of file vil3d_tricub_interp.txx.


Function Documentation

template<class T>
double vil3d_tricub_interp_raw ( double  x,
double  y,
double  z,
const T *  data,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep,
vcl_ptrdiff_t  zstep 
)

Compute tricubic interpolation at (x,y,z), no bound checks.

Image is nx * ny * nz array of T. x,y,z element is data[z*zstep+ystep*y+x*xstep] No bound checks are done.

Definition at line 27 of file vil3d_tricub_interp.txx.

template<class T>
double vil3d_tricub_interp_safe_trilinear_extend ( double  x,
double  y,
double  z,
const T *  data,
int  nx,
int  ny,
int  nz,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep,
vcl_ptrdiff_t  zstep 
)

Compute tricubic interpolation at (x,y,z), with bound checks.

Image is nx * ny array of Ts. x,y element is data[nx*y+x] If (x,y,z) is outside safe interpolatable image region, trilinear interpolated value of the nearest valid pixels is returned. The safe interpolatable region is [1,nx-3]*[1,ny-3]*[1,nz-3].

Definition at line 86 of file vil3d_tricub_interp.txx.


Generated on Mon Nov 23 05:15:08 2009 for contrib/mul/vil3d by  doxygen 1.5.1