// ========================================================================= // @author Leonardo Florez Valencia // @email florez-l@javeriana.edu.co // ========================================================================= #ifndef __CTBronchi__MoriLabelling__h__ #define __CTBronchi__MoriLabelling__h__ #include #include #include #include #include namespace CTBronchi { /** */ template< class _TImage, class _TLabels > class MoriLabellingTraits : public fpa::Filters::Image::DefaultTraits< _TImage, _TLabels, typename _TLabels::PixelType > { public: typedef fpa::Filters::Image::DefaultTraits< _TImage, _TLabels, typename _TLabels::PixelType > Superclass; typedef typename Superclass::TInternalTraits TInternalTraits; typedef typename Superclass::TMarksImage TMarksImage; typedef typename Superclass::TFilterInterface TFilterInterface; typedef fpa::Filters::BaseMarksInterface< TInternalTraits > TMarksInterface; typedef fpa::Filters::Image::SeedsFromLabelsInterface< TInternalTraits > TSeedsInterface; }; /** */ template< class _TImage, class _TLabels, class _TScalarImage > class MoriLabelling : public fpa::Filters::Image::RegionGrow< _TImage, _TLabels, typename _TLabels::PixelType, CTBronchi::MoriLabellingTraits< _TImage, _TLabels > > { public: typedef CTBronchi::MoriLabellingTraits< _TImage, _TLabels > TTraits; fpaTraitsMacro( typename TTraits ); typedef fpa::Filters::Image::RegionGrow< _TImage, _TLabels, TMark, TTraits > Superclass; typedef MoriLabelling Self; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef fpa::Functors::RegionGrow::BinaryThreshold< TInputValue > TFunctor; public: itkNewMacro( Self ); itkTypeMacro( MoriLabelling, fpa::Filters::Image::RegionGrow ); itkGetConstMacro( VesselnessThreshold, double ); itkSetMacro( VesselnessThreshold, double ); itkGetConstMacro( UpperThreshold, TInputValue ); itkSetMacro( UpperThreshold, TInputValue ); ivqITKInputMacro( InputLabels, _TLabels ); ivqITKInputMacro( InputVesselness, _TScalarImage ); protected: MoriLabelling( ) : Superclass( ), m_VesselnessThreshold( 0.05 ), m_UpperThreshold( -650 ) { ivqITKInputConfigureMacro( InputLabels, _TLabels ); ivqITKInputConfigureMacro( InputVesselness, _TScalarImage ); this->m_Functor = TFunctor::New( ); this->SetPredicate( this->m_Functor ); } virtual ~MoriLabelling( ) { } private: // Purposely not implemented. MoriLabelling( const Self& other ); Self& operator=( const Self& other ); protected: typename TFunctor::Pointer m_Functor; double m_VesselnessThreshold; TInputValue m_UpperThreshold; }; } // ecapseman #endif // __CTBronchi__Functions__h__ // eof - $RCSfile$