]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Base/ExtractPathFromMinimumSpanningTree.h
...
[FrontAlgorithms.git] / lib / fpa / Base / ExtractPathFromMinimumSpanningTree.h
1 #ifndef __FPA__BASE__EXTRACTPATHFROMMINIMUMSPANNINGTREE__H__
2 #define __FPA__BASE__EXTRACTPATHFROMMINIMUMSPANNINGTREE__H__
3
4 #include <set>
5 #include <itkProcessObject.h>
6 #include <cpExtensions/DataStructures/PolyLineParametricPath.h>
7
8 namespace fpa
9 {
10   namespace Base
11   {
12     /**
13      */
14     template< class T >
15     class ExtractPathFromMinimumSpanningTree
16       : public itk::ProcessObject
17     {
18     public:
19       typedef ExtractPathFromMinimumSpanningTree Self;
20       typedef itk::ProcessObject                 Superclass;
21       typedef itk::SmartPointer< Self >          Pointer;
22       typedef itk::SmartPointer< const Self >    ConstPointer;
23
24       typedef T                   TMinimumSpanningTree;
25       typedef typename T::TVertex TVertex;
26       typedef
27       cpExtensions::DataStructures::PolyLineParametricPath< TVertex::Dimension >
28       TPath;
29       typedef std::pair< TVertex, TVertex >    _TBranch;
30       typedef std::vector< _TBranch >          _TBranches;
31
32     public:
33       itkNewMacro( Self );
34       itkTypeMacro( ExtractPathFromMinimumSpanningTree, itk::ProcessObject );
35
36       itkGetConstMacro( Vertex0, TVertex );
37       itkGetConstMacro( Vertex1, TVertex );
38
39       itkSetMacro( Vertex0, TVertex );
40       itkSetMacro( Vertex1, TVertex );
41
42     public:
43       const T* GetInput( ) const;
44       void SetInput( const T* tree );
45
46       TPath* GetOutput( );
47
48     protected:
49       ExtractPathFromMinimumSpanningTree( );
50       virtual ~ExtractPathFromMinimumSpanningTree( );
51
52       virtual void GenerateData( ) ITK_OVERRIDE;
53
54     private:
55       // Purposely not implemented
56       ExtractPathFromMinimumSpanningTree( const Self& other );
57       Self& operator=( const Self& other );
58
59     protected:
60       TVertex m_Vertex0;
61       TVertex m_Vertex1;
62     };
63
64   } // ecapseman
65
66 } // ecapseman
67
68 #ifndef ITK_MANUAL_INSTANTIATION
69 #include <fpa/Base/ExtractPathFromMinimumSpanningTree.hxx>
70 #endif // ITK_MANUAL_INSTANTIATION
71
72 #endif // __FPA__BASE__EXTRACTPATHFROMMINIMUMSPANNINGTREE__H__
73
74 // eof - $RCSfile$