Functions

OpenTissue::grid::chan_vese Namespace Reference

Functions

template<typename grid_type_in , typename image_grid_type , typename real_type , typename grid_type_out >
real_type update (grid_type_in const &phi, image_grid_type const &U, typename image_grid_type::value_type const &C_in, typename image_grid_type::value_type const &C_out, real_type const &lambda, real_type const &mu, real_type const &nu, real_type const &dt, grid_type_out &psi)
template<typename grid_type , typename image_grid_type >
image_grid_type::value_type compute_cin (grid_type const &phi, image_grid_type const &U)
template<typename grid_type , typename image_grid_type >
image_grid_type::value_type compute_cout (grid_type const &phi, image_grid_type const &U)
template<typename grid_type , typename real_type >
void compute_volume (grid_type const &phi, real_type &V)
template<typename grid_type , typename image_grid_type >
void threshold_initialize (image_grid_type const &U, typename image_grid_type::value_type const &min_value, typename image_grid_type::value_type const &max_value, grid_type &phi)

Function Documentation

template<typename grid_type , typename image_grid_type >
image_grid_type::value_type OpenTissue::grid::chan_vese::compute_cin ( grid_type const &  phi,
image_grid_type const &  U 
) [inline]

Compute C_in

Parameters:
phi Level set.
U An image.
Returns:
The mean image value of U in the region inside the zero level set of phi.
template<typename grid_type , typename image_grid_type >
image_grid_type::value_type OpenTissue::grid::chan_vese::compute_cout ( grid_type const &  phi,
image_grid_type const &  U 
) [inline]

Compute C_out

Parameters:
phi Level set.
U An image.
Returns:
The mean image value of U in the region outside the zero level set of phi.
template<typename grid_type , typename real_type >
void OpenTissue::grid::chan_vese::compute_volume ( grid_type const &  phi,
real_type V 
) [inline]

Compute Volume. Auxiliary method usefull for quick estimation of the volume of a segmented region represented by the zero level set.

Parameters:
phi Level set grid.
V Upon return contains the total volume of all voxels lying inside the zero levelset surface of phi.
template<typename grid_type , typename image_grid_type >
void OpenTissue::grid::chan_vese::threshold_initialize ( image_grid_type const &  U,
typename image_grid_type::value_type const &  min_value,
typename image_grid_type::value_type const &  max_value,
grid_type phi 
) [inline]

Initialize phi grid with threshold on image

Parameters:
U An image.
phi Level set to be initialized.
min_value Minimum treshold value for inside region.
max_value Maximum treshold value for inside region.
template<typename grid_type_in , typename image_grid_type , typename real_type , typename grid_type_out >
real_type OpenTissue::grid::chan_vese::update ( grid_type_in const &  phi,
image_grid_type const &  U,
typename image_grid_type::value_type const &  C_in,
typename image_grid_type::value_type const &  C_out,
real_type const &  lambda,
real_type const &  mu,
real_type const &  nu,
real_type const &  dt,
grid_type_out &  psi 
) [inline]

Update Phi level set. Applies the ``Chan-Vese'' speed-function to phi, result is returned in psi.

Parameters:
phi Input level set.
U Input image.
C_in Mean value of inside region. This is the mean value of the region that phi is supposed to enclose.
C_out Mean value of outside region. This is the mean value of the region that is supposed to lie outside phi.
lambda Weight of input/output regions (legal values 0..1) 0.5 means input and output are weighted equally.
mu Mean Curvature regularization (requires input level set to be close to signed distance grid)
nu Area (Well, it is really volume:-) regularization.
dt Time-step to use in update.
psi Output levelset. Note if input is a signed distance grid then output may not be a signed distance grid, thus you may need to redistance output levelset.
Returns:
Maximum change in value of level set during update. This is usefull for steady state testing.