X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FAlgorithms%2FMultiScaleGaussianImageFilter.h;h=63fb8a8771dd37e9f5ecf0f71b23fce62d891b95;hb=a422d88602e9b49085ccfab0ef0f9f2d93fb6a1e;hp=2ad1b5072c26264d1aa6be9f3fd1e8b88816786e;hpb=2361f4f97631e09d88d8a5510a369817dcaa19db;p=cpPlugins.git diff --git a/lib/cpExtensions/Algorithms/MultiScaleGaussianImageFilter.h b/lib/cpExtensions/Algorithms/MultiScaleGaussianImageFilter.h index 2ad1b50..63fb8a8 100644 --- a/lib/cpExtensions/Algorithms/MultiScaleGaussianImageFilter.h +++ b/lib/cpExtensions/Algorithms/MultiScaleGaussianImageFilter.h @@ -2,99 +2,85 @@ // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) // ------------------------------------------------------------------------- -#ifndef __CPEXTENSIONS__ALGORITHMS__MULTISCALEGAUSSIANIMAGEFILTER__H__ -#define __CPEXTENSIONS__ALGORITHMS__MULTISCALEGAUSSIANIMAGEFILTER__H__ +#ifndef __cpExtensions__Algorithms__MultiScaleGaussianImageFilter__h__ +#define __cpExtensions__Algorithms__MultiScaleGaussianImageFilter__h__ +#include #include #include namespace cpExtensions +{ + namespace Algorithms { - namespace Algorithms + /** + */ + template< class I, class O > + class MultiScaleGaussianImageFilter + : public itk::ImageToImageFilter< I, O > { + public: + typedef MultiScaleGaussianImageFilter Self; + typedef itk::ImageToImageFilter< I, O > Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; + + typedef I TInputImage; + typedef O TOutputImage; + + typedef std::set< double > TScalesContainer; + + protected: /** */ - template< class I, class O > - class MultiScaleGaussianImageFilter - : public itk::ImageToImageFilter< I, O > + class _Greater { public: - typedef MultiScaleGaussianImageFilter Self; - typedef itk::ImageToImageFilter< I, O > Superclass; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; - - typedef I TInputImage; - typedef O TOutputImage; - - typedef std::set< double > TScalesContainer; - - enum FilterId - { - Gradient = 0, - GradientMagnitude, - Hessian, - None - }; - - protected: - /** - */ - class _Greater - { - public: - typedef typename O::PixelType _T; - - public: - _Greater( ); - virtual ~_Greater( ); - bool operator!=( const _Greater& b ) const; - bool operator==( const _Greater& b ) const; - inline _T operator()( const _T& a ) const; - inline _T operator()( const _T& a, const _T& b ) const; - }; + typedef typename O::PixelType _T; public: - itkNewMacro( Self ); - itkTypeMacro( MultiScaleGaussianImageFilter, itkImageToImageFilter ); - - public: - void SetFilterToGradient( ); - void SetFilterToGradientMagnitude( ); - void SetFilterToHessian( ); + _Greater( ); + virtual ~_Greater( ); + bool operator!=( const _Greater& b ) const; + bool operator==( const _Greater& b ) const; + inline _T operator()( const _T& a ) const; + inline _T operator()( const _T& a, const _T& b ) const; + }; - bool IsGradientFilter( ) const; - bool IsGradientMagnitudeFilter( ) const; - bool IsHessianFilter( ) const; + public: + itkNewMacro( Self ); + itkTypeMacro( MultiScaleGaussianImageFilter, itkImageToImageFilter ); - void AddScale( const double& s ); - unsigned long GetNumberOfScales( ) const; + public: + void AddScale( const double& s ); + unsigned long GetNumberOfScales( ) const; - protected: - MultiScaleGaussianImageFilter( ); - virtual ~MultiScaleGaussianImageFilter( ); + protected: + MultiScaleGaussianImageFilter( ); + virtual ~MultiScaleGaussianImageFilter( ); - virtual void GenerateData( ); + virtual void GenerateData( ) cpExtensions_OVERRIDE; - template< class F > - void _GenerateData( ); + template< class F > + void _GenerateData( ); - private: - // Purposely not implemented. - MultiScaleGaussianImageFilter( const Self& ); - void operator=( const Self& ); + private: + // Purposely not implemented. + MultiScaleGaussianImageFilter( const Self& ); + void operator=( const Self& ); - protected: - TScalesContainer m_Scales; - FilterId m_FilterId; - }; + protected: + TScalesContainer m_Scales; + }; } // ecapseman } // ecapseman -#include +#ifndef ITK_MANUAL_INSTANTIATION +# include +#endif // ITK_MANUAL_INSTANTIATION -#endif // __CPEXTENSIONS__ALGORITHMS__MULTISCALEGAUSSIANIMAGEFILTER__H__ +#endif // __cpExtensions__Algorithms__MultiScaleGaussianImageFilter__h__ // eof - $RCSfile$