#include <itkImageToImageFilter.h>
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;
+
+ enum FilterId
+ {
+ Gradient = 0,
+ GradientMagnitude,
+ Hessian,
+ None
+ };
+
+ 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 );
+ _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;
+ };
- public:
- void SetFilterToGradient( );
- void SetFilterToGradientMagnitude( );
- void SetFilterToHessian( );
+ public:
+ itkNewMacro( Self );
+ itkTypeMacro( MultiScaleGaussianImageFilter, itkImageToImageFilter );
- bool IsGradientFilter( ) const;
- bool IsGradientMagnitudeFilter( ) const;
- bool IsHessianFilter( ) const;
+ public:
+ void SetFilterToGradient( );
+ void SetFilterToGradientMagnitude( );
+ void SetFilterToHessian( );
- void AddScale( const double& s );
- unsigned long GetNumberOfScales( ) const;
+ bool IsGradientFilter( ) const;
+ bool IsGradientMagnitudeFilter( ) const;
+ bool IsHessianFilter( ) const;
- protected:
- MultiScaleGaussianImageFilter( );
- virtual ~MultiScaleGaussianImageFilter( );
+ void AddScale( const double& s );
+ unsigned long GetNumberOfScales( ) const;
- virtual void GenerateData( );
+ protected:
+ MultiScaleGaussianImageFilter( );
+ virtual ~MultiScaleGaussianImageFilter( );
- template< class F >
- void _GenerateData( );
+ virtual void GenerateData( );
- private:
- // Purposely not implemented.
- MultiScaleGaussianImageFilter( const Self& );
- void operator=( const Self& );
+ template< class F >
+ void _GenerateData( );
- protected:
- TScalesContainer m_Scales;
- FilterId m_FilterId;
- };
+ private:
+ // Purposely not implemented.
+ MultiScaleGaussianImageFilter( const Self& );
+ void operator=( const Self& );
+
+ protected:
+ TScalesContainer m_Scales;
+ FilterId m_FilterId;
+ };
} // ecapseman