Defines | Functions
contrib/mul/vil3d/vil3d_resample_tricubic.txx File Reference

Resample a 3D image by a tricubic method. More...

#include "vil3d_resample_tricubic.h"
#include <vil/vil_convert.h>
#include <vil3d/vil3d_tricub_interp.h>
#include <vil3d/vil3d_plane.h>
#include <vcl_cassert.h>

Go to the source code of this file.

Defines

#define vil3d_resample_tricubic_txx_
#define VIL3D_RESAMPLE_TRICUBIC_INSTANTIATE(S, T)

Functions

bool vil3dresample_tricub_corner_in_image (double x0, double y0, double z0, const vil3d_image_view_base &image)
template<class S , class T >
void vil3d_resample_tricubic (const vil3d_image_view< S > &src_image, vil3d_image_view< T > &dest_image, double x0, double y0, double z0, double dx1, double dy1, double dz1, double dx2, double dy2, double dz2, double dx3, double dy3, double dz3, int n1, int n2, int n3, T outval)
 Sample grid of points in one image and place in another, using tricubic interpolation.
template<class S , class T >
void vil3d_resample_tricubic_edge_extend (const vil3d_image_view< S > &src_image, vil3d_image_view< T > &dest_image, double x0, double y0, double z0, double dx1, double dy1, double dz1, double dx2, double dy2, double dz2, double dx3, double dy3, double dz3, int n1, int n2, int n3)
 Sample grid of points in one image and place in another, using tricubic interpolation.
template<class S , class T >
void vil3d_resample_tricubic_edge_extend (const vil3d_image_view< S > &src_image, vil3d_image_view< T > &dest_image, int n1, int n2, int n3)
 Sample grid of points in one image and place in another, using tricubic interpolation and edge extension.
template<class S , class T >
void vil3d_resample_tricubic_edge_trilin_extend (const vil3d_image_view< S > &src_image, vil3d_image_view< T > &dest_image, double x0, double y0, double z0, double dx1, double dy1, double dz1, double dx2, double dy2, double dz2, double dx3, double dy3, double dz3, int n1, int n2, int n3)
 Sample grid of points in one image and place in another, using tricubic interpolation.
template<class S , class T >
void vil3d_resample_tricubic_edge_trilin_extend (const vil3d_image_view< S > &src_image, vil3d_image_view< T > &dest_image, int n1, int n2, int n3)
 Sample grid of points in one image and place in another, using tricubic interpolation.
template<class S , class T >
void vil3d_resample_tricubic (const vil3d_image_view< S > &src_image, vil3d_image_view< T > &dest_image, int n1, int n2, int n3)
 Resample image to a specified dimensions (n1 * n2 * n3).

Detailed Description

Resample a 3D image by a tricubic method.

Author:
Gwenael Guillard

Definition in file vil3d_resample_tricubic.txx.


Define Documentation

#define VIL3D_RESAMPLE_TRICUBIC_INSTANTIATE (   S,
 
)

Definition at line 545 of file vil3d_resample_tricubic.txx.

#define vil3d_resample_tricubic_txx_

Definition at line 2 of file vil3d_resample_tricubic.txx.


Function Documentation

template<class S , class T >
void vil3d_resample_tricubic ( const vil3d_image_view< S > &  src_image,
vil3d_image_view< T > &  dest_image,
double  x0,
double  y0,
double  z0,
double  dx1,
double  dy1,
double  dz1,
double  dx2,
double  dy2,
double  dz2,
double  dx3,
double  dy3,
double  dz3,
int  n1,
int  n2,
int  n3,
outval 
)

Sample grid of points in one image and place in another, using tricubic interpolation.

dest_image(i,j,k,p) is sampled from the src_image at (x0+i.dx1+j.dx2+k.dx3, y0+i.dy1+j.dy2+k.dy3, z0+i.dz1+j.dz2+k.dz3), where i=[0..n1-1], j=[0..n2-1], k=[0..n3-1] dest_image resized to (n1,n2,n3,src_image.nplanes()) Points outside interpolatable region return zero or outval

Definition at line 36 of file vil3d_resample_tricubic.txx.

template<class S , class T >
void vil3d_resample_tricubic ( const vil3d_image_view< S > &  src_image,
vil3d_image_view< T > &  dest_image,
int  n1,
int  n2,
int  n3 
)

Resample image to a specified dimensions (n1 * n2 * n3).

Definition at line 515 of file vil3d_resample_tricubic.txx.

template<class S , class T >
void vil3d_resample_tricubic_edge_extend ( const vil3d_image_view< S > &  src_image,
vil3d_image_view< T > &  dest_image,
double  x0,
double  y0,
double  z0,
double  dx1,
double  dy1,
double  dz1,
double  dx2,
double  dy2,
double  dz2,
double  dx3,
double  dy3,
double  dz3,
int  n1,
int  n2,
int  n3 
)

Sample grid of points in one image and place in another, using tricubic interpolation.

Sample grid of points in one image and place in another, using tricubic interpolation and edge extension.

dest_image(i,j,k,p) is sampled from the src_image at (x0+i.dx1+j.dx2+k.dx3, y0+i.dy1+j.dy2+k.dy3, z0+i.dz1+j.dz2+k.dz3), where i=[0..n1-1], j=[0..n2-1], k=[0..n3-1] dest_image resized to (n1,n2,n3,src_image.nplanes()) Points outside interpolatable return the value of the nearest valid pixel.

Definition at line 204 of file vil3d_resample_tricubic.txx.

template<class S , class T >
void vil3d_resample_tricubic_edge_extend ( const vil3d_image_view< S > &  src_image,
vil3d_image_view< T > &  dest_image,
int  n1,
int  n2,
int  n3 
)

Sample grid of points in one image and place in another, using tricubic interpolation and edge extension.

dest_image(i,j,k,p) is sampled from the src_image at (x0+i.dx1+j.dx2+k.dx3, y0+i.dy1+j.dy2+k.dy3, z0+i.dz1+j.dz2+k.dz3), where i=[0..n1-1], j=[0..n2-1], k=[0..n3-1]. dest_image resized to (n1,n2,n3,src_image.nplanes()) Points outside interpolatable return the value of the nearest valid pixel.

Definition at line 369 of file vil3d_resample_tricubic.txx.

template<class S , class T >
void vil3d_resample_tricubic_edge_trilin_extend ( const vil3d_image_view< S > &  src_image,
vil3d_image_view< T > &  dest_image,
double  x0,
double  y0,
double  z0,
double  dx1,
double  dy1,
double  dz1,
double  dx2,
double  dy2,
double  dz2,
double  dx3,
double  dy3,
double  dz3,
int  n1,
int  n2,
int  n3 
)

Sample grid of points in one image and place in another, using tricubic interpolation.

dest_image(i,j,k,p) is sampled from the src_image at (x0+i.dx1+j.dx2+k.dx3, y0+i.dy1+j.dy2+k.dy3, z0+i.dz1+j.dz2+k.dz3), where i=[0..n1-1], j=[0..n2-1], k=[0..n3-1] dest_image resized to (n1,n2,n3,src_image.nplanes()) Points outside interpolatable return the trilinear interpolated value of the nearest valid pixels.

Definition at line 404 of file vil3d_resample_tricubic.txx.

template<class S , class T >
void vil3d_resample_tricubic_edge_trilin_extend ( const vil3d_image_view< S > &  src_image,
vil3d_image_view< T > &  dest_image,
int  n1,
int  n2,
int  n3 
)

Sample grid of points in one image and place in another, using tricubic interpolation.

dest_image(i,j,k,p) is sampled from the src_image at (x0+i.dx1+j.dx2+k.dx3, y0+i.dy1+j.dy2+k.dy3, z0+i.dz1+j.dz2+k.dz3), where i=[0..n1-1], j=[0..n2-1], k=[0..n3-1] dest_image resized to (n1,n2,n3,src_image.nplanes()) Points outside interpolatable return the trilinear interpolated value of the nearest valid pixels.

Definition at line 485 of file vil3d_resample_tricubic.txx.

bool vil3dresample_tricub_corner_in_image ( double  x0,
double  y0,
double  z0,
const vil3d_image_view_base image 
) [inline]

Definition at line 16 of file vil3d_resample_tricubic.txx.