1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Base__MarksInterfaceWithCollisions__h__
7 #define __fpa__Base__MarksInterfaceWithCollisions__h__
9 #include <fpa/Base/MarksInterface.h>
19 template< class _TVertex >
20 class MarksInterfaceWithCollisions
21 : public fpa::Base::MarksInterface< _TVertex >
24 typedef _TVertex TVertex;
25 typedef MarksInterfaceWithCollisions Self;
26 typedef fpa::Base::MarksInterface< TVertex > Superclass;
28 // Minigraph to represent collisions
29 typedef std::pair< TVertex, bool > TCollision;
30 typedef std::vector< TCollision > TCollisionsRow;
31 typedef std::vector< TCollisionsRow > TCollisions;
34 bool StopAtOneFront( ) const;
35 void StopAtOneFrontOn( );
36 void StopAtOneFrontOff( );
37 void SetStopAtOneFront( bool v );
40 MarksInterfaceWithCollisions( itk::ProcessObject* filter );
41 virtual ~MarksInterfaceWithCollisions( );
43 virtual void _InitMarks( unsigned long nSeeds ) override;
44 virtual bool _Collisions( const TVertex& a, const TVertex& b ) override;
47 bool m_StopAtOneFront;
48 TCollisions m_Collisions;
49 unsigned int m_NumberOfFronts;
56 #ifndef ITK_MANUAL_INSTANTIATION
57 # include <fpa/Base/MarksInterfaceWithCollisions.hxx>
58 #endif // ITK_MANUAL_INSTANTIATION
60 #endif // __fpa__Base__MarksInterfaceWithCollisions__h__