1 #ifndef __fpa__Base__MinimumSpanningTree__h__
2 #define __fpa__Base__MinimumSpanningTree__h__
4 #include <fpa/Config.h>
15 template< class _TVertex, class _TPath, class _TSuperclass >
16 class MinimumSpanningTree
20 typedef MinimumSpanningTree Self;
21 typedef _TSuperclass Superclass;
22 typedef itk::SmartPointer< Self > Pointer;
23 typedef itk::SmartPointer< const Self > ConstPointer;
25 typedef _TVertex TVertex;
27 typedef std::pair< _TVertex, bool > TCollision;
28 typedef std::vector< TCollision > TCollisionsRow;
29 typedef std::vector< TCollisionsRow > TCollisions;
32 typedef std::vector< unsigned long > _TRow;
33 typedef std::vector< _TRow > _TMatrix;
36 itkTypeMacro( MinimumSpanningTree, _TSuperclass );
39 const TCollisions& GetCollisions( ) const;
40 void SetCollisions( const TCollisions& collisions );
43 void AddSeed( const _TVertex& seed );
45 virtual _TVertex GetParent( const _TVertex& v ) const = 0;
46 virtual void SetParent( const _TVertex& v, const _TVertex& p ) = 0;
49 typename _TPath::Pointer& path, const _TVertex& a
52 typename _TPath::Pointer& path, const _TVertex& a, const _TVertex& b
56 MinimumSpanningTree( );
57 virtual ~MinimumSpanningTree( );
60 // Purposely not defined
61 MinimumSpanningTree( const Self& other );
62 Self& operator=( const Self& other );
65 TCollisions m_Collisions;
66 _TMatrix m_FrontPaths;
67 std::vector< _TVertex > m_Seeds;
74 #ifndef ITK_MANUAL_INSTANTIATION
75 # include <fpa/Base/MinimumSpanningTree.hxx>
76 #endif // ITK_MANUAL_INSTANTIATION
78 #endif // __fpa__Base__MinimumSpanningTree__h__