1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Image__ExtractAxisFilter__h__
7 #define __fpa__Image__ExtractAxisFilter__h__
9 #include <itkProcessObject.h>
10 #include <itkSignedMaurerDistanceMapImageFilter.h>
12 #include <fpa/Image/Dijkstra.h>
13 #include <fpa/Image/PolyLineParametricPath.h>
21 template< class _TInputImage, class _TScalar, class _TCenterness = itk::SignedMaurerDistanceMapImageFilter< _TInputImage, itk::Image< _TScalar, _TInputImage::ImageDimension > > >
22 class ExtractAxisFilter
23 : public itk::ProcessObject
26 typedef ExtractAxisFilter Self;
27 typedef itk::ProcessObject Superclass;
28 typedef itk::SmartPointer< Self > Pointer;
29 typedef itk::SmartPointer< const Self > ConstPointer;
31 typedef _TInputImage TInputImage;
32 typedef _TScalar TScalar;
33 typedef _TCenterness TCenterness;
37 TInputImage::ImageDimension
40 typedef typename TCenterness::OutputImageType TOutputImage;
41 typedef typename TInputImage::IndexType TIndex;
42 typedef typename TInputImage::PointType TPoint;
44 typedef fpa::Image::PolyLineParametricPath< Self::Dimension > TPath;
45 typedef fpa::Image::Dijkstra< TOutputImage, TOutputImage > TDijkstra;
49 itkTypeMacro( fpa::Image::ExtractAxisFilter, fpa::Image::Dijkstra );
51 itkGetConstObjectMacro( Centerness, TCenterness );
52 itkGetObjectMacro( Centerness, TCenterness );
54 itkGetConstMacro( StartIndex, TIndex );
55 itkGetConstMacro( EndIndex, TIndex );
57 itkSetMacro( StartIndex, TIndex );
58 itkSetMacro( EndIndex, TIndex );
61 virtual itk::ModifiedTimeType GetMTime( ) const override;
63 virtual void AddSeed( const TIndex& seed );
64 virtual void AddSeed( const TPoint& seed );
65 virtual void ClearSeeds( );
67 void SetInput( TInputImage* input );
68 TInputImage* GetInput( );
69 const TInputImage* GetInput( ) const;
72 const TPath* GetOutput( ) const;
76 virtual ~ExtractAxisFilter( );
78 virtual void GenerateData( ) override;
81 // Purposely not implemented.
82 ExtractAxisFilter( const Self& other );
83 Self& operator=( const Self& other );
86 typename TCenterness::Pointer m_Centerness;
87 typename TDijkstra::Pointer m_Dijkstra;
97 #ifndef ITK_MANUAL_INSTANTIATION
98 # include <fpa/Image/ExtractAxisFilter.hxx>
99 #endif // ITK_MANUAL_INSTANTIATION
101 #endif // __fpa__Image__ExtractAxisFilter__h__