X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=libs%2Ffpa%2FImage%2FMoriFilter.h;fp=libs%2Ffpa%2FImage%2FMoriRegionGrow.h;h=0707ff5c2bfb2934fc145deb9d793c744f5ed86f;hb=1b83bb346b8416eab760148e7ec92eb8b4a9024c;hp=41c122e32d9caf0c5d5cc89cdcb0e493ff23fb12;hpb=49336779a8037ecd49fc0c4f6038c02636eb538b;p=FrontAlgorithms.git diff --git a/libs/fpa/Image/MoriRegionGrow.h b/libs/fpa/Image/MoriFilter.h similarity index 77% rename from libs/fpa/Image/MoriRegionGrow.h rename to libs/fpa/Image/MoriFilter.h index 41c122e..0707ff5 100644 --- a/libs/fpa/Image/MoriRegionGrow.h +++ b/libs/fpa/Image/MoriFilter.h @@ -1,9 +1,9 @@ -#ifndef __fpa__Image__MoriRegionGrow__h__ -#define __fpa__Image__MoriRegionGrow__h__ +#ifndef __fpa__Image__MoriFilter__h__ +#define __fpa__Image__MoriFilter__h__ #include #include -#include +#include namespace fpa { @@ -12,17 +12,17 @@ namespace fpa /** */ template< class _TInputImage, class _TOutputImage, class _TAuxPixel = unsigned short > - class MoriRegionGrow + class MoriFilter : public itk::ImageToImageFilter< _TInputImage, _TOutputImage > { public: - typedef MoriRegionGrow Self; + 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::MoriRegionGrowHelper< _TInputImage, TAuxImage > THelper; + typedef fpa::Image::MoriFilterHelper< _TInputImage, TAuxImage > THelper; typedef itk::BinaryThresholdImageFilter< TAuxImage, _TOutputImage > TThreshold; typedef typename _TInputImage::IndexType TIndex; @@ -31,7 +31,7 @@ namespace fpa public: itkNewMacro( Self ); - itkTypeMacro( fpa::Image::MoriRegionGrow, itk::ImageToImageFilter ); + itkTypeMacro( fpa::Image::MoriFilter, itk::ImageToImageFilter ); itkGetConstMacro( Seed, TIndex ); itkSetMacro( Seed, TIndex ); @@ -49,6 +49,10 @@ namespace fpa 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 ); @@ -65,14 +69,14 @@ namespace fpa */ protected: - MoriRegionGrow( ); - virtual ~MoriRegionGrow( ); + MoriFilter( ); + virtual ~MoriFilter( ); virtual void GenerateData( ) override; private: // Purposely not defined - MoriRegionGrow( const Self& other ); + MoriFilter( const Self& other ); Self& operator=( const Self& other ); protected: @@ -86,9 +90,9 @@ namespace fpa } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION -# include +# include #endif // ITK_MANUAL_INSTANTIATION -#endif // __fpa__Image__MoriRegionGrow__h__ +#endif // __fpa__Image__MoriFilter__h__ // eof - $RCSfile$