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;
46 TSeed( ) : IsUnified( false ) { }
48 typedef std::vector< TSeed > TSeeds;
56 // Hack to hide the fact that seed values need to be initialized
57 mutable TOutputValue Value;
61 bool operator()( const TNode& a, const TNode& b ) const
64 return( cmp( a.Vertex, b.Vertex ) );
67 typedef std::set< TNode, TNodeCompare > TNodes;
70 const TSeeds& GetSeeds( ) const;
72 virtual void AddSeed( const TVertex& seed );
73 virtual void AddSeed( const TPoint& seed );
74 virtual void ClearSeeds( );
77 SeedsInterface( itk::ProcessObject* filter );
78 virtual ~SeedsInterface( );
80 virtual TNodes _UnifySeeds( ) = 0;
81 virtual void _PrepareSeeds( TNodes& nodes ) = 0;
85 itk::ProcessObject* m_Filter;
92 #ifndef ITK_MANUAL_INSTANTIATION
93 # include <fpa/Base/SeedsInterface.hxx>
94 #endif // ITK_MANUAL_INSTANTIATION
96 #endif // __fpa__Base__SeedsInterface__h__