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_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_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_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 sampling functions for 3D images.
Definition in file vimt3d_sample_grid_trilin.txx.
| #define VIMT3D_SAMPLE_GRID_TRILIN_INSTANTIATE | ( | imType, | |
| vecType | |||
| ) |
template 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); \ template 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); \ template 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)
Definition at line 327 of file vimt3d_sample_grid_trilin.txx.
| #define vimt3d_sample_grid_trilin_txx_ |
Definition at line 3 of file vimt3d_sample_grid_trilin.txx.
| 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 31 of file vimt3d_sample_grid_trilin.txx.
| bool vimt3d_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 17 of file vimt3d_sample_grid_trilin.txx.
| 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 61 of file vimt3d_sample_grid_trilin.txx.
| 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 278 of file vimt3d_sample_grid_trilin.txx.
| 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 310 of file vimt3d_sample_grid_trilin.txx.
| 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 213 of file vimt3d_sample_grid_trilin.txx.
| 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 direction w first Points outside image return zero.
Definition at line 89 of file vimt3d_sample_grid_trilin.txx.
| 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 150 of file vimt3d_sample_grid_trilin.txx.
1.7.5.1