1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __fpa__Filters__Image__ExtractAxis__h__
6 #define __fpa__Filters__Image__ExtractAxis__h__
8 #include <itkProcessObject.h>
9 #include <itkImageToImageFilter.h>
10 #include <fpa/DataStructures/Image/Path.h>
11 #include <fpa/Filters/Image/Dijkstra.h>
21 template< class _TInputImage, class _TScalar >
23 : public itk::ProcessObject
26 typedef ExtractAxis 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 typename TInputImage::IndexType TIndex;
34 typedef typename TInputImage::PointType TPoint;
39 TInputImage::ImageDimension
42 typedef itk::Image< TScalar, Self::Dimension > TScalarImage;
43 typedef itk::ImageToImageFilter< TInputImage, TScalarImage > TCenterness;
45 typedef fpa::DataStructures::Image::Path< Self::Dimension > TPath;
46 typedef fpa::Filters::Image::Dijkstra< TScalarImage, TScalarImage > TDijkstra;
50 itkTypeMacro( fpa::Image::ExtractAxis, itk::ProcessObject );
52 itkGetConstObjectMacro( Centerness, TCenterness );
53 itkGetObjectMacro( Centerness, TCenterness );
54 itkSetObjectMacro( Centerness, TCenterness );
56 itkGetConstMacro( StartIndex, TIndex );
57 itkSetMacro( StartIndex, TIndex );
59 itkGetConstMacro( EndIndex, TIndex );
60 itkSetMacro( EndIndex, TIndex );
63 virtual itk::ModifiedTimeType GetMTime( ) const override;
65 virtual void AddSeed( const TIndex& seed );
66 virtual void AddSeed( const TPoint& seed );
67 virtual void ClearSeeds( );
69 void SetInput( TInputImage* input );
70 TInputImage* GetInput( );
71 const TInputImage* GetInput( ) const;
74 const TPath* GetOutput( ) const;
78 virtual ~ExtractAxis( );
80 virtual void GenerateData( ) override;
83 // Purposely not implemented.
84 ExtractAxis( const Self& other );
85 Self& operator=( const Self& other );
88 typename TCenterness::Pointer m_Centerness;
89 typename TDijkstra::Pointer m_Dijkstra;
101 #ifndef ITK_MANUAL_INSTANTIATION
102 # include <fpa/Filters/Image/ExtractAxis.hxx>
103 #endif // ITK_MANUAL_INSTANTIATION
104 #endif // __fpa__Filters__Image__ExtractAxis__h__