19 #ifndef itkFastMarchingReachedTargetNodesStoppingCriterion_h 20 #define itkFastMarchingReachedTargetNodesStoppingCriterion_h 36 template<
typename TInput,
typename TOutput >
75 itkSetMacro( TargetOffset, OutputPixelType );
76 itkGetMacro( TargetOffset, OutputPixelType );
109 typename std::vector< NodeType >::const_iterator
111 typename std::vector< NodeType >::const_iterator
114 while( pointsIter != pointsEnd )
116 if ( *pointsIter == iNode )
146 return "Target Nodes Reached with possible overshoot";
184 m_NumberOfTargetsToBeReached = 1;
188 m_NumberOfTargetsToBeReached = m_TargetNodes.size();
190 if( m_NumberOfTargetsToBeReached < 1 )
193 <<
"Number of target nodes to be reached is null" );
195 if( m_NumberOfTargetsToBeReached > m_TargetNodes.size() )
198 <<
"Number of target nodes to be reached is above the provided number of target nodes" );
200 m_ReachedTargetNodes.clear();
203 m_Initialized =
true;
211 #endif // itkFastMarchingThresholdStoppingCriterion_h TargetConditionType m_TargetCondition
std::vector< NodeType > m_TargetNodes
SmartPointer< const Self > ConstPointer
void SetCurrentNode(const NodeType &iNode) override
Set the current node.
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
vcl_size_t m_NumberOfTargetsToBeReached
void SetTargetCondition(const TargetConditionType &iCondition)
FastMarchingTraits< TInput, TOutput > Traits
Traits::NodeType NodeType
Traits::OutputPixelType OutputPixelType
bool IsSatisfied() const override
returns if the stopping condition is satisfied or not.
virtual void Modified() const
Superclass::Traits Traits
std::string GetDescription() const override
Get a short description of the stopping criterion.
FastMarchingReachedTargetNodesStoppingCriterion Self
~FastMarchingReachedTargetNodesStoppingCriterion()
FastMarchingReachedTargetNodesStoppingCriterion()
OutputPixelType m_CurrentValue
Superclass::NodeType NodeType
void operator=(const Self &)
FastMarchingStoppingCriterionBase< TInput, TOutput > Superclass
Abstract Stopping Criterion dedicated for Fast Marching Methods.
Define additional traits for native types such as int or float.
OutputPixelType m_StoppingValue
Stopping criterion for FastMarchingFilterBase.
void SetNumberOfTargetsToBeReached(const vcl_size_t &iN)
Set the number of target nodes to be reached.
virtual void SetTargetNodes(const std::vector< NodeType > &iNodes)
Set Target Nodes.
std::vector< NodeType > m_ReachedTargetNodes
OutputPixelType m_TargetOffset
Superclass::OutputPixelType OutputPixelType