]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Base/ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.h
eaabf5a3f271918d6b891b2ac974640eba3f2035
[FrontAlgorithms.git] / lib / fpa / Base / ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.h
1 #ifndef __FPA__BASE__EXTRACTENDPOINTSANDBIFURCATIONSFROMMINIMUMSPANNINGTREE__H__
2 #define __FPA__BASE__EXTRACTENDPOINTSANDBIFURCATIONSFROMMINIMUMSPANNINGTREE__H__
3
4 #include <vector>
5 #include <itkProcessObject.h>
6 #include <cpExtensions/DataStructures/ImageIndexesContainer.h>
7
8 namespace fpa
9 {
10   namespace Base
11   {
12     /**
13      */
14     template< class _TMST >
15     class ExtractEndPointsAndBifurcationsFromMinimumSpanningTree
16       : public itk::ProcessObject
17     {
18     public:
19       typedef ExtractEndPointsAndBifurcationsFromMinimumSpanningTree Self;
20       typedef itk::ProcessObject                                     Superclass;
21       typedef itk::SmartPointer< Self >                              Pointer;
22       typedef itk::SmartPointer< const Self >                        ConstPointer;
23
24       typedef _TMST  TMinimumSpanningTree;
25       typedef typename _TMST::TVertex TVertex;
26
27       typedef
28       cpExtensions::DataStructures::ImageIndexesContainer< TVertex::Dimension >
29       TVertices;
30
31     public:
32       itkTypeMacro(
33         ExtractEndPointsAndBifurcationsFromMinimumSpanningTree,
34         itk::ProcessObject
35         );
36
37     public:
38       const TMinimumSpanningTree* GetMinimumSpanningTree( );
39       void SetMinimumSpanningTree( TMinimumSpanningTree* mst );
40
41       TVertices* GetEndPoints( );
42       TVertices* GetBifurcations( );
43       TVertices* GetCollisions( );
44
45       virtual void Update( ) override
46         {
47           this->GenerateData( );
48         }
49
50     protected:
51       ExtractEndPointsAndBifurcationsFromMinimumSpanningTree( );
52       virtual ~ExtractEndPointsAndBifurcationsFromMinimumSpanningTree( );
53
54       virtual void GenerateData( ) override;
55
56       virtual void _MarkSkeleton(
57         const TVertex& v, const unsigned long& l
58         ) = 0;
59       virtual void _MarkSphere(
60         const TVertex& v,
61         const double& r,
62         const unsigned long& l
63         ) = 0;
64       virtual unsigned long _Mark( const TVertex& v ) = 0;
65       virtual unsigned long _SkeletonMark( const TVertex& v ) = 0;
66       virtual double _Radius( const TVertex& v ) = 0;
67
68       virtual void _Tmp( ) = 0;
69
70     private:
71       // Purposely not implemented
72       ExtractEndPointsAndBifurcationsFromMinimumSpanningTree( const Self& other );
73       Self& operator=( const Self& other );
74     };
75
76   } // ecapseman
77
78 } // ecapseman
79
80 #ifndef ITK_MANUAL_INSTANTIATION
81 #include <fpa/Base/ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.hxx>
82 #endif // ITK_MANUAL_INSTANTIATION
83
84 #endif // __FPA__BASE__EXTRACTENDPOINTSANDBIFURCATIONSFROMMINIMUMSPANNINGTREE__H__
85
86 // eof - $RCSfile$