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