1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Base__MarksInterface__h__
7 #define __fpa__Base__MarksInterface__h__
9 #include <itkProcessObject.h>
18 template< class _TVertex >
22 typedef _TVertex TVertex;
23 typedef MarksInterface Self;
25 // Minigraph to represent collisions
26 typedef std::pair< _TVertex, bool > TCollision;
27 typedef std::vector< TCollision > TCollisionsRow;
28 typedef std::vector< TCollisionsRow > TCollisions;
31 bool StopAtOneFront( ) const;
32 void StopAtOneFrontOn( );
33 void StopAtOneFrontOff( );
34 void SetStopAtOneFront( bool v );
37 MarksInterface( itk::ProcessObject* filter );
38 virtual ~MarksInterface( );
40 virtual bool _IsMarked( const TVertex& v ) const = 0;
41 virtual unsigned long _GetMark( const TVertex& v ) const = 0;
42 virtual void _Mark( const TVertex& v, unsigned long frontId ) = 0;
43 virtual void _FreeMarks( ) = 0;
45 virtual void _InitMarks( unsigned long nSeeds );
46 unsigned long _Collisions( const TVertex& a, const TVertex& b );
49 bool m_StopAtOneFront;
50 TCollisions m_Collisions;
51 unsigned int m_NumberOfFronts;
52 unsigned int m_NumberOfSeeds;
53 itk::ProcessObject* m_Filter;
60 #ifndef ITK_MANUAL_INSTANTIATION
61 # include <fpa/Base/MarksInterface.hxx>
62 #endif // ITK_MANUAL_INSTANTIATION
64 #endif // __fpa__Base__MarksInterface__h__