]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/DataStructures/Image/MinimumSpanningTree.h
...
[FrontAlgorithms.git] / lib / fpa / DataStructures / Image / MinimumSpanningTree.h
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __fpa__DataStructures__Image__MinimumSpanningTree__h__
6 #define __fpa__DataStructures__Image__MinimumSpanningTree__h__
7
8 #include <itkImage.h>
9 #include <fpa/DataStructures/MinimumSpanningTree.h>
10 #include <fpa/DataStructures/Image/Path.h>
11
12 namespace fpa
13 {
14   namespace DataStructures
15   {
16     namespace Image
17     {
18       /**
19        */
20       template< unsigned int _VDim >
21       class MinimumSpanningTree
22         : public fpa::DataStructures::MinimumSpanningTree< itk::Index< _VDim >, itk::Image< itk::Offset< _VDim >, _VDim > >
23       {
24       public:
25         typedef itk::Index< _VDim > TVertex;
26         typedef itk::Image< itk::Offset< _VDim >, _VDim > TDataStructuresImage;
27
28         typedef MinimumSpanningTree             Self;
29         typedef itk::SmartPointer< Self >       Pointer;
30         typedef itk::SmartPointer< const Self > ConstPointer;
31         typedef fpa::DataStructures::MinimumSpanningTree< TVertex, TDataStructuresImage > Superclass;
32
33         typedef typename Superclass::TCollision     TCollision;
34         typedef typename Superclass::TCollisionsRow TCollisionsRow;
35         typedef typename Superclass::TCollisions    TCollisions;
36         typedef typename Superclass::TVertices      TVertices;
37
38         typedef fpa::DataStructures::Image::Path< _VDim > TPath;
39
40       public:
41         itkNewMacro( Self );
42         itkTypeMacro(
43           fpa::DataStructures::Image::MinimumSpanningTree,
44           fpa::DataStructures::MinimumSpanningTree
45           );
46
47       public:
48         virtual TVertex GetParent( const TVertex& v ) const override;
49         virtual void SetParent( const TVertex& v, const TVertex& p ) override;
50
51         void GetPath( typename TPath::Pointer& path, const TVertex& a ) const;
52         void GetPath(
53           typename TPath::Pointer& path,
54           const TVertex& a, const TVertex& b
55           ) const;
56
57       protected:
58         MinimumSpanningTree( );
59         virtual ~MinimumSpanningTree( );
60
61       private:
62         MinimumSpanningTree( const Self& other );
63         Self& operator=( const Self& other );
64       };
65
66     } // ecapseman
67
68   } // ecapseman
69
70 } // ecapseman
71
72 #ifndef ITK_MANUAL_INSTANTIATION
73 #  include <fpa/DataStructures/Image/MinimumSpanningTree.hxx>
74 #endif // ITK_MANUAL_INSTANTIATION
75 #endif // __fpa__DataStructures__Image__MinimumSpanningTree__h__
76
77 // eof - $RCSfile$