]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Algorithms/MultiScaleGaussianImageFilter.h
Code cleaning
[cpPlugins.git] / lib / cpExtensions / Algorithms / MultiScaleGaussianImageFilter.h
1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
4
5 #ifndef __CPEXTENSIONS__ALGORITHMS__MULTISCALEGAUSSIANIMAGEFILTER__H__
6 #define __CPEXTENSIONS__ALGORITHMS__MULTISCALEGAUSSIANIMAGEFILTER__H__
7
8 #include <set>
9 #include <itkImageToImageFilter.h>
10
11 namespace cpExtensions
12 {
13   namespace Algorithms
14   {
15     /**
16      */
17     template< class I, class O >
18     class MultiScaleGaussianImageFilter
19       : public itk::ImageToImageFilter< I, O >
20     {
21     public:
22       typedef MultiScaleGaussianImageFilter   Self;
23       typedef itk::ImageToImageFilter< I, O > Superclass;
24       typedef itk::SmartPointer< Self >       Pointer;
25       typedef itk::SmartPointer< const Self > ConstPointer;
26
27       typedef I TInputImage;
28       typedef O TOutputImage;
29
30       typedef std::set< double > TScalesContainer;
31
32     protected:
33       /**
34        */
35       class _Greater
36       {
37       public:
38         typedef typename O::PixelType _T;
39
40       public:
41         _Greater( );
42         virtual ~_Greater( );
43         bool operator!=( const _Greater& b ) const;
44         bool operator==( const _Greater& b ) const;
45         inline _T operator()( const _T& a ) const;
46         inline _T operator()( const _T& a, const _T& b ) const;
47       };
48
49     public:
50       itkNewMacro( Self );
51       itkTypeMacro( MultiScaleGaussianImageFilter, itkImageToImageFilter );
52
53     public:
54       void AddScale( const double& s );
55       unsigned long GetNumberOfScales( ) const;
56
57     protected:
58       MultiScaleGaussianImageFilter( );
59       virtual ~MultiScaleGaussianImageFilter( );
60
61       virtual void GenerateData( ) ITK_OVERRIDE;
62
63       template< class F >
64       void _GenerateData( );
65
66     private:
67       // Purposely not implemented.
68       MultiScaleGaussianImageFilter( const Self& );
69       void operator=( const Self& );
70
71     protected:
72       TScalesContainer m_Scales;
73     };
74
75   } // ecapseman
76
77 } // ecapseman
78
79 #ifndef ITK_MANUAL_INSTANTIATION
80 #include <cpExtensions/Algorithms/MultiScaleGaussianImageFilter.hxx>
81 #endif // ITK_MANUAL_INSTANTIATION
82
83 #endif // __CPEXTENSIONS__ALGORITHMS__MULTISCALEGAUSSIANIMAGEFILTER__H__
84
85 // eof - $RCSfile$