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