// ========================================================================= // @author Leonardo Florez Valencia // @email florez-l@javeriana.edu.co // ========================================================================= #ifndef __CTBronchi__MoriLabelling__h__ #define __CTBronchi__MoriLabelling__h__ #include #include #include #include #include #include namespace CTBronchi { /** */ template< class _TInputImage, class _TLabelImage, class _TTraits = fpa::Image::DefaultTraits< _TInputImage, _TLabelImage, typename _TLabelImage::PixelType > > class MoriLabelling : public fpa::Base::RegionGrow< fpa::Image::Algorithm< _TTraits, fpa::Base::MarksInterface< _TTraits >, fpa::Image::LabelledSeedsInterface< _TTraits > > > { public: typedef _TInputImage TInputImage; typedef _TLabelImage TLabelImage; typedef _TTraits TTraits; fpa_Base_TraitTypes( typename TTraits ); typedef fpa::Base::MarksInterface< TTraits > TMarksInterface; typedef fpa::Image::LabelledSeedsInterface< TTraits > TSeedsInterface; typedef fpa::Image::Algorithm< TTraits, TMarksInterface, TSeedsInterface > TAlgorithm; typedef MoriLabelling Self; typedef fpa::Base::RegionGrow< TAlgorithm > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef fpa::Base::Functors::RegionGrow::BinaryThreshold< TInputValue > TThresholdFunction; public: itkNewMacro( Self ); itkTypeMacro( MoriLabelling, fpa::Base::RegionGrow ); itkGetConstMacro( InsideLabel, TOutputValue ); itkSetMacro( InsideLabel, TOutputValue ); public: const TLabelImage* GetInputLabelImage( ) const; void SetInputLabelImage( TLabelImage* image ); const TInputImage* GetInputRawImage( ) const; void SetInputRawImage( TInputImage* image ); TInputValue GetUpperThreshold( ) const; void SetUpperThreshold( TInputValue t ); TOutputValue GetOutsideValue( ) const; void SetOutsideLabel( TOutputValue o ); protected: MoriLabelling( ); virtual ~MoriLabelling( ); virtual TNodes _UnifySeeds( ) override; virtual void _UpdateOutputValue( TNode& n ) override; private: // Purposely not implemented. MoriLabelling( const Self& other ); Self& operator=( const Self& other ); protected: TOutputValue m_InsideLabel; }; } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION # include #endif // ITK_MANUAL_INSTANTIATION #endif // __CTBronchi__MoriLabelling__h__ // eof - $RCSfile$