1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Base__SeedsInterface__h__
7 #define __fpa__Base__SeedsInterface__h__
13 #include <itkConceptChecking.h>
14 #include <itkProcessObject.h>
22 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare = std::greater< _TVertex > >
28 ( itk::Concept::IsUnsignedInteger< _TFrontId > )
32 typedef _TVertex TVertex;
33 typedef _TPoint TPoint;
34 typedef _TInputValue TInputValue;
35 typedef _TOutputValue TOutputValue;
36 typedef _TFrontId TFrontId;
37 typedef _TCompare TCompare;
38 typedef SeedsInterface Self;
49 FrontId( TFrontId( 0 ) )
52 typedef std::vector< TSeed > TSeeds;
60 // Hack to hide the fact that seed values need to be initialized
61 mutable TOutputValue Value;
65 bool operator()( const TNode& a, const TNode& b ) const
68 return( cmp( a.Vertex, b.Vertex ) );
71 typedef std::set< TNode, TNodeCompare > TNodes;
74 const TSeeds& GetSeeds( ) const;
76 virtual void AddSeed( const TVertex& seed );
77 virtual void AddSeed( const TPoint& seed );
78 virtual void ClearSeeds( );
81 SeedsInterface( itk::ProcessObject* filter );
82 virtual ~SeedsInterface( );
84 virtual TNodes _UnifySeeds( ) = 0;
85 virtual void _PrepareSeeds( TNodes& nodes ) = 0;
89 itk::ProcessObject* m_Filter;
96 #ifndef ITK_MANUAL_INSTANTIATION
97 # include <fpa/Base/SeedsInterface.hxx>
98 #endif // ITK_MANUAL_INSTANTIATION
100 #endif // __fpa__Base__SeedsInterface__h__