Definition in file vil3d_trilin_interp.h.
#include <vcl_cassert.h>
#include <vcl_cstddef.h>
#include <vil3d/vil3d_image_view.h>
Go to the source code of this file.
Functions | |
| template<class T> | |
| double | vil3d_trilin_interp_raw (double x, double y, double z, const T *data, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep, vcl_ptrdiff_t zstep) |
| Compute trilinear interpolation at (x,y,z), no bound checks. | |
| template<class T> | |
| double | vil3d_trilin_interp_safe (double x, double y, double z, const T *data, unsigned nx, unsigned ny, unsigned nz, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep, vcl_ptrdiff_t zstep, T outval=0) |
| Compute trilinear interpolation at (x,y,z), with bound checks. | |
| template<class T> | |
| double | vil3d_trilin_interp_safe (const vil3d_image_view< T > &image, double x, double y, double z, unsigned p=0, T outval=0) |
| Compute trilinear interpolation at (x,y,z,p), with bound checks. | |
| template<class T> | |
| double | vil3d_trilin_interp_assert (double x, double y, double z, const T *data, unsigned nx, unsigned ny, unsigned nz, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep, vcl_ptrdiff_t zstep) |
| Compute trilinear interpolation at (x,y), with bound checks. | |
| template<class T> | |
| double | vil3d_trilin_interp_safe_extend (double x, double y, double z, const T *data, unsigned nx, unsigned ny, unsigned nz, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep, vcl_ptrdiff_t zstep) |
| Compute trilinear interpolation at (x,y), with bounds checks. | |
| template<class T> | |
| double | vil3d_trilin_interp_safe_extend (const vil3d_image_view< T > &image, double x, double y, double z, unsigned p=0) |
| Compute trilinear interpolation at (x,y), using the nearest valid value if out of bounds. | |
| double vil3d_trilin_interp_assert | ( | double | x, | |
| double | y, | |||
| double | z, | |||
| const T * | data, | |||
| unsigned | nx, | |||
| unsigned | ny, | |||
| unsigned | nz, | |||
| vcl_ptrdiff_t | xstep, | |||
| vcl_ptrdiff_t | ystep, | |||
| vcl_ptrdiff_t | zstep | |||
| ) | [inline] |
Compute trilinear interpolation at (x,y), with bound checks.
Image is nx * ny * nz array of Ts. x,y element is data[nx*y+x] If (x,y) is outside interpolatable image region and NDEBUG is not defined the code will fail an ASSERT. The safe interpolatable region is [0,nx)*[0,ny)*[0,nz].
Definition at line 88 of file vil3d_trilin_interp.h.
| double vil3d_trilin_interp_raw | ( | double | x, | |
| double | y, | |||
| double | z, | |||
| const T * | data, | |||
| vcl_ptrdiff_t | xstep, | |||
| vcl_ptrdiff_t | ystep, | |||
| vcl_ptrdiff_t | zstep | |||
| ) | [inline] |
Compute trilinear 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 17 of file vil3d_trilin_interp.h.
| double vil3d_trilin_interp_safe | ( | const vil3d_image_view< T > & | image, | |
| double | x, | |||
| double | y, | |||
| double | z, | |||
| unsigned | p = 0, |
|||
| T | outval = 0 | |||
| ) | [inline] |
Compute trilinear interpolation at (x,y,z,p), 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
Definition at line 71 of file vil3d_trilin_interp.h.
| double vil3d_trilin_interp_safe | ( | double | x, | |
| double | y, | |||
| double | z, | |||
| const T * | data, | |||
| unsigned | nx, | |||
| unsigned | ny, | |||
| unsigned | nz, | |||
| vcl_ptrdiff_t | xstep, | |||
| vcl_ptrdiff_t | ystep, | |||
| vcl_ptrdiff_t | zstep, | |||
| T | outval = 0 | |||
| ) | [inline] |
Compute trilinear 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
Definition at line 53 of file vil3d_trilin_interp.h.
| double vil3d_trilin_interp_safe_extend | ( | const vil3d_image_view< T > & | image, | |
| double | x, | |||
| double | y, | |||
| double | z, | |||
| unsigned | p = 0 | |||
| ) | [inline] |
Compute trilinear interpolation at (x,y), using the nearest valid value if out of bounds.
If (x,y,z) is outside safe interpolatable image region, nearest pixel value is returned.
Definition at line 121 of file vil3d_trilin_interp.h.
| double vil3d_trilin_interp_safe_extend | ( | double | x, | |
| double | y, | |||
| double | z, | |||
| const T * | data, | |||
| unsigned | nx, | |||
| unsigned | ny, | |||
| unsigned | nz, | |||
| vcl_ptrdiff_t | xstep, | |||
| vcl_ptrdiff_t | ystep, | |||
| vcl_ptrdiff_t | zstep | |||
| ) | [inline] |
Compute trilinear interpolation at (x,y), with bounds 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.
Definition at line 105 of file vil3d_trilin_interp.h.
1.5.1