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