lsseg::ForceGenerator Class Reference

This is the abstract base class for the generators that define the normal force driving the evolution of a Region's LevelSetFunction. More...

#include <ForceGenerator.h>

Inheritance diagram for lsseg::ForceGenerator:

lsseg::ChanVeseForce lsseg::ConstantForce lsseg::MRBalloonForce lsseg::NormalDistributionForce lsseg::ParzenDistributionForce List of all members.

Public Member Functions

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

Detailed Description

This is the abstract base class for the generators that define the normal force driving the evolution of a Region's LevelSetFunction.

The role of a ForceGenerator is to generate a field of forces acting normally on the constant-value curves (including zero-set curves) of a level-set function. The basis for generating this normal force field is the image to be segmented, as well as the current state of segmentation for the image. The normal force as defined by the ForceGenerator is expressed as a scalar value at each pixel of the image, expressing the magnitude of the normal force acting at the level-set at that location. These values are then used to evolve the curve given timestep.

Read the How Segmentation in LSSEG Works for a more comprehensive explanation of the role ForceGenerators play in in this library's segmentation functionally.

Definition at line 74 of file ForceGenerator.h.


Constructor & Destructor Documentation

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

virtual destructor

Definition at line 79 of file ForceGenerator.h.


Member Function Documentation

virtual void lsseg::ForceGenerator::force ( LevelSetFunction phi,
const Mask mask 
) const [pure 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.

Implemented in lsseg::ChanVeseForce, lsseg::ConstantForce, lsseg::MRBalloonForce, lsseg::NormalDistributionForce, and lsseg::ParzenDistributionForce.

virtual double lsseg::ForceGenerator::force ( size_t  ix  )  const [pure 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.

Implemented in lsseg::ChanVeseForce, lsseg::ConstantForce, lsseg::MRBalloonForce, lsseg::NormalDistributionForce, and lsseg::ParzenDistributionForce.

virtual double lsseg::ForceGenerator::force2D ( int  x,
int  y 
) const [pure 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.

Implemented in lsseg::ChanVeseForce, lsseg::ConstantForce, lsseg::MRBalloonForce, lsseg::NormalDistributionForce, and lsseg::ParzenDistributionForce.

virtual double lsseg::ForceGenerator::force3D ( int  x,
int  y,
int  z 
) const [pure 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.

Implemented in lsseg::ChanVeseForce, lsseg::ConstantForce, lsseg::MRBalloonForce, lsseg::NormalDistributionForce, and lsseg::ParzenDistributionForce.

virtual void lsseg::ForceGenerator::init ( const Image< double > *  img,
const Mask mask = 0 
) [pure 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.

Implemented in lsseg::ChanVeseForce, lsseg::ConstantForce, lsseg::MRBalloonForce, lsseg::NormalDistributionForce, and lsseg::ParzenDistributionForce.

virtual void lsseg::ForceGenerator::update ( const LevelSetFunction phi  )  [pure 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.

Implemented in lsseg::ChanVeseForce, lsseg::ConstantForce, lsseg::MRBalloonForce, lsseg::NormalDistributionForce, and lsseg::ParzenDistributionForce.


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