lsseg::ChanVeseForce Class Reference

This ForceGenerator creates a normal force field, that leads to a segmentation similar to the model proposed by Chan and Vese. More...

#include <ChanVeseForce.h>

Inheritance diagram for lsseg::ChanVeseForce:

lsseg::ForceGenerator List of all members.

Public Member Functions

 ChanVeseForce (const Image< double > *img)
 Constructor, taking a pointer to the image to be segmented.
virtual ~ChanVeseForce ()
virtual void init (const Image< double > *img, const Mask *mask)
 Initialize the ForceGenerator.
virtual void update (const LevelSetFunction &phi)
 Update the force field based on a given segmentation of an image.
virtual void force (LevelSetFunction &phi, const Mask *mask=0) const
 Get the complete normal force field as a LevelSetFunction.
virtual double force3D (int x, int y, int z) const
 Get the normal force value of a (x, y, z) location in the current normal force field.
virtual double force2D (int x, int y) const
 Get the normal force value of a (x, y) location in the current normal force field.
virtual double force (size_t ix) const
 Get the normal force value of a particular pixel, specified by its internal storage index.

Private Attributes

double mu_inside_
 average pixel value inside the Image's closed region, for the last segmentation
double mu_outside_
 average pixel value inside the Image's open region, for the last segmentation
const Image< double > *const img_
 pointer to the image to be segmented; specified in the constructor

Detailed Description

This ForceGenerator creates a normal force field, that leads to a segmentation similar to the model proposed by Chan and Vese.

This model seeks to minimize the Mumford-Shah functional by splitting the image into two regions where the pixel distribution is modeled by constant values for each region. It can be seen as the simplest model (in our setting, at least) that use a statistical model to describe each region. (The statistical model being, in our case, the average pixel value in each region). The relevant papers are [Chan99] and [Chan01]. Thomas Brox also gives a nice overview of this and other methods in [Brox05].

Definition at line 73 of file ChanVeseForce.h.


Constructor & Destructor Documentation

lsseg::ChanVeseForce::ChanVeseForce ( const Image< double > *  img  )  [inline]

Constructor, taking a pointer to the image to be segmented.

Definition at line 78 of file ChanVeseForce.h.

virtual lsseg::ChanVeseForce::~ChanVeseForce (  )  [inline, virtual]

Definition at line 83 of file ChanVeseForce.h.


Member Function Documentation

virtual double lsseg::ChanVeseForce::force ( size_t  ix  )  const [inline, virtual]

Get the normal force value of a particular pixel, specified by its internal storage index.

The internal storage index of any pixel can be found by applying the Image::indexOf() member function.

Implements lsseg::ForceGenerator.

Definition at line 158 of file ChanVeseForce.h.

virtual void lsseg::ChanVeseForce::force ( LevelSetFunction phi,
const Mask mask = 0 
) const [inline, virtual]

Get the complete normal force field as a LevelSetFunction.

Return values:
phi the LevelSetFunction which will, upon completion of the function, contain the force field currently contained in the ForceGenerator
Parameters:
mask (pointer to) an optional Mask that specifies which part(s) of the force field are active. (The inactive parts will not be filled into the LevelSetFunction $ \phi $). If this pointer is left at zero, the whole of the force field is considered to be active.

Implements lsseg::ForceGenerator.

Definition at line 115 of file ChanVeseForce.h.

virtual double lsseg::ChanVeseForce::force2D ( int  x,
int  y 
) const [inline, virtual]

Get the normal force value of a (x, y) location in the current normal force field.

Note:
for 3D images, z is here set to be 0. The method is not overloaded due to performance reasons. For true 3D fields, use the force3D() function instead.

Implements lsseg::ForceGenerator.

Definition at line 152 of file ChanVeseForce.h.

virtual double lsseg::ChanVeseForce::force3D ( int  x,
int  y,
int  z 
) const [inline, virtual]

Get the normal force value of a (x, y, z) location in the current normal force field.

Note:
The method is not overloaded due to performance reasons. If you want to get the normal force at a point in a 2D field, consider using the force2D() function instead, as this might be less expensive.

Implements lsseg::ForceGenerator.

Definition at line 146 of file ChanVeseForce.h.

virtual void lsseg::ChanVeseForce::init ( const Image< double > *  img,
const Mask mask 
) [inline, virtual]

Initialize the ForceGenerator.

Parameters:
img (pointer to) the image that the ForceGenerator should use to derive the force field (i.e. the Image to be segmented).
mask (pointer to) an optional Mask that specifies which part(s) of the image are active. (No forces will be computed for the inactive part(s) of an image). If this pointer is left at zero, the whole of img is considered to be active.

Implements lsseg::ForceGenerator.

Definition at line 85 of file ChanVeseForce.h.

virtual void lsseg::ChanVeseForce::update ( const LevelSetFunction phi  )  [inline, virtual]

Update the force field based on a given segmentation of an image.

Parameters:
phi this LevelSetFunction should be of the same shape as the Image that the ForceGenerator derives the force field from, and it specifies a segmentation of the Image. Taking this segmentation of the Image into consideration, the ForceGenerator computes the new force field.

Implements lsseg::ForceGenerator.

Definition at line 91 of file ChanVeseForce.h.


Member Data Documentation

const Image<double>* const lsseg::ChanVeseForce::img_ [private]

pointer to the image to be segmented; specified in the constructor

Definition at line 172 of file ChanVeseForce.h.

double lsseg::ChanVeseForce::mu_inside_ [private]

average pixel value inside the Image's closed region, for the last segmentation

Definition at line 168 of file ChanVeseForce.h.

double lsseg::ChanVeseForce::mu_outside_ [private]

average pixel value inside the Image's open region, for the last segmentation

Definition at line 170 of file ChanVeseForce.h.


The documentation for this class was generated from the following file:
Generated on Tue Nov 28 18:35:47 2006 for lsseg by  doxygen 1.4.7