1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __CTBronchi__MoriLabelling__h__
6 #define __CTBronchi__MoriLabelling__h__
8 #include <fpa/Filters/BaseMarksInterface.h>
9 #include <fpa/Filters/Image/SeedsFromLabelsInterface.h>
10 #include <fpa/Filters/Image/DefaultTraits.h>
11 #include <fpa/Filters/Image/RegionGrow.h>
12 #include <fpa/Functors/RegionGrow/BinaryThreshold.h>
18 template< class _TImage, class _TLabels >
19 class MoriLabellingTraits
20 : public fpa::Filters::Image::DefaultTraits< _TImage, _TLabels, typename _TLabels::PixelType >
23 typedef fpa::Filters::Image::DefaultTraits< _TImage, _TLabels, typename _TLabels::PixelType > Superclass;
24 typedef typename Superclass::TInternalTraits TInternalTraits;
25 typedef typename Superclass::TMarksImage TMarksImage;
26 typedef typename Superclass::TFilterInterface TFilterInterface;
28 typedef fpa::Filters::BaseMarksInterface< TInternalTraits > TMarksInterface;
29 typedef fpa::Filters::Image::SeedsFromLabelsInterface< TInternalTraits > TSeedsInterface;
34 template< class _TImage, class _TLabels, class _TScalarImage >
36 : public fpa::Filters::Image::RegionGrow< _TImage, _TLabels, typename _TLabels::PixelType, CTBronchi::MoriLabellingTraits< _TImage, _TLabels > >
39 typedef CTBronchi::MoriLabellingTraits< _TImage, _TLabels > TTraits;
40 fpaTraitsMacro( typename TTraits );
42 typedef fpa::Filters::Image::RegionGrow< _TImage, _TLabels, TMark, TTraits > Superclass;
43 typedef MoriLabelling Self;
44 typedef itk::SmartPointer< Self > Pointer;
45 typedef itk::SmartPointer< const Self > ConstPointer;
47 typedef fpa::Functors::RegionGrow::BinaryThreshold< TInputValue > TFunctor;
51 itkTypeMacro( MoriLabelling, fpa::Filters::Image::RegionGrow );
53 itkGetConstMacro( VesselnessThreshold, double );
54 itkSetMacro( VesselnessThreshold, double );
56 itkGetConstMacro( UpperThreshold, TInputValue );
57 itkSetMacro( UpperThreshold, TInputValue );
59 ivqITKInputMacro( InputLabels, _TLabels );
60 ivqITKInputMacro( InputVesselness, _TScalarImage );
65 m_VesselnessThreshold( 0.05 ),
66 m_UpperThreshold( -650 )
68 ivqITKInputConfigureMacro( InputLabels, _TLabels );
69 ivqITKInputConfigureMacro( InputVesselness, _TScalarImage );
70 this->m_Functor = TFunctor::New( );
71 this->SetPredicate( this->m_Functor );
74 virtual ~MoriLabelling( )
79 // Purposely not implemented.
80 MoriLabelling( const Self& other );
81 Self& operator=( const Self& other );
84 typename TFunctor::Pointer m_Functor;
85 double m_VesselnessThreshold;
86 TInputValue m_UpperThreshold;
91 #endif // __CTBronchi__Functions__h__