]> 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 <itkPolyLineParametricPath.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 itk::PolyLineParametricPath< TVertex::Dimension > TPath;
27
28     public:
29       itkNewMacro( Self );
30       itkTypeMacro( ExtractPathFromMinimumSpanningTree, itk::ProcessObject );
31
32       itkGetConstMacro( Vertex0, TVertex );
33       itkGetConstMacro( Vertex1, TVertex );
34
35       itkSetMacro( Vertex0, TVertex );
36       itkSetMacro( Vertex1, TVertex );
37
38     public:
39       const T* GetInput( ) const;
40       void SetInput( const T* tree );
41
42       TPath* GetOutput( );
43
44     protected:
45       ExtractPathFromMinimumSpanningTree( );
46       virtual ~ExtractPathFromMinimumSpanningTree( );
47
48       virtual void GenerateData( );
49
50     private:
51       // Purposely not implemented
52       ExtractPathFromMinimumSpanningTree( const Self& other );
53       Self& operator=( const Self& other );
54
55     protected:
56       TVertex m_Vertex0;
57       TVertex m_Vertex1;
58     };
59
60   } // ecapseman
61
62 } // ecapseman
63
64 #ifndef ITK_MANUAL_INSTANTIATION
65 #include <fpa/Base/ExtractPathFromMinimumSpanningTree.hxx>
66 #endif // ITK_MANUAL_INSTANTIATION
67
68 #endif // __FPA__BASE__EXTRACTPATHFROMMINIMUMSPANNINGTREE__H__
69
70 // eof - $RCSfile$