1 #ifndef __FPA__IMAGE__EXTRACTENDPOINTSANDBIFURCATIONSFROMMINIMUMSPANNINGTREE__H__
2 #define __FPA__IMAGE__EXTRACTENDPOINTSANDBIFURCATIONSFROMMINIMUMSPANNINGTREE__H__
4 #include <fpa/Base/ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.h>
6 #include <itkImageFileWriter.h>
7 #include <itkImageFileWriter.hxx>
8 #include <itkImageAlgorithm.hxx>
16 template< class _TImage, class _TMST >
17 class ExtractEndPointsAndBifurcationsFromMinimumSpanningTree
18 : public fpa::Base::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree< _TMST >
22 fpa::Base::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree< _TMST >
24 typedef ExtractEndPointsAndBifurcationsFromMinimumSpanningTree Self;
25 typedef itk::SmartPointer< Self > Pointer;
26 typedef itk::SmartPointer< const Self > ConstPointer;
28 typedef _TImage TImage;
29 typedef typename Superclass::TMinimumSpanningTree TMinimumSpanningTree;
30 typedef typename Superclass::TVertex TVertex;
32 typedef itk::Image< unsigned short, TImage::ImageDimension > TMarkImage;
37 ExtractEndPointsAndBifurcationsFromMinimumSpanningTree,
38 fpa::Base::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree
41 itkBooleanMacro( SquaredDistanceMap );
42 itkGetConstMacro( SquaredDistanceMap, bool );
43 itkSetMacro( SquaredDistanceMap, bool );
46 const TImage* GetCostsImage( );
47 const TImage* GetDistanceMap( );
48 void SetCostsImage( TImage* image );
49 void SetDistanceMap( TImage* image );
52 ExtractEndPointsAndBifurcationsFromMinimumSpanningTree( );
53 virtual ~ExtractEndPointsAndBifurcationsFromMinimumSpanningTree( );
55 virtual void GenerateData( ) override;
57 virtual void _MarkSkeleton(
58 const TVertex& v, const unsigned long& l
60 virtual void _MarkSphere(
63 const unsigned long& l
65 virtual unsigned long _Mark( const TVertex& v ) override;
66 virtual unsigned long _SkeletonMark( const TVertex& v ) override;
67 virtual double _Radius( const TVertex& v ) override;
69 virtual void _Tmp( ) override
72 static unsigned int i = 0;
74 s << "marks_" << i << ".mhd";
76 typename itk::ImageFileWriter< TMarkImage >::Pointer w =
77 itk::ImageFileWriter< TMarkImage >::New( );
78 w->SetInput( this->m_MarkImage );
79 w->SetFileName( s.str( ) );
85 // Purposely not implemented
86 ExtractEndPointsAndBifurcationsFromMinimumSpanningTree( const Self& other );
87 Self& operator=( const Self& other );
90 typename TMarkImage::Pointer m_MarkImage;
91 typename TMarkImage::Pointer m_SkeletonImage;
92 bool m_SquaredDistanceMap;
99 #ifndef ITK_MANUAL_INSTANTIATION
100 #include <fpa/Image/ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.hxx>
101 #endif // ITK_MANUAL_INSTANTIATION
103 #endif // __FPA__IMAGE__EXTRACTENDPOINTSANDBIFURCATIONSFROMMINIMUMSPANNINGTREE__H__