Functions
contrib/mul/vimt3d/vimt3d_resample_trilinear.h File Reference

Resample a 3D image by a different factor in each dimension. More...

#include <vgl/vgl_point_3d.h>
#include <vgl/vgl_vector_3d.h>
#include <vil3d/vil3d_image_view.h>
#include <vil3d/algo/vil3d_gauss_reduce.h>
#include <vil3d/vil3d_resample_trilinear.h>
#include <vimt3d/vimt3d_image_3d_of.h>

Go to the source code of this file.

Functions

template<class T >
void vimt3d_resample_trilinear_scale_2 (const vimt3d_image_3d_of< T > &src, vimt3d_image_3d_of< T > &dst)
 Resample a 3D image by a factor of 2 in each dimension.
template<class sType , class dType >
void vimt3d_resample_trilinear (const vimt3d_image_3d_of< sType > &src_image, vimt3d_image_3d_of< dType > &dest_image, const vgl_point_3d< double > &p, const vgl_vector_3d< double > &u, const vgl_vector_3d< double > &v, const vgl_vector_3d< double > &w, int n1, int n2, int n3, dType outval=0, double edge_tol=0)
 Sample grid of points in one image and place in another, using trilinear interpolation.
template<class sType , class dType >
void vimt3d_resample_trilin_edge_extend (const vimt3d_image_3d_of< sType > &src_image, vimt3d_image_3d_of< dType > &dest_image, const vgl_point_3d< double > &p, const vgl_vector_3d< double > &u, const vgl_vector_3d< double > &v, const vgl_vector_3d< double > &w, int ni, int nj, int nk)
 Sample grid of points in one image and place in another, using trilinear interpolation.
template<class sType , class dType >
void vimt3d_resample_trilin_smoothing_edge_extend (const vimt3d_image_3d_of< sType > &src_image, vimt3d_image_3d_of< dType > &dest_image, const vgl_point_3d< double > &p, const vgl_vector_3d< double > &u, const vgl_vector_3d< double > &v, const vgl_vector_3d< double > &w, int ni, int nj, int nk)
 Resample an image using appropriate smoothing if the resolution changes significantly.
template<class sType , class dType >
void vimt3d_resample_trilin_smoothing_edge_extend (const vimt3d_image_3d_of< sType > &src, vimt3d_image_3d_of< dType > &dest)
 Resample src, using the grid defined by dest.

Detailed Description

Resample a 3D image by a different factor in each dimension.

Author:
Kevin de Souza

Definition in file vimt3d_resample_trilinear.h.


Function Documentation

template<class sType , class dType >
void vimt3d_resample_trilin_edge_extend ( const vimt3d_image_3d_of< sType > &  src_image,
vimt3d_image_3d_of< dType > &  dest_image,
const vgl_point_3d< double > &  p,
const vgl_vector_3d< double > &  u,
const vgl_vector_3d< double > &  v,
const vgl_vector_3d< double > &  w,
int  ni,
int  nj,
int  nk 
) [inline]

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

dest_image(i,j,k,p) is sampled from the src_image at p+i.u+j.v+k.w, where i=[0..nk-1], j=[0..nj-1], k=[0..nk-1] in world co-ordinates.

dest_image resized to (ni,nj,nk,src_image.nplanes())

dest_image.world2im() set up so that the world co-ordinates in src and dest match

Points outside image return the value of the nearest valid pixel.

Definition at line 88 of file vimt3d_resample_trilinear.h.

template<class sType , class dType >
void vimt3d_resample_trilin_smoothing_edge_extend ( const vimt3d_image_3d_of< sType > &  src_image,
vimt3d_image_3d_of< dType > &  dest_image,
const vgl_point_3d< double > &  p,
const vgl_vector_3d< double > &  u,
const vgl_vector_3d< double > &  v,
const vgl_vector_3d< double > &  w,
int  ni,
int  nj,
int  nk 
) [inline]

Resample an image using appropriate smoothing if the resolution changes significantly.

dest_image(i,j,k,p) is sampled from the src_image at p+i.u+j.v+k.w, where i=[0..ni-1], j=[0..nj-1], k=[0..nk-1] in world co-ordinates.

dest_image resized to (ni,nj,nk,src_image.nplanes())

dest_image.world2im() set up so that the world co-ordinates in src and dest match

Points outside image return the value of the nearest valid pixel.

Definition at line 127 of file vimt3d_resample_trilinear.h.

template<class sType , class dType >
void vimt3d_resample_trilin_smoothing_edge_extend ( const vimt3d_image_3d_of< sType > &  src,
vimt3d_image_3d_of< dType > &  dest 
) [inline]

Resample src, using the grid defined by dest.

Smooths appropriately if the resolution changes significantly. dest(i,j,k,p) is sampled from src at the wc grid defined by the world co-ords of the pixel centres in dest.

dest is not resized, nor has its world2im transform modified.

Points outside src return the value of the nearest valid pixel.

Definition at line 173 of file vimt3d_resample_trilinear.h.

template<class sType , class dType >
void vimt3d_resample_trilinear ( const vimt3d_image_3d_of< sType > &  src_image,
vimt3d_image_3d_of< dType > &  dest_image,
const vgl_point_3d< double > &  p,
const vgl_vector_3d< double > &  u,
const vgl_vector_3d< double > &  v,
const vgl_vector_3d< double > &  w,
int  n1,
int  n2,
int  n3,
dType  outval = 0,
double  edge_tol = 0 
) [inline]

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

dest_image(i,j,k,p) is sampled from the src_image at p+i.u+j.v+k.w, where i=[0..n1-1], j=[0..n2-1], k=[0..n3-1] in world co-ordinates.

dest_image resized to (n1,n2,n3,src_image.nplanes())

dest_image.world2im() set up so that the world co-ordinates in src and dest match

Points outside image return zero or outval

Definition at line 44 of file vimt3d_resample_trilinear.h.

template<class T >
void vimt3d_resample_trilinear_scale_2 ( const vimt3d_image_3d_of< T > &  src,
vimt3d_image_3d_of< T > &  dst 
)

Resample a 3D image by a factor of 2 in each dimension.

dst_image has size 2*src.image().n?()-1 in each direction. Transform is modified by an appropriate scaling of 0.5 Interpolated values are truncated when the type T is smaller than double.

See also:
vil3d_resample_trilinear_scale_2()

Definition at line 22 of file vimt3d_resample_trilinear.h.