ITK  4.13.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
itk::FastMarchingBase< TInput, TOutput > Class Template Referenceabstract

#include <itkFastMarchingBase.h>

+ Inheritance diagram for itk::FastMarchingBase< TInput, TOutput >:
+ Collaboration diagram for itk::FastMarchingBase< TInput, TOutput >:

Detailed Description

template<typename TInput, typename TOutput>
class itk::FastMarchingBase< TInput, TOutput >

Abstract class to solve an Eikonal based-equation using Fast Marching Method.

Fast marching solves an Eikonal equation where the speed is always non-negative and depends on the position only. Starting from an initial position on the front, fast marching systematically moves the front forward one node at a time.

Updates are preformed using an entropy satisfy scheme where only "upwind" neighborhoods are used. This implementation of Fast Marching uses a std::priority_queue to locate the next proper node to update.

Fast Marching sweeps through N points in (N log N) steps to obtain the arrival time value as the front propagates through the domain.

The initial front is specified by two containers:

In order for the filter to evolve, at least some trial nodes must be specified. These can for instance be specified as the layer of nodes around the alive ones.

The algorithm is terminated early by setting an appropriate stopping criterion, or if there are no more nodes to process.

Template Parameters
TTraitstraits which includes definition such as:
Todo:
In the current implementation, std::priority_queue only allows taking nodes out from the front and putting nodes in from the back. Use itk::PriorityQueueContainer instead.
Topology constraints:
Additional flexibiility in this class includes the implementation of topology constraints for image-based fast marching. Further details can be found in the paper

NJ Tustison, BA Avants, MF Siqueira, JC Gee. "Topological Well- Composedness and Glamorous Glue: A Digital Gluing Algorithm for Topologically Constrained Front Propagation, IEEE Transactions on Image Processing, 20(6):1756-1761, June 2011.

Essentially, one can constrain the propagating front(s) such that they either:

  1. don't merge (using the "Strict" option)
  2. don't create handles (using the "NoHandles" option)

Whereas the majority of related work uses the digital topological concept of "simple points" to constrain the evolving front, this filter uses the concept of "well-composedness". Advantages of the latter over the former includes being able to use the standard marching cubes algorithm to produce a mesh whose genus is identical to that of the evolved front(s).

See Also
FastMarchingStoppingCriterionBase

Definition at line 102 of file itkFastMarchingBase.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef Traits::InputDomainPointer InputDomainPointer
 
typedef Traits::InputDomainType InputDomainType
 
typedef Traits::InputPixelType InputPixelType
 
typedef Traits::LabelType LabelType
 
typedef
Traits::NodePairContainerConstIterator 
NodePairContainerConstIterator
 
typedef
Traits::NodePairContainerPointer 
NodePairContainerPointer
 
typedef
Traits::NodePairContainerType 
NodePairContainerType
 
typedef Traits::NodePairType NodePairType
 
typedef Traits::NodeType NodeType
 
typedef Traits::OutputDomainPointer OutputDomainPointer
 
typedef Traits::OutputDomainType OutputDomainType
 
typedef Traits::OutputPixelType OutputPixelType
 
typedef SmartPointer< SelfPointer
 
typedef FastMarchingBase Self
 
typedef
StoppingCriterionType::Pointer 
StoppingCriterionPointer
 
typedef
FastMarchingStoppingCriterionBase
< TInput, TOutput > 
StoppingCriterionType
 
typedef SuperclassType Superclass
 
typedef Traits::SuperclassType SuperclassType
 
enum  TopologyCheckType {
  Nothing = 0,
  NoHandles,
  Strict
}
 
typedef FastMarchingTraits
< TInput, TOutput > 
Traits
 

Public Member Functions

virtual StoppingCriterionTypeGetModifiableStoppingCriterion ()
 
virtual double GetNormalizationFactor ()
 
virtual double GetSpeedConstant ()
 
virtual const
StoppingCriterionType
GetStoppingCriterion () const
 
virtual OutputPixelType GetTargetReachedValue ()
 
virtual void SetCollectPoints (bool _arg)
 
virtual void SetNormalizationFactor (double _arg)
 
virtual void SetSpeedConstant (double _arg)
 
virtual void SetStoppingCriterion (StoppingCriterionType *_arg)
 
virtual void SetTopologyCheck (TopologyCheckType _arg)
 
virtual const TopologyCheckTypeGetTopologyCheck () const
 
virtual void SetTrialPoints (NodePairContainerType *_arg)
 
virtual NodePairContainerTypeGetModifiableTrialPoints ()
 
virtual const
NodePairContainerType
GetTrialPoints () const
 
virtual void SetAlivePoints (NodePairContainerType *_arg)
 
virtual NodePairContainerTypeGetModifiableAlivePoints ()
 
virtual const
NodePairContainerType
GetAlivePoints () const
 
virtual void SetProcessedPoints (NodePairContainerType *_arg)
 
virtual NodePairContainerTypeGetModifiableProcessedPoints ()
 
virtual const
NodePairContainerType
GetProcessedPoints () const
 
virtual void SetForbiddenPoints (NodePairContainerType *_arg)
 
virtual NodePairContainerTypeGetModifiableForbiddenPoints ()
 
virtual const
NodePairContainerType
GetForbiddenPoints () const
 
virtual const bool & GetCollectPoints () const
 
virtual void CollectPointsOn ()
 
virtual void CollectPointsOff ()
 

Protected Types

typedef std::vector< NodePairTypeHeapContainerType
 
typedef std::greater
< NodePairType
NodeComparerType
 
typedef std::priority_queue
< NodePairType,
HeapContainerType,
NodeComparerType
PriorityQueueType
 

Protected Member Functions

virtual bool CheckTopology (OutputDomainType *oDomain, const NodeType &iNode)=0
 
 FastMarchingBase ()
 
void GenerateData () override
 
virtual unsigned char GetLabelValueForGivenNode (const NodeType &iNode) const =0
 
virtual const OutputPixelType GetOutputValue (OutputDomainType *oDomain, const NodeType &iNode) const =0
 
virtual IdentifierType GetTotalNumberOfNodes () const =0
 
void Initialize (OutputDomainType *oDomain)
 
virtual void InitializeOutput (OutputDomainType *oDomain)=0
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetLabelValueForGivenNode (const NodeType &iNode, const LabelType &iLabel)=0
 
virtual void SetOutputValue (OutputDomainType *oDomain, const NodeType &iNode, const OutputPixelType &iValue)=0
 
virtual void UpdateNeighbors (OutputDomainType *oDomain, const NodeType &iNode)=0
 
virtual void UpdateValue (OutputDomainType *oDomain, const NodeType &iNode)=0
 
virtual ~FastMarchingBase () override
 

Protected Attributes

NodePairContainerPointer m_AlivePoints
 
bool m_CollectPoints
 
NodePairContainerPointer m_ForbiddenPoints
 
PriorityQueueType m_Heap
 
double m_InverseSpeed
 
OutputPixelType m_LargeValue
 
double m_NormalizationFactor
 
NodePairContainerPointer m_ProcessedPoints
 
double m_SpeedConstant
 
StoppingCriterionPointer m_StoppingCriterion
 
OutputPixelType m_TargetReachedValue
 
TopologyCheckType m_TopologyCheck
 
OutputPixelType m_TopologyValue
 
NodePairContainerPointer m_TrialPoints
 

Member Typedef Documentation

template<typename TInput , typename TOutput >
typedef SmartPointer< const Self > itk::FastMarchingBase< TInput, TOutput >::ConstPointer

Definition at line 112 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef std::vector< NodePairType > itk::FastMarchingBase< TInput, TOutput >::HeapContainerType
protected

Definition at line 244 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::InputDomainPointer itk::FastMarchingBase< TInput, TOutput >::InputDomainPointer

Definition at line 116 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::InputDomainType itk::FastMarchingBase< TInput, TOutput >::InputDomainType

Input Domain related definitions

Definition at line 115 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::InputPixelType itk::FastMarchingBase< TInput, TOutput >::InputPixelType

Definition at line 117 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::LabelType itk::FastMarchingBase< TInput, TOutput >::LabelType

Definition at line 134 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef std::greater< NodePairType > itk::FastMarchingBase< TInput, TOutput >::NodeComparerType
protected

Definition at line 245 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::NodePairContainerConstIterator itk::FastMarchingBase< TInput, TOutput >::NodePairContainerConstIterator

Definition at line 132 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::NodePairContainerPointer itk::FastMarchingBase< TInput, TOutput >::NodePairContainerPointer

Definition at line 130 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::NodePairContainerType itk::FastMarchingBase< TInput, TOutput >::NodePairContainerType

Definition at line 129 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::NodePairType itk::FastMarchingBase< TInput, TOutput >::NodePairType

NodePairType pair of node and corresponding value

Definition at line 128 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::NodeType itk::FastMarchingBase< TInput, TOutput >::NodeType

NodeType type of node

Definition at line 125 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::OutputDomainPointer itk::FastMarchingBase< TInput, TOutput >::OutputDomainPointer

Definition at line 121 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::OutputDomainType itk::FastMarchingBase< TInput, TOutput >::OutputDomainType

Output Domain related definitions

Definition at line 120 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::OutputPixelType itk::FastMarchingBase< TInput, TOutput >::OutputPixelType

Definition at line 122 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef SmartPointer< Self > itk::FastMarchingBase< TInput, TOutput >::Pointer

Definition at line 111 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef std::priority_queue< NodePairType, HeapContainerType, NodeComparerType > itk::FastMarchingBase< TInput, TOutput >::PriorityQueueType
protected

Definition at line 251 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef FastMarchingBase itk::FastMarchingBase< TInput, TOutput >::Self

Definition at line 109 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef StoppingCriterionType::Pointer itk::FastMarchingBase< TInput, TOutput >::StoppingCriterionPointer

Definition at line 138 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef FastMarchingStoppingCriterionBase< TInput, TOutput > itk::FastMarchingBase< TInput, TOutput >::StoppingCriterionType

StoppingCriterionType stopping criterion

Definition at line 137 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef SuperclassType itk::FastMarchingBase< TInput, TOutput >::Superclass

Definition at line 110 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef Traits::SuperclassType itk::FastMarchingBase< TInput, TOutput >::SuperclassType

Definition at line 106 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
typedef FastMarchingTraits<TInput, TOutput> itk::FastMarchingBase< TInput, TOutput >::Traits

Definition at line 105 of file itkFastMarchingBase.h.

Member Enumeration Documentation

template<typename TInput , typename TOutput >
enum itk::FastMarchingBase::TopologyCheckType
Enumerator
Nothing 

Nothing

NoHandles 

NoHandles

Strict 

Strict

Definition at line 155 of file itkFastMarchingBase.h.

Constructor & Destructor Documentation

template<typename TInput , typename TOutput >
itk::FastMarchingBase< TInput, TOutput >::FastMarchingBase ( )
protected

Constructor.

template<typename TInput , typename TOutput >
virtual itk::FastMarchingBase< TInput, TOutput >::~FastMarchingBase ( )
overrideprotectedvirtual

Destructor.

Member Function Documentation

template<typename TInput , typename TOutput >
virtual bool itk::FastMarchingBase< TInput, TOutput >::CheckTopology ( OutputDomainType oDomain,
const NodeType iNode 
)
protectedpure virtual

Check if the current node violate topological criterion.

Parameters
[in]oDomain
[in]iNode

Implemented in itk::FastMarchingImageFilterBase< TInput, TOutput >.

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::CollectPointsOff ( )
virtual

Get the Collect Points flag.

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::CollectPointsOn ( )
virtual

Get the Collect Points flag.

template<typename TInput , typename TOutput >
void itk::FastMarchingBase< TInput, TOutput >::GenerateData ( )
overrideprotected
template<typename TInput , typename TOutput >
virtual const NodePairContainerType* itk::FastMarchingBase< TInput, TOutput >::GetAlivePoints ( ) const
virtual

Set/Get AlivePoints

template<typename TInput , typename TOutput >
virtual const bool& itk::FastMarchingBase< TInput, TOutput >::GetCollectPoints ( ) const
virtual

Get the Collect Points flag.

template<typename TInput , typename TOutput >
virtual const NodePairContainerType* itk::FastMarchingBase< TInput, TOutput >::GetForbiddenPoints ( ) const
virtual

Set/Get ForbiddenPoints

template<typename TInput , typename TOutput >
virtual unsigned char itk::FastMarchingBase< TInput, TOutput >::GetLabelValueForGivenNode ( const NodeType iNode) const
protectedpure virtual

Get the LabelType Value for a given node.

Parameters
[in]iNode
Returns
its label value

Implemented in itk::FastMarchingImageFilterBase< TInput, TOutput >, and itk::FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput >.

template<typename TInput , typename TOutput >
virtual NodePairContainerType* itk::FastMarchingBase< TInput, TOutput >::GetModifiableAlivePoints ( )
virtual

Set/Get AlivePoints

template<typename TInput , typename TOutput >
virtual NodePairContainerType* itk::FastMarchingBase< TInput, TOutput >::GetModifiableForbiddenPoints ( )
virtual

Set/Get ForbiddenPoints

template<typename TInput , typename TOutput >
virtual NodePairContainerType* itk::FastMarchingBase< TInput, TOutput >::GetModifiableProcessedPoints ( )
virtual

Set/Get ProcessedPoints

template<typename TInput , typename TOutput >
virtual StoppingCriterionType* itk::FastMarchingBase< TInput, TOutput >::GetModifiableStoppingCriterion ( )
virtual
template<typename TInput , typename TOutput >
virtual NodePairContainerType* itk::FastMarchingBase< TInput, TOutput >::GetModifiableTrialPoints ( )
virtual

Set/Get TrialPoints

template<typename TInput , typename TOutput >
virtual double itk::FastMarchingBase< TInput, TOutput >::GetNormalizationFactor ( )
virtual

Set/Get NormalizationFactor.

template<typename TInput , typename TOutput >
virtual const OutputPixelType itk::FastMarchingBase< TInput, TOutput >::GetOutputValue ( OutputDomainType oDomain,
const NodeType iNode 
) const
protectedpure virtual

Get the output value (front value) for a given node.

Implemented in itk::FastMarchingImageFilterBase< TInput, TOutput >.

template<typename TInput , typename TOutput >
virtual const NodePairContainerType* itk::FastMarchingBase< TInput, TOutput >::GetProcessedPoints ( ) const
virtual

Set/Get ProcessedPoints

template<typename TInput , typename TOutput >
virtual double itk::FastMarchingBase< TInput, TOutput >::GetSpeedConstant ( )
virtual

Set/Get SpeedConstant.

template<typename TInput , typename TOutput >
virtual const StoppingCriterionType* itk::FastMarchingBase< TInput, TOutput >::GetStoppingCriterion ( ) const
virtual
template<typename TInput , typename TOutput >
virtual OutputPixelType itk::FastMarchingBase< TInput, TOutput >::GetTargetReachedValue ( )
virtual

Get the value reached by the front when it stops propagating.

template<typename TInput , typename TOutput >
virtual const TopologyCheckType& itk::FastMarchingBase< TInput, TOutput >::GetTopologyCheck ( ) const
virtual

Set/Get the TopologyCheckType macro indicating whether the user wants to check topology (and which one).

template<typename TInput , typename TOutput >
virtual IdentifierType itk::FastMarchingBase< TInput, TOutput >::GetTotalNumberOfNodes ( ) const
protectedpure virtual
template<typename TInput , typename TOutput >
virtual const NodePairContainerType* itk::FastMarchingBase< TInput, TOutput >::GetTrialPoints ( ) const
virtual

Set/Get TrialPoints

template<typename TInput , typename TOutput >
void itk::FastMarchingBase< TInput, TOutput >::Initialize ( OutputDomainType oDomain)
protected
template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::InitializeOutput ( OutputDomainType oDomain)
protectedpure virtual
template<typename TInput , typename TOutput >
void itk::FastMarchingBase< TInput, TOutput >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotected

PrintSelf method.

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetAlivePoints ( NodePairContainerType _arg)
virtual

Set/Get AlivePoints

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetCollectPoints ( bool  _arg)
virtual

Set the Collect Points flag. Instrument the algorithm to collect a container of all nodes which it has visited. Useful for creating Narrowbands for level set algorithms that supports narrow banding.

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetForbiddenPoints ( NodePairContainerType _arg)
virtual

Set/Get ForbiddenPoints

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetLabelValueForGivenNode ( const NodeType iNode,
const LabelType iLabel 
)
protectedpure virtual

Set the Label Value for a given node.

Parameters
[in]iNode
[in]iLabel

Implemented in itk::FastMarchingImageFilterBase< TInput, TOutput >, and itk::FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput >.

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetNormalizationFactor ( double  _arg)
virtual
template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetOutputValue ( OutputDomainType oDomain,
const NodeType iNode,
const OutputPixelType iValue 
)
protectedpure virtual

Set the output value (front value) for a given node.

Implemented in itk::FastMarchingImageFilterBase< TInput, TOutput >.

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetProcessedPoints ( NodePairContainerType _arg)
virtual

Set/Get ProcessedPoints

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetSpeedConstant ( double  _arg)
virtual
template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetStoppingCriterion ( StoppingCriterionType _arg)
virtual

Set/Get the Stopping Criterion.

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetTopologyCheck ( TopologyCheckType  _arg)
virtual

Set/Get the TopologyCheckType macro indicating whether the user wants to check topology (and which one).

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::SetTrialPoints ( NodePairContainerType _arg)
virtual

Set/Get TrialPoints

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::UpdateNeighbors ( OutputDomainType oDomain,
const NodeType iNode 
)
protectedpure virtual

Update neighbors to a given node.

Parameters
[in]oDomain
[in]iNode

Implemented in itk::FastMarchingImageFilterBase< TInput, TOutput >.

template<typename TInput , typename TOutput >
virtual void itk::FastMarchingBase< TInput, TOutput >::UpdateValue ( OutputDomainType oDomain,
const NodeType iNode 
)
protectedpure virtual

Update value for a given node.

Parameters
[in]oDomain
[in]iNode

Implemented in itk::FastMarchingImageFilterBase< TInput, TOutput >.

Member Data Documentation

template<typename TInput , typename TOutput >
NodePairContainerPointer itk::FastMarchingBase< TInput, TOutput >::m_AlivePoints
protected

Definition at line 237 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
bool itk::FastMarchingBase< TInput, TOutput >::m_CollectPoints
protected

Definition at line 241 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
NodePairContainerPointer itk::FastMarchingBase< TInput, TOutput >::m_ForbiddenPoints
protected

Definition at line 239 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
PriorityQueueType itk::FastMarchingBase< TInput, TOutput >::m_Heap
protected

Definition at line 253 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
double itk::FastMarchingBase< TInput, TOutput >::m_InverseSpeed
protected

Definition at line 229 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
OutputPixelType itk::FastMarchingBase< TInput, TOutput >::m_LargeValue
protected

Definition at line 233 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
double itk::FastMarchingBase< TInput, TOutput >::m_NormalizationFactor
protected

Definition at line 230 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
NodePairContainerPointer itk::FastMarchingBase< TInput, TOutput >::m_ProcessedPoints
protected

Definition at line 238 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
double itk::FastMarchingBase< TInput, TOutput >::m_SpeedConstant
protected

Definition at line 228 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
StoppingCriterionPointer itk::FastMarchingBase< TInput, TOutput >::m_StoppingCriterion
protected

Definition at line 226 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
OutputPixelType itk::FastMarchingBase< TInput, TOutput >::m_TargetReachedValue
protected

Definition at line 232 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
TopologyCheckType itk::FastMarchingBase< TInput, TOutput >::m_TopologyCheck
protected

Definition at line 255 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
OutputPixelType itk::FastMarchingBase< TInput, TOutput >::m_TopologyValue
protected

Definition at line 234 of file itkFastMarchingBase.h.

template<typename TInput , typename TOutput >
NodePairContainerPointer itk::FastMarchingBase< TInput, TOutput >::m_TrialPoints
protected

Definition at line 236 of file itkFastMarchingBase.h.


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