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