Defines | Functions
contrib/mul/vimt3d/vimt3d_sample_grid_trilin.txx File Reference

Profile sampling functions for 3D images. More...

#include "vimt3d_sample_grid_trilin.h"
#include <vil3d/vil3d_trilin_interp.h>
#include <vnl/vnl_vector.h>
#include <vgl/vgl_point_3d.h>
#include <vgl/vgl_vector_3d.h>

Go to the source code of this file.

Defines

#define vimt3d_sample_grid_trilin_txx_
#define VIMT3D_SAMPLE_GRID_TRILIN_INSTANTIATE(imType, vecType)

Functions

template<class T >
bool vimt3d_trilin_point_in_image (const vgl_point_3d< double > &p, const vil3d_image_view< T > &image)
 True if p clearly inside the image.
template<class T >
bool vimt3d_grid_in_image_ic (const vgl_point_3d< double > &im_p, const vgl_vector_3d< double > &im_u, const vgl_vector_3d< double > &im_v, const vgl_vector_3d< double > &im_w, unsigned nu, unsigned nv, unsigned nw, const vil3d_image_view< T > &image)
 True if grid of size nu * nv * nw (in steps of u,v,w) is entirely in the image.
template<class imType , class vecType >
void vimt3d_sample_grid_trilin (vnl_vector< vecType > &vec, const vimt3d_image_3d_of< imType > &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, unsigned nu, unsigned nv, unsigned nw)
 Sample grid p+i.u+j.v+k.w using trilinear interpolation in world coordinates.
template<class imType , class vecType >
void vimt3d_sample_grid_trilin_ic_no_checks (vnl_vector< vecType > &vec, const vil3d_image_view< imType > &image, const vgl_point_3d< double > &p0, const vgl_vector_3d< double > &u, const vgl_vector_3d< double > &v, const vgl_vector_3d< double > &w, unsigned nu, unsigned nv, unsigned nw)
 Sample grid p+i.u+j.v+k.w in image coordinates using trilinear interpolation with NO CHECKS.
template<class imType , class vecType >
void vimt3d_sample_grid_trilin_ic_safe (vnl_vector< vecType > &vec, const vil3d_image_view< imType > &image, const vgl_point_3d< double > &p0, const vgl_vector_3d< double > &u, const vgl_vector_3d< double > &v, const vgl_vector_3d< double > &w, unsigned nu, unsigned nv, unsigned nw)
 Sample grid p+i.u+j.v+k.w safely in image coordinates using trilinear interpolation.
template<class imType , class vecType >
void vimt3d_sample_grid_trilin_ic_extend (vnl_vector< vecType > &vec, const vil3d_image_view< imType > &image, const vgl_point_3d< double > &p0, const vgl_vector_3d< double > &u, const vgl_vector_3d< double > &v, const vgl_vector_3d< double > &w, unsigned nu, unsigned nv, unsigned nw)
 Sample grid p+i.u+j.v+k.w safely in image coordinates using trilinear interpolation.
template<class imType , class vecType >
void vimt3d_sample_grid_trilin_ic_edgena (vnl_vector< vecType > &vec, const vil3d_image_view< imType > &image, const vgl_point_3d< double > &p0, const vgl_vector_3d< double > &u, const vgl_vector_3d< double > &v, const vgl_vector_3d< double > &w, unsigned nu, unsigned nv, unsigned nw)
 Sample grid p+i.u+j.v+k.w safely in image coordinates using trilinear interpolation.
template<class imType , class vecType >
void vimt3d_sample_grid_trilin_extend (vnl_vector< vecType > &vec, const vimt3d_image_3d_of< imType > &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, unsigned nu, unsigned nv, unsigned nw)
 Sample grid p+i.u+j.v+k.w using trilinear interpolation in world coordinates.
template<class imType , class vecType >
void vimt3d_sample_grid_trilin_edgena (vnl_vector< vecType > &vec, const vimt3d_image_3d_of< imType > &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, unsigned nu, unsigned nv, unsigned nw)
 Sample grid p+i.u+j.v+k.w using trilinear interpolation in world coordinates.
template<class imType , class vecType >
void vimt3d_sample_grid_trilin_ic (vnl_vector< vecType > &vec, const vil3d_image_view< imType > &image, const vgl_point_3d< double > &im_p, const vgl_vector_3d< double > &im_u, const vgl_vector_3d< double > &im_v, const vgl_vector_3d< double > &im_w, unsigned nu, unsigned nv, unsigned nw)
 Sample grid p+i.u+j.v+k.w using trilinear interpolation in image coordinates.

Detailed Description

Profile sampling functions for 3D images.

Author:
Graham Vincent

Definition in file vimt3d_sample_grid_trilin.txx.


Define Documentation

#define VIMT3D_SAMPLE_GRID_TRILIN_INSTANTIATE (   imType,
  vecType 
)

Definition at line 422 of file vimt3d_sample_grid_trilin.txx.

#define vimt3d_sample_grid_trilin_txx_

Definition at line 3 of file vimt3d_sample_grid_trilin.txx.


Function Documentation

template<class T >
bool vimt3d_grid_in_image_ic ( const vgl_point_3d< double > &  im_p,
const vgl_vector_3d< double > &  im_u,
const vgl_vector_3d< double > &  im_v,
const vgl_vector_3d< double > &  im_w,
unsigned  nu,
unsigned  nv,
unsigned  nw,
const vil3d_image_view< T > &  image 
) [inline]

True if grid of size nu * nv * nw (in steps of u,v,w) is entirely in the image.

p defines centre of one size.

Definition at line 32 of file vimt3d_sample_grid_trilin.txx.

template<class imType , class vecType >
void vimt3d_sample_grid_trilin ( vnl_vector< vecType > &  vec,
const vimt3d_image_3d_of< imType > &  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,
unsigned  nu,
unsigned  nv,
unsigned  nw 
)

Sample grid p+i.u+j.v+k.w using trilinear interpolation in world coordinates.

Profile points are p+i.u+j.v+k.w, where i=[0..nu-1],j=[0..nv-1], k=[0..nw-1] Vector v is resized to nu*nv*nw*np elements, where np=image.n_planes(). v[0]..v[np-1] are the values from point p. Samples are taken along direction w first. Samples outside the image are set to 0.

Definition at line 62 of file vimt3d_sample_grid_trilin.txx.

template<class imType , class vecType >
void vimt3d_sample_grid_trilin_edgena ( vnl_vector< vecType > &  vec,
const vimt3d_image_3d_of< imType > &  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,
unsigned  nu,
unsigned  nv,
unsigned  nw 
)

Sample grid p+i.u+j.v+k.w using trilinear interpolation in world coordinates.

Profile points are p+i.u+j.v+k.w, where i=[0..nu-1],j=[0..nv-1], k=[0..nw-1] Vector v is resized to nu*nv*nw*np elements, where np=image.n_planes(). v[0]..v[np-1] are the values from point p. Samples are taken along direction w first. Samples outside the image are set to the value of the nearest voxel's value.

Definition at line 374 of file vimt3d_sample_grid_trilin.txx.

template<class imType , class vecType >
void vimt3d_sample_grid_trilin_extend ( vnl_vector< vecType > &  vec,
const vimt3d_image_3d_of< imType > &  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,
unsigned  nu,
unsigned  nv,
unsigned  nw 
)

Sample grid p+i.u+j.v+k.w using trilinear interpolation in world coordinates.

Profile points are p+i.u+j.v+k.w, where i=[0..nu-1],j=[0..nv-1], k=[0..nw-1] Vector v is resized to nu*nv*nw*np elements, where np=image.n_planes(). v[0]..v[np-1] are the values from point p. Samples are taken along direction w first. Samples outside the image are set to the value of the nearest voxel's value.

Definition at line 342 of file vimt3d_sample_grid_trilin.txx.

template<class imType , class vecType >
void vimt3d_sample_grid_trilin_ic ( vnl_vector< vecType > &  vec,
const vil3d_image_view< imType > &  image,
const vgl_point_3d< double > &  im_p,
const vgl_vector_3d< double > &  im_u,
const vgl_vector_3d< double > &  im_v,
const vgl_vector_3d< double > &  im_w,
unsigned  nu,
unsigned  nv,
unsigned  nw 
)

Sample grid p+i.u+j.v+k.w using trilinear interpolation in image coordinates.

Profile points are p+i.u+j.v+k.w, where i=[0..nu-1],j=[0..nv-1], k=[0..nw-1] Vector v is resized to nu*nv*nw*np elements, where np=image.n_planes(). v[0]..v[np-1] are the values from point p Samples are taken along direction w first. Samples outside the image are set to 0.

Definition at line 405 of file vimt3d_sample_grid_trilin.txx.

template<class imType , class vecType >
void vimt3d_sample_grid_trilin_ic_edgena ( vnl_vector< vecType > &  vec,
const vil3d_image_view< imType > &  image,
const vgl_point_3d< double > &  p0,
const vgl_vector_3d< double > &  u,
const vgl_vector_3d< double > &  v,
const vgl_vector_3d< double > &  w,
unsigned  nu,
unsigned  nv,
unsigned  nw 
) [inline]

Sample grid p+i.u+j.v+k.w safely in image coordinates using trilinear interpolation.

Profile points are p+i.u+j.v+k.w, where i=[0..nu-1],j=[0..nv-1], k=[0..nw-1] Vector v is resized to nu*nv*nw*np elements, where np=image.n_planes(). v[0]..v[np-1] are the values from point p Samples are taken along direction w first Points outside image are set to the nearest voxel's value.

Definition at line 278 of file vimt3d_sample_grid_trilin.txx.

template<class imType , class vecType >
void vimt3d_sample_grid_trilin_ic_extend ( vnl_vector< vecType > &  vec,
const vil3d_image_view< imType > &  image,
const vgl_point_3d< double > &  p0,
const vgl_vector_3d< double > &  u,
const vgl_vector_3d< double > &  v,
const vgl_vector_3d< double > &  w,
unsigned  nu,
unsigned  nv,
unsigned  nw 
) [inline]

Sample grid p+i.u+j.v+k.w safely in image coordinates using trilinear interpolation.

Profile points are p+i.u+j.v+k.w, where i=[0..nu-1],j=[0..nv-1], k=[0..nw-1] Vector v is resized to nu*nv*nw*np elements, where np=image.n_planes(). v[0]..v[np-1] are the values from point p Samples are taken along direction w first Points outside image are set to the nearest voxel's value.

Definition at line 214 of file vimt3d_sample_grid_trilin.txx.

template<class imType , class vecType >
void vimt3d_sample_grid_trilin_ic_no_checks ( vnl_vector< vecType > &  vec,
const vil3d_image_view< imType > &  image,
const vgl_point_3d< double > &  p0,
const vgl_vector_3d< double > &  u,
const vgl_vector_3d< double > &  v,
const vgl_vector_3d< double > &  w,
unsigned  nu,
unsigned  nv,
unsigned  nw 
) [inline]

Sample grid p+i.u+j.v+k.w in image coordinates using trilinear interpolation with NO CHECKS.

Profile points are p+i.u+j.v+k.w, where i=[0..nu-1],j=[0..nv-1], k=[0..nw-1] Vector v is resized to nu*nv*nw*np elements, where np=image.n_planes(). v[0]..v[np-1] are the values from point p Samples are taken along each image plane first, then direction w, then v, and u. Points outside image return zero.

Definition at line 90 of file vimt3d_sample_grid_trilin.txx.

template<class imType , class vecType >
void vimt3d_sample_grid_trilin_ic_safe ( vnl_vector< vecType > &  vec,
const vil3d_image_view< imType > &  image,
const vgl_point_3d< double > &  p0,
const vgl_vector_3d< double > &  u,
const vgl_vector_3d< double > &  v,
const vgl_vector_3d< double > &  w,
unsigned  nu,
unsigned  nv,
unsigned  nw 
) [inline]

Sample grid p+i.u+j.v+k.w safely in image coordinates using trilinear interpolation.

Profile points are p+i.u+j.v+k.w, where i=[0..nu-1],j=[0..nv-1], k=[0..nw-1] Vector v is resized to nu*nv*nw*np elements, where np=image.n_planes(). v[0]..v[np-1] are the values from point p Samples are taken along direction w first Points outside image return zero.

Definition at line 151 of file vimt3d_sample_grid_trilin.txx.

template<class T >
bool vimt3d_trilin_point_in_image ( const vgl_point_3d< double > &  p,
const vil3d_image_view< T > &  image 
) [inline]

True if p clearly inside the image.

Definition at line 18 of file vimt3d_sample_grid_trilin.txx.