]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.h
...
[FrontAlgorithms.git] / lib / fpa / Image / Functors / RegionGrow / BinaryThreshold.h
1 #ifndef __fpa__Image__Functors__RegionGrow__BinaryThreshold__h__
2 #define __fpa__Image__Functors__RegionGrow__BinaryThreshold__h__
3
4 #include <fpa/Image/Functors/Base.h>
5 #include <fpa/Base/Functors/RegionGrow/Base.h>
6
7 namespace fpa
8 {
9   namespace Image
10   {
11     namespace Functors
12     {
13       namespace RegionGrow
14       {
15         /**
16          */
17         template< class _TImage, class _TOutput >
18         class BinaryThreshold
19           : public fpa::Image::Functors::Base< _TImage, fpa::Base::Functors::RegionGrow::Base< typename _TImage::IndexType, _TOutput > >
20         {
21         public:
22           typedef _TImage                    TImage;
23           typedef _TOutput                   TOutput;
24           typedef typename TImage::IndexType TIndex;
25           typedef typename TImage::PixelType TPixel;
26
27           typedef fpa::Base::Functors::RegionGrow::Base< TIndex, TOutput > TBase;
28           typedef fpa::Image::Functors::Base< TImage, TBase > Superclass;
29           typedef BinaryThreshold                             Self;
30           typedef itk::SmartPointer< Self >                   Pointer;
31           typedef itk::SmartPointer< const Self >             ConstPointer;
32
33         public:
34           itkNewMacro( Self );
35           itkTypeMacro( BinaryThreshold, Base );
36
37           itkGetConstMacro( Lower, TPixel );
38           itkGetConstMacro( Upper, TPixel );
39           itkSetMacro( Lower, TPixel );
40           itkSetMacro( Upper, TPixel );
41
42         public:
43           virtual TOutput Evaluate(
44             const TIndex& a, const TIndex& b
45             ) const override;
46
47         protected:
48           BinaryThreshold( );
49           virtual ~BinaryThreshold( );
50
51         private:
52           // Purposely not implemented
53           BinaryThreshold( const Self& other );
54           Self& operator=( const Self& other );
55
56         protected:
57           TPixel m_Lower;
58           TPixel m_Upper;
59         };
60
61       } // ecapseman
62
63     } // ecapseman
64
65   } // ecapseman
66
67 } // ecapseman
68
69 #ifndef ITK_MANUAL_INSTANTIATION
70 #  include <fpa/Image/Functors/RegionGrow/BinaryThreshold.hxx>
71 #endif // ITK_MANUAL_INSTANTIATION
72
73 #endif // __fpa__Image__Functors__RegionGrow__BinaryThreshold__h__
74
75 // eof - $RCSfile$