Tricubic interpolation functions for 3D images. More...
#include <vcl_cassert.h>
#include <vcl_cstddef.h>
#include <vil3d/vil3d_image_view.h>
#include <vil3d/vil3d_trilin_interp.h>
Go to the source code of this file.
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 (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, T outval=0) |
Compute tricubic interpolation at (x,y,z), with bound checks. | |
template<class T > | |
double | vil3d_tricub_interp_assert (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 minimal bound checks. | |
template<class T > | |
double | vil3d_tricub_interp_safe_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. | |
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. |
Tricubic interpolation functions for 3D images.
Definition in file vil3d_tricub_interp.h.
double vil3d_tricub_interp_assert | ( | 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 | ||
) | [inline] |
Compute tricubic interpolation at (x,y,z), with minimal bound checks.
Image is nx * ny * nz array of Ts. x,y,z element is data[ystep*y+xstep*x] If (x,y,z) is outside interpolatable image region and NDEBUG is not defined the code will fail an ASSERT. The safe interpolatable region is [1,nx-3]*[1,ny-3]*[1,nz-3].
Definition at line 44 of file vil3d_tricub_interp.h.
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.
double vil3d_tricub_interp_safe | ( | 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, | ||
T | outval = 0 |
||
) | [inline] |
Compute tricubic interpolation at (x,y,z), with bound checks.
Image is nx * ny * nz array of T. x,y,z element is data[z*zstep+ystep*y+x*xstep] If (x,y,z) is outside interpolatable image region, returns zero or outval The safe interpolatable region is [1,nx-3]*[1,ny-3]*[1,nz-3].
Definition at line 24 of file vil3d_tricub_interp.h.
double vil3d_tricub_interp_safe_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 | ||
) | [inline] |
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, nearest pixel value is returned. The safe interpolatable region is [1,nx-3]*[1,ny-3]*[1,nz-3].
Definition at line 62 of file vil3d_tricub_interp.h.
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.