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