1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Base__Mori__h__
7 #define __fpa__Base__Mori__h__
11 #include <itkConceptChecking.h>
12 #include <itkFunctionBase.h>
13 #include <fpa/Base/Functors/RegionGrow/BinaryThreshold.h>
21 template< class _TAlgorithm >
27 typedef _TAlgorithm Superclass;
28 typedef itk::SmartPointer< Self > Pointer;
29 typedef itk::SmartPointer< const Self > ConstPointer;
31 typedef typename _TAlgorithm::TNode TNode;
32 typedef typename _TAlgorithm::TNodes TNodes;
33 typedef typename _TAlgorithm::TInputValue TInputValue;
34 typedef typename _TAlgorithm::TOutputValue TOutputValue;
35 typedef typename _TAlgorithm::TFrontId TFrontId;
36 typedef typename _TAlgorithm::TVertex TVertex;
38 typedef std::deque< TNode > TQueue;
39 typedef std::set< TInputValue > TThresholds;
40 typedef fpa::Base::Functors::RegionGrow::BinaryThreshold< TInputValue > TPredicate;
45 ( itk::Concept::IsUnsignedInteger< TOutputValue > )
48 itkGetConstMacro( InsideValue, TOutputValue );
49 itkSetMacro( InsideValue, TOutputValue );
52 virtual itk::ModifiedTimeType GetMTime( ) const override;
54 TOutputValue GetOutsideValue( ) const;
55 void SetOutsideValue( const TOutputValue& v );
57 void ClearThresholds( );
58 void AddThreshold( const TInputValue& thr );
60 const TInputValue& init,
61 const TInputValue& end,
62 unsigned long number_of_thresholds
69 virtual TOutputValue _ComputeOutputValue( const TNode& n ) override;
70 virtual void _QueueClear( ) override;
71 virtual TNode _QueuePop( ) override;
72 virtual void _QueuePush( const TNode& node ) override;
73 virtual unsigned long _QueueSize( ) const override;
74 virtual void _PrepareSeeds( TNodes& nodes ) override;
77 // Purposely not implemented.
78 Mori( const Self& other );
79 Self& operator=( const Self& other );
82 typename TPredicate::Pointer m_Predicate;
83 TThresholds m_Thresholds;
85 unsigned int m_CurrentQueue;
87 TOutputValue m_InsideValue;
95 #ifndef ITK_MANUAL_INSTANTIATION
96 # include <fpa/Base/Mori.hxx>
97 #endif // ITK_MANUAL_INSTANTIATION
100 #endif // __fpa__Base__Mori__h__