]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/Functors/SimpleNeighborhood.h
...
[FrontAlgorithms.git] / lib / fpa / Image / Functors / SimpleNeighborhood.h
1 #ifndef __fpa__Image__Functors__SimpleNeighborhood__h__
2 #define __fpa__Image__Functors__SimpleNeighborhood__h__
3
4 #include <vector>
5 #include <fpa/Image/Functors/Base.h>
6 #include <itkFunctionBase.h>
7
8 namespace fpa
9 {
10   namespace Image
11   {
12     namespace Functors
13     {
14       /**
15        */
16       template< class _TImage >
17       class SimpleNeighborhood
18         : public fpa::Image::Functors::Base< _TImage, itk::FunctionBase< typename _TImage::IndexType, std::vector< typename _TImage::IndexType > > >
19       {
20       public:
21         typedef _TImage                         TImage;
22         typedef typename TImage::IndexType      TIndex;
23         typedef std::vector< TIndex >           TOutput;
24         typedef itk::FunctionBase< TIndex, TOutput > TBaseFunctor;
25         typedef fpa::Image::Functors::Base< TImage, TBaseFunctor > Superclass;
26         typedef SimpleNeighborhood              Self;
27         typedef itk::SmartPointer< Self >       Pointer;
28         typedef itk::SmartPointer< const Self > ConstPointer;
29
30       public:
31         itkNewMacro( Self );
32         itkTypeMacro( SimpleNeighborhood, Base );
33
34         itkGetConstMacro( Order, unsigned int );
35         itkSetMacro( Order, unsigned int );
36
37       public:
38         virtual TOutput Evaluate( const TIndex& center ) const fpa_OVERRIDE;
39
40       protected:
41         SimpleNeighborhood( );
42         virtual ~SimpleNeighborhood( );
43
44       private:
45         // Purposely not implemented
46         SimpleNeighborhood( const Self& other );
47         Self& operator=( const Self& other );
48
49       protected:
50         unsigned int m_Order;
51       };
52
53     } // ecapseman
54
55   } // ecapseman
56
57 } // ecapseman
58
59 #ifndef ITK_MANUAL_INSTANTIATION
60 #  include <fpa/Image/Functors/SimpleNeighborhood.hxx>
61 #endif // ITK_MANUAL_INSTANTIATION
62
63 #endif // __fpa__Image__Functors__SimpleNeighborhood__h__
64
65 // eof - $RCSfile$