#ifndef __fpa__Image__MoriFilter__h__ #define __fpa__Image__MoriFilter__h__ #include #include #include namespace fpa { namespace Image { /** */ template< class _TInputImage, class _TOutputImage, class _TAuxPixel = unsigned short > class MoriFilter : public itk::ImageToImageFilter< _TInputImage, _TOutputImage > { public: typedef MoriFilter Self; typedef itk::ImageToImageFilter< _TInputImage, _TOutputImage > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef itk::Image< _TAuxPixel, _TInputImage::ImageDimension > TAuxImage; typedef fpa::Image::MoriFilterHelper< _TInputImage, TAuxImage > THelper; typedef itk::BinaryThresholdImageFilter< TAuxImage, _TOutputImage > TThreshold; typedef typename _TInputImage::IndexType TIndex; typedef typename _TInputImage::PixelType TInputPixel; typedef typename _TOutputImage::PixelType TOutputPixel; public: itkNewMacro( Self ); itkTypeMacro( fpa::Image::MoriFilter, itk::ImageToImageFilter ); itkGetConstMacro( Seed, TIndex ); itkSetMacro( Seed, TIndex ); public: TAuxImage* GetAuxiliaryImage( ); const TAuxImage* GetAuxiliaryImage( ) const; TInputPixel GetLower( ) const; TInputPixel GetUpper( ) const; TInputPixel GetStep( ) const; TOutputPixel GetInsideValue( ) const; TOutputPixel GetOutsideValue( ) const; void SetLower( const TInputPixel& v ); void SetUpper( const TInputPixel& v ); void SetStep( const TInputPixel& v ); void SetThresholdRange( const TInputPixel& l, const TInputPixel& u, const TInputPixel& s = TInputPixel( 1 ) ); void SetInsideValue( const TOutputPixel& v ); void SetOutsideValue( const TOutputPixel& v ); /* TODO itkGetConstMacro( Lower, TPixel ); itkGetConstMacro( Upper, TPixel ); itkGetConstMacro( Step, TPixel ); itkGetConstMacro( Sensitivity, double ); itkSetMacro( Lower, TPixel ); itkSetMacro( Upper, TPixel ); itkSetMacro( Step, TPixel ); itkSetMacro( Sensitivity, double ); */ protected: MoriFilter( ); virtual ~MoriFilter( ); virtual void GenerateData( ) override; private: // Purposely not defined MoriFilter( const Self& other ); Self& operator=( const Self& other ); protected: typename THelper::Pointer m_Helper; typename TThreshold::Pointer m_Threshold; TIndex m_Seed; }; } // ecapseman } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION # include #endif // ITK_MANUAL_INSTANTIATION #endif // __fpa__Image__MoriFilter__h__ // eof - $RCSfile$