]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/MinimumSpanningTree.h
4a4e0e62bbbc53ebbc4cd5830ca6ec1d005c144e
[FrontAlgorithms.git] / lib / fpa / Image / MinimumSpanningTree.h
1 #ifndef __fpa__Image__MinimumSpanningTree__h__
2 #define __fpa__Image__MinimumSpanningTree__h__
3
4 #include <fpa/Base/MinimumSpanningTree.h>
5 #include <cpExtensions/DataStructures/PolyLineParametricPath.h>
6 #include <itkImage.h>
7
8 namespace fpa
9 {
10   namespace Image
11   {
12     /**
13      */
14     template< unsigned int _VDim >
15     class MinimumSpanningTree
16       : public fpa::Base::MinimumSpanningTree< itk::Index< _VDim >, cpExtensions::DataStructures::PolyLineParametricPath< _VDim >, itk::Image< itk::Offset< _VDim >, _VDim > >
17     {
18     public:
19       typedef itk::Index< _VDim >                               TVertex;
20       typedef cpExtensions::DataStructures::PolyLineParametricPath< _VDim > TPath;
21       typedef itk::Offset< _VDim >                                     TOffset;
22       typedef itk::Image< TOffset, _VDim >                             TImage;
23       typedef fpa::Base::MinimumSpanningTree< TVertex, TPath, TImage > Superclass;
24       typedef MinimumSpanningTree                                      Self;
25       typedef itk::SmartPointer< Self >                                Pointer;
26       typedef itk::SmartPointer< const Self >                          ConstPointer;
27
28     public:
29       itkNewMacro( Self );
30       itkTypeMacro(
31         fpa::Image::MinimumSpanningTree, fpa::Base::MinimumSpanningTree
32         );
33
34     public:
35       virtual TVertex GetParent( const TVertex& v ) const fpa_OVERRIDE;
36       virtual void SetParent( const TVertex& v, const TVertex& p ) fpa_OVERRIDE;
37
38       virtual void GetPath(
39         typename TPath::Pointer& path, const TVertex& a
40         ) const fpa_OVERRIDE;
41       virtual void GetPath(
42         typename TPath::Pointer& path, const TVertex& a, const TVertex& b
43         ) const fpa_OVERRIDE;
44
45     protected:
46       MinimumSpanningTree( );
47       virtual ~MinimumSpanningTree( );
48
49     private:
50       // Purposely not defined
51       MinimumSpanningTree( const Self& other );
52       Self& operator=( const Self& other );
53     };
54
55   } // ecapseman
56
57 } // ecapseman
58
59 #ifndef ITK_MANUAL_INSTANTIATION
60 #  include <fpa/Image/MinimumSpanningTree.hxx>
61 #endif // ITK_MANUAL_INSTANTIATION
62
63 #endif // __fpa__Image__MinimumSpanningTree__h__
64
65 // eof - $RCSfile$