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