1 #ifndef __fpa__Base__MinimumSpanningTree__h__
2 #define __fpa__Base__MinimumSpanningTree__h__
4 #include <fpa/Config.h>
16 template< class _TVertex, class _TSuperclass >
17 class MinimumSpanningTree
21 typedef MinimumSpanningTree Self;
22 typedef _TSuperclass Superclass;
23 typedef itk::SmartPointer< Self > Pointer;
24 typedef itk::SmartPointer< const Self > ConstPointer;
26 typedef _TVertex TVertex;
27 typedef std::deque< _TVertex > TVertices;
28 typedef std::pair< _TVertex, bool > TCollision;
29 typedef std::vector< TCollision > TCollisionsRow;
30 typedef std::vector< TCollisionsRow > TCollisions;
33 typedef std::vector< unsigned long > _TRow;
34 typedef std::vector< _TRow > _TMatrix;
37 itkTypeMacro( MinimumSpanningTree, _TSuperclass );
40 const TCollisions& GetCollisions( ) const;
41 void SetCollisions( const TCollisions& collisions );
44 void AddSeed( const _TVertex& seed );
46 virtual _TVertex GetParent( const _TVertex& v ) const = 0;
47 virtual void SetParent( const _TVertex& v, const _TVertex& p ) = 0;
49 virtual TVertices GetPath( const _TVertex& a ) const;
50 virtual TVertices GetPath( const _TVertex& a, const _TVertex& b ) const;
53 MinimumSpanningTree( );
54 virtual ~MinimumSpanningTree( );
57 // Purposely not defined
58 MinimumSpanningTree( const Self& other );
59 Self& operator=( const Self& other );
62 TCollisions m_Collisions;
63 _TMatrix m_FrontPaths;
71 #ifndef ITK_MANUAL_INSTANTIATION
72 # include <fpa/Base/MinimumSpanningTree.hxx>
73 #endif // ITK_MANUAL_INSTANTIATION
75 #endif // __fpa__Base__MinimumSpanningTree__h__