]> 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 <fpa/DataStructures/MinimumSpanningTree.h>
9 #include <itkImage.h>
10 #include <fpa/DataStructures/Image/PolyLineParametricPath.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::PolyLineParametricPath< _VDim > TPolyLineParametricPath;
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 GetPolyLineParametricPath(
52           typename TPolyLineParametricPath::Pointer& path,
53           const TVertex& a
54           ) const;
55         void GetPolyLineParametricPath(
56           typename TPolyLineParametricPath::Pointer& path,
57           const TVertex& a, const TVertex& b
58           ) const;
59
60       protected:
61         MinimumSpanningTree( );
62         virtual ~MinimumSpanningTree( );
63
64       private:
65         MinimumSpanningTree( const Self& other );
66         Self& operator=( const Self& other );
67       };
68
69     } // ecapseman
70
71   } // ecapseman
72
73 } // ecapseman
74
75 #ifndef ITK_MANUAL_INSTANTIATION
76 #  include <fpa/DataStructures/Image/MinimumSpanningTree.hxx>
77 #endif // ITK_MANUAL_INSTANTIATION
78 #endif // __fpa__DataStructures__Image__MinimumSpanningTree__h__
79
80 // eof - $RCSfile$