1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Base__SingleSeedInterface__h__
7 #define __fpa__Base__SingleSeedInterface__h__
9 #include <fpa/Config.h>
10 #include <itkConceptChecking.h>
11 #include <itkProcessObject.h>
19 template< class _TTraits >
20 class SingleSeedInterface
23 typedef SingleSeedInterface Self;
24 typedef _TTraits TTraits;
25 fpa_Base_TraitTypes( typename TTraits );
28 typedef _TVertex TVertex;
29 typedef _TPoint TPoint;
30 typedef _TInputValue TInputValue;
31 typedef _TOutputValue TOutputValue;
32 typedef _TFrontId TFrontId;
33 typedef _TCompare TCompare;
34 typedef SeedsInterface Self;
45 FrontId( TFrontId( 0 ) )
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;
73 ( itk::Concept::IsUnsignedInteger< _TFrontId > )
78 const TSeeds& GetSeeds( ) const;
80 virtual void SetSeed( const TVertex& seed );
81 virtual void SetSeed( const TPoint& seed );
84 SingleSeedInterface( itk::ProcessObject* filter );
85 virtual ~SingleSeedInterface( );
87 virtual TNodes _UnifySeeds( ) = 0;
88 virtual void _PrepareSeeds( TNodes& nodes ) = 0;
92 itk::ProcessObject* m_Filter;
99 #ifndef ITK_MANUAL_INSTANTIATION
100 # include <fpa/Base/SingleSeedInterface.hxx>
101 #endif // ITK_MANUAL_INSTANTIATION
103 #endif // __fpa__Base__SingleSeedInterface__h__