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

Reconstructs a sample vector into a grid (mirroring vimt3d_sample_grid_trilin) More...

#include <vimt3d/vimt3d_image_3d_of.h>
#include <vnl/vnl_fwd.h>
#include <vgl/vgl_fwd.h>
#include <vnl/vnl_math.h>
#include <vcl_cassert.h>

Go to the source code of this file.

Functions

template<class T >
void vimt3d_reconstruct_ic_safe (double val, double x, double y, double z, T *data, int ni, int nj, int nk, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep, vcl_ptrdiff_t zstep, bool add_data)
 Fill voxel which x,y,z is in with val.
template<class T >
void vimt3d_reconstruct_ic_no_checks (double val, double x, double y, double z, T *data, int ni, int nj, int nk, vcl_ptrdiff_t xstep, vcl_ptrdiff_t ystep, vcl_ptrdiff_t zstep, bool add_data)
 Fill voxel which x,y,z is in with val.
template<class imType , class vecType >
void vimt3d_reconstruct_from_grid (vimt3d_image_3d_of< imType > &image, const vnl_vector< vecType > &vec, 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 nu, int nv, int nw, bool add_data)
 Reconstruct a smoothed image grid p+i.u+j.v+k.w from vector (in world coordinates).
template<class imType , class vecType >
void vimt3d_reconstruct_from_grid_ic (vil3d_image_view< imType > &image, const vnl_vector< vecType > &vec, 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, int nu, int nv, int nw, bool add_data)
 Reconstruct a smoothed image grid p+i.u+j.v+k.w from vector (in image coordinates).

Detailed Description

Reconstructs a sample vector into a grid (mirroring vimt3d_sample_grid_trilin)

Author:
Graham Vincent

Definition in file vimt3d_reconstruct_from_grid.h.


Function Documentation

template<class imType , class vecType >
void vimt3d_reconstruct_from_grid ( vimt3d_image_3d_of< imType > &  image,
const vnl_vector< vecType > &  vec,
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  nu,
int  nv,
int  nw,
bool  add_data 
)

Reconstruct a smoothed image grid p+i.u+j.v+k.w from vector (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 Reconstruction occurs along direction w first

Parameters:
add_dataadds data to existing values

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 Reconstruction occurs along direction w first

Definition at line 55 of file vimt3d_reconstruct_from_grid.txx.

template<class imType , class vecType >
void vimt3d_reconstruct_from_grid_ic ( vil3d_image_view< imType > &  image,
const vnl_vector< vecType > &  vec,
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,
int  nu,
int  nv,
int  nw,
bool  add_data 
)

Reconstruct a smoothed image grid p+i.u+j.v+k.w from vector (in image coordinates).

Profile points are im_p+i.im_u+j.im_v+k.im_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 Reconstruction occurs along direction w first

Parameters:
add_dataadds data to existing values

Profile points are im_p+i.im_u+j.im_v+k.im_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 Reconstruction occurs along direction w first

Definition at line 82 of file vimt3d_reconstruct_from_grid.txx.

template<class T >
void vimt3d_reconstruct_ic_no_checks ( double  val,
double  x,
double  y,
double  z,
T *  data,
int  ni,
int  nj,
int  nk,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep,
vcl_ptrdiff_t  zstep,
bool  add_data 
) [inline]

Fill voxel which x,y,z is in with val.

Image is ni * nj * nk array of T. x,y,z element is data[z*zstep+y*ystep+x*xstep] No bound checks are made in release mode

Parameters:
valvalue at image coordinates x,y,z
add_dataadds data to existing values

Definition at line 58 of file vimt3d_reconstruct_from_grid.h.

template<class T >
void vimt3d_reconstruct_ic_safe ( double  val,
double  x,
double  y,
double  z,
T *  data,
int  ni,
int  nj,
int  nk,
vcl_ptrdiff_t  xstep,
vcl_ptrdiff_t  ystep,
vcl_ptrdiff_t  zstep,
bool  add_data 
) [inline]

Fill voxel which x,y,z is in with val.

Image is nx * ny * nz array of T. x,y,z element is data[z*zstep+ystep*y+x*xstep] Bound checks are made

Parameters:
valvalue at image coordinates x,y,z
add_dataadds data to existing values

Definition at line 21 of file vimt3d_reconstruct_from_grid.h.