imaging::SnakesEnergy< shape_t > Class Template Reference
[Segmentation Module]

Snakes energy for arbitrary shape classes. More...

#include <SnakesEnergy.hpp>

Inheritance diagram for imaging::SnakesEnergy< shape_t >:

imaging::ShapeEnergyInterface< shape_t > imaging::EnergyInterface

List of all members.

Public Member Functions

template<class const_accessort_t>
 SnakesEnergy (const const_accessort_t &edge_map, const shape_t &initial_shape, float_t beta, std::size_t n_integration_points)
ublas::vector< float_t > & current_argument ()
const shape_t & current_shape () const
float_t current_energy () const
std::size_t dimension () const
void set_argument ()


Detailed Description

template<class shape_t>
class imaging::SnakesEnergy< shape_t >

Snakes energy for arbitrary shape classes.

This class template implements the Snakes functional for shapes of the type shape_t. The template parameter shape_t must implement ShapeInterface.

The Snakes functional reads as follows:

\[ I_\beta^{\textrm{Snakes}}(\gamma) = - \int_\gamma u(\gamma) d \tau + \beta \textrm{Length}(\gamma)\,. \]

Usually $u$ is chosen as

\[ u = | \nabla f |\,, \]

for an image $f$. Thus, $u$ contains the edges of $f$.

Upon construction a SnakesEnergy object is initialized to an Image $u$ and an initial shape $\mu$.

Then, the SnakesEnergy objects maps a vector $v$ to the corresponding energy as follows:

\[ v \mapsto I_\beta^{\textrm{Snakes}}\big(\textrm{Exp}_\mu(v)\big)\,. \]


Constructor & Destructor Documentation

template<class shape_t>
template<class const_accessort_t>
imaging::SnakesEnergy< shape_t >::SnakesEnergy ( const const_accessort_t &  edge_map,
const shape_t &  initial_shape,
float_t  beta,
std::size_t  n_integration_points 
) [inline]

Constructs a SnakesEnergy object. The first three arguments are explained in the class description. The parameter n_integration_points refers to the number of integration points when integrating along the shape boundary.


Member Function Documentation

template<class shape_t>
ublas::vector<float_t>& imaging::SnakesEnergy< shape_t >::current_argument (  )  [inline, virtual]

Access the current argument of the energy. In general the user should not resize the current argument!

Implements imaging::EnergyInterface.

template<class shape_t>
const shape_t& imaging::SnakesEnergy< shape_t >::current_shape (  )  const [inline, virtual]

Returns the current shape. This function should not actually compute the current shape but return the cached result of the last call to set_argument()!

Implements imaging::ShapeEnergyInterface< shape_t >.

template<class shape_t>
float_t imaging::SnakesEnergy< shape_t >::current_energy (  )  const [inline, virtual]

Returns the current energy. This function should not actually compute the current energy but return the cached result of the last call to set_argument()!

Implements imaging::EnergyInterface.

template<class shape_t>
std::size_t imaging::SnakesEnergy< shape_t >::dimension (  )  const [inline, virtual]

Returns the dimension the class expects as input data. The function current_argument() will return a vector of this dimension and the user should not change the size of this vector!

Implements imaging::EnergyInterface.

template<class shape_t>
void imaging::SnakesEnergy< shape_t >::set_argument (  )  [inline, virtual]

Compute the energy value corresponding to the current argument. This is where the main work of the energy evaluation should be done.

Implements imaging::EnergyInterface.


The documentation for this class was generated from the following file:

Generated on Tue Feb 10 10:01:31 2009 for imaging2 by  doxygen 1.5.5