ITK
4.8.0
Insight Segmentation and Registration Toolkit
|
#include <itkRegionBasedLevelSetFunction.h>
LevelSet function that computes a speed image based on regional integrals.
This class implements a level set function that computes the speed image by integrating values on the image domain.
Based on the paper:
"An active contour model without edges" T. Chan and L. Vese. In Scale-Space Theories in Computer Vision, pages 141-151, 1999.
This code was taken from the Insight Journal paper:
"Cell Tracking using Coupled Active Surfaces for Nuclei and Membranes" http://www.insight-journal.org/browse/publication/642 http://hdl.handle.net/10380/3055
That is based on the papers:
"Level Set Segmentation: Active Contours without edge" http://www.insight-journal.org/browse/publication/322 http://hdl.handle.net/1926/1532 and "Level set segmentation using coupled active surfaces" http://www.insight-journal.org/browse/publication/323 http://hdl.handle.net/1926/1533
NOTE: The convention followed is inside of the level-set function is negative and outside is positive.
Definition at line 67 of file itkRegionBasedLevelSetFunction.h.
Classes | |
struct | GlobalDataStruct |
Static Public Attributes | |
static const unsigned int | ImageDimension = Superclass::ImageDimension |
Static Public Attributes inherited from itk::FiniteDifferenceFunction< TInput > | |
static const unsigned int | ImageDimension |
Static Protected Member Functions | |
static VectorType | InitializeZeroVectorConstant () |
Protected Attributes | |
ScalarValueType | m_AdvectionWeight |
ScalarValueType | m_AreaWeight |
OffsetValueType | m_Center |
ScalarValueType | m_CurvatureWeight |
HeavisideFunctionConstPointer | m_DomainFunction |
FeatureImageConstPointer | m_FeatureImage |
unsigned int | m_FunctionId |
InputImageConstPointer | m_InitialImage |
double | m_InvSpacing [itkGetStaticConstMacro(ImageDimension)] |
ScalarValueType | m_Lambda1 |
ScalarValueType | m_Lambda2 |
ScalarValueType | m_OverlapPenaltyWeight |
ScalarValueType | m_ReinitializationSmoothingWeight |
SharedDataPointer | m_SharedData |
bool | m_UpdateC |
ScalarValueType | m_Volume |
ScalarValueType | m_VolumeMatchingWeight |
OffsetValueType | m_xStride [itkGetStaticConstMacro(ImageDimension)] |
std::slice | x_slice [itkGetStaticConstMacro(ImageDimension)] |
Protected Attributes inherited from itk::FiniteDifferenceFunction< TInput > | |
RadiusType | m_Radius |
PixelRealType | m_ScaleCoefficients [ImageDimension] |
Protected Attributes inherited from itk::LightObject | |
AtomicInt< int > | m_ReferenceCount |
Static Protected Attributes | |
static double | m_DT |
static double | m_WaveDT |
static VectorType | m_ZeroVectorConstant |
Private Member Functions | |
void | operator= (const Self &) |
RegionBasedLevelSetFunction (const Self &) | |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
typedef SmartPointer< const Self > itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::ConstPointer |
Definition at line 75 of file itkRegionBasedLevelSetFunction.h.
typedef FeatureImageType::ConstPointer itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::FeatureImageConstPointer |
Definition at line 139 of file itkRegionBasedLevelSetFunction.h.
typedef TFeature itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::FeatureImageType |
Definition at line 138 of file itkRegionBasedLevelSetFunction.h.
typedef FeatureImageType::IndexType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::FeatureIndexType |
Definition at line 141 of file itkRegionBasedLevelSetFunction.h.
typedef FeatureImageType::OffsetType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::FeatureOffsetType |
Definition at line 143 of file itkRegionBasedLevelSetFunction.h.
typedef FeatureImageType::PixelType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::FeaturePixelType |
Definition at line 140 of file itkRegionBasedLevelSetFunction.h.
typedef FeatureImageType::SpacingType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::FeatureSpacingType |
Definition at line 142 of file itkRegionBasedLevelSetFunction.h.
typedef Superclass::FloatOffsetType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::FloatOffsetType |
Definition at line 92 of file itkRegionBasedLevelSetFunction.h.
typedef HeavisideFunctionType::ConstPointer itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::HeavisideFunctionConstPointer |
Definition at line 149 of file itkRegionBasedLevelSetFunction.h.
typedef HeavisideStepFunctionBase< InputPixelType, InputPixelType > itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::HeavisideFunctionType |
Definition at line 148 of file itkRegionBasedLevelSetFunction.h.
typedef Superclass::ImageType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::ImageType |
Definition at line 86 of file itkRegionBasedLevelSetFunction.h.
typedef InputImageType::ConstPointer itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::InputImageConstPointer |
Definition at line 128 of file itkRegionBasedLevelSetFunction.h.
typedef InputImageType::Pointer itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::InputImagePointer |
Definition at line 129 of file itkRegionBasedLevelSetFunction.h.
typedef TInput itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::InputImageType |
Definition at line 127 of file itkRegionBasedLevelSetFunction.h.
typedef InputImageType::IndexType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::InputIndexType |
Definition at line 131 of file itkRegionBasedLevelSetFunction.h.
typedef InputImageType::IndexValueType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::InputIndexValueType |
Definition at line 132 of file itkRegionBasedLevelSetFunction.h.
typedef InputImageType::PixelType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::InputPixelType |
Definition at line 130 of file itkRegionBasedLevelSetFunction.h.
typedef InputImageType::PointType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::InputPointType |
Definition at line 136 of file itkRegionBasedLevelSetFunction.h.
typedef InputImageType::RegionType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::InputRegionType |
Definition at line 135 of file itkRegionBasedLevelSetFunction.h.
typedef InputImageType::SizeType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::InputSizeType |
Definition at line 133 of file itkRegionBasedLevelSetFunction.h.
typedef InputImageType::SizeValueType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::InputSizeValueType |
Definition at line 134 of file itkRegionBasedLevelSetFunction.h.
typedef Superclass::NeighborhoodScalesType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::NeighborhoodScalesType |
Definition at line 91 of file itkRegionBasedLevelSetFunction.h.
typedef Superclass::NeighborhoodType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::NeighborhoodType |
Definition at line 90 of file itkRegionBasedLevelSetFunction.h.
typedef Superclass::PixelType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::PixelType |
Definition at line 87 of file itkRegionBasedLevelSetFunction.h.
typedef SmartPointer< Self > itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::Pointer |
Definition at line 74 of file itkRegionBasedLevelSetFunction.h.
typedef Superclass::RadiusType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::RadiusType |
Definition at line 89 of file itkRegionBasedLevelSetFunction.h.
typedef PixelType itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::ScalarValueType |
Definition at line 88 of file itkRegionBasedLevelSetFunction.h.
typedef RegionBasedLevelSetFunction itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::Self |
Standard class typedefs.
Definition at line 72 of file itkRegionBasedLevelSetFunction.h.
typedef SharedDataType::Pointer itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::SharedDataPointer |
Definition at line 146 of file itkRegionBasedLevelSetFunction.h.
typedef TSharedData itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::SharedDataType |
Definition at line 145 of file itkRegionBasedLevelSetFunction.h.
typedef FiniteDifferenceFunction< TInput > itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::Superclass |
Definition at line 73 of file itkRegionBasedLevelSetFunction.h.
typedef double itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::TimeStepType |
Extract some parameters from the superclass.
Definition at line 82 of file itkRegionBasedLevelSetFunction.h.
typedef FixedArray< ScalarValueType, itkGetStaticConstMacro(ImageDimension) > itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::VectorType |
Definition at line 94 of file itkRegionBasedLevelSetFunction.h.
|
protected |
|
inlineprotectedvirtual |
Definition at line 311 of file itkRegionBasedLevelSetFunction.h.
|
private |
|
inlinevirtual |
Advection field. Default implementation returns a vector of zeros.
Definition at line 213 of file itkRegionBasedLevelSetFunction.h.
|
inlinevirtual |
This method must be defined in a subclass to implement a working function object. This method is called before the solver begins its work to produce the speed image used as the level set function's Advection field term. See LevelSetFunction for more information.
Definition at line 306 of file itkRegionBasedLevelSetFunction.h.
|
virtual |
|
protectedpure virtual |
|
protected |
Compute the global term as a combination of the internal, external, overlapping and volume regularization terms.
|
overridevirtual |
Computes the time step for an update given a global data structure. The data used in the computation may take different forms depending on the nature of the equations. This global data cannot be kept in the instance of the equation object itself since the equation object must remain stateless for thread safety. The global data is therefore managed for each thread by the finite difference solver filters.
Implements itk::FiniteDifferenceFunction< TInput >.
|
protected |
Compute Hessian Matrix.
|
protected |
|
protectedpure virtual |
|
protected |
Compute the laplacian term.
|
protectedpure virtual |
Compute the overlap term.
[in] | featIndex | |
[out] | pr | = |
|
protectedpure virtual |
Compute Parameters for the inner and outer parts.
Implemented in itk::ScalarChanAndVeseLevelSetFunction< TInputImage, TFeatureImage, TSharedData >.
|
overridevirtual |
Compute the equation value.
Implements itk::FiniteDifferenceFunction< TInput >.
|
protected |
Compute the overlap term.
|
inlinevirtual |
Curvature speed can be used to spatially modify the effects of curvature . The default implementation returns one.
Definition at line 297 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Definition at line 254 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Nu. Area regularization values
Definition at line 220 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Gamma. Scales all curvature weight values
Definition at line 248 of file itkRegionBasedLevelSetFunction.h.
|
inlinevirtual |
Definition at line 199 of file itkRegionBasedLevelSetFunction.h.
|
inlineoverridevirtual |
Returns a pointer to a global data structure that is passed to this object from the solver at each calculation. The idea is that the solver holds the state of any global values needed to calculate the time step, while the equation object performs the actual calculations.
The global data should also be initialized in this method.
Implements itk::FiniteDifferenceFunction< TInput >.
Definition at line 183 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Lambda1. Internal intensity difference weight
Definition at line 227 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Lambda2. External intensity difference weight
Definition at line 234 of file itkRegionBasedLevelSetFunction.h.
|
virtual |
Run-time type information (and related methods)
Reimplemented from itk::FiniteDifferenceFunction< TInput >.
Reimplemented in itk::ScalarChanAndVeseLevelSetFunction< TInputImage, TFeatureImage, TSharedData >, and itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >.
|
inline |
Gamma. Overlap penalty
Definition at line 241 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Weight of the laplacian smoothing term
Definition at line 260 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Pixel Volume = Number of pixels inside the level-set
Definition at line 274 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Volume matching weight.
Definition at line 267 of file itkRegionBasedLevelSetFunction.h.
|
inlinevirtual |
Definition at line 156 of file itkRegionBasedLevelSetFunction.h.
|
staticprotected |
This method's only purpose is to initialize the zero vector constant.
|
inlinevirtual |
Laplacian smoothing speed can be used to spatially modify the effects of laplacian smoothing of the level set function.
Definition at line 290 of file itkRegionBasedLevelSetFunction.h.
|
private |
|
inlineoverridevirtual |
When the finite difference solver filter has finished using a global data pointer, it passes it to this method, which frees the memory.
The solver cannot free the memory because it does not know the type to which the pointer points.
Implements itk::FiniteDifferenceFunction< TInput >.
Definition at line 282 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Definition at line 252 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Nu. Area regularization values
Definition at line 218 of file itkRegionBasedLevelSetFunction.h.
|
inlinevirtual |
Gamma. Scales all curvature weight values
Definition at line 246 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Definition at line 151 of file itkRegionBasedLevelSetFunction.h.
|
inlinevirtual |
Definition at line 201 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Set function id.
Definition at line 279 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Definition at line 194 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Lambda1. Internal intensity difference weight
Definition at line 225 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Lambda2. External intensity difference weight
Definition at line 232 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Gamma. Overlap penalty
Definition at line 239 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Weight of the laplacian smoothing term
Definition at line 258 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Definition at line 175 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Pixel Volume = Number of pixels inside the level-set
Definition at line 272 of file itkRegionBasedLevelSetFunction.h.
|
inline |
Volume matching weight.
Definition at line 265 of file itkRegionBasedLevelSetFunction.h.
void itk::RegionBasedLevelSetFunction< TInput, TFeature, TSharedData >::UpdateSharedData | ( | bool | forceUpdate | ) |
|
protectedpure virtual |
Update and save the inner and outer parameters in the shared data structure.
Implemented in itk::ScalarChanAndVeseLevelSetFunction< TInputImage, TFeatureImage, TSharedData >.
|
static |
|
protected |
|
protected |
Area regularization weight
Definition at line 324 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::GetAreaWeight(), and itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetAreaWeight().
|
protected |
Definition at line 352 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::Initialize().
|
protected |
Curvature Regularization Weight
Definition at line 342 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::GetCurvatureWeight(), and itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetCurvatureWeight().
|
protected |
Definition at line 321 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetDomainFunction().
|
staticprotected |
Definition at line 357 of file itkRegionBasedLevelSetFunction.h.
|
protected |
The feature image
Definition at line 317 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::GetFeatureImage(), and itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetFeatureImage().
|
protected |
Definition at line 349 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetFunctionId().
|
protected |
The initial level set image
Definition at line 314 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetInitialImage().
|
protected |
Definition at line 354 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetFeatureImage().
|
protected |
Internal functional of the level set weight
Definition at line 327 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::GetLambda1(), and itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetLambda1().
|
protected |
External functional of the level set weight
Definition at line 330 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::GetLambda2(), and itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetLambda2().
|
protected |
Overlap Penalty Weight
Definition at line 333 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::GetOverlapPenaltyWeight(), and itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetOverlapPenaltyWeight().
|
protected |
Laplacian Regularization Weight
Definition at line 347 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::GetReinitializationSmoothingWeight(), and itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetReinitializationSmoothingWeight().
|
protected |
Definition at line 319 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetSharedData().
|
protected |
Definition at line 418 of file itkRegionBasedLevelSetFunction.h.
|
protected |
Volume Constraint in pixels
Definition at line 339 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::GetVolume(), and itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetVolume().
|
protected |
Volume Regularization Weight
Definition at line 336 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::GetVolumeMatchingWeight(), and itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SetVolumeMatchingWeight().
|
staticprotected |
Definition at line 356 of file itkRegionBasedLevelSetFunction.h.
|
protected |
Definition at line 353 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::Initialize().
|
staticprotected |
Zero vector constant.
Definition at line 425 of file itkRegionBasedLevelSetFunction.h.
Referenced by itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::AdvectionField().
|
protected |
Definition at line 351 of file itkRegionBasedLevelSetFunction.h.