]> Creatis software - cpPlugins.git/blob - lib/ivq/ITK/BooleanMapSaliencyFunction.h
...
[cpPlugins.git] / lib / ivq / ITK / BooleanMapSaliencyFunction.h
1 /* =======================================================================
2  * @author: Leonardo Florez-Valencia
3  * @email: florez-l@javeriana.edu.co
4  * =======================================================================
5  */
6
7 #ifndef __ivq__ITK__BooleanMapSaliencyFunction__h__
8 #define __ivq__ITK__BooleanMapSaliencyFunction__h__
9
10 #include <set>
11
12 #include <itkConceptChecking.h>
13 #include <itkFunctionBase.h>
14
15 namespace ivq
16 {
17   namespace ITK
18   {
19     /**
20      */
21     template< class _TIn, class _TOut >
22     class BooleanMapSaliencyFunction
23       : public itk::FunctionBase< _TIn, _TOut >
24     {
25     public:
26       typedef BooleanMapSaliencyFunction       Self;
27       typedef itk::FunctionBase< _TIn, _TOut > Superclass;
28       typedef itk::SmartPointer< Self >        Pointer;
29       typedef itk::SmartPointer< const Self >  ConstPointer;
30
31       typedef typename Superclass::InputType  TInput;
32       typedef typename Superclass::OutputType TOutput;
33
34     public:
35       itkNewMacro( Self );
36       itkTypeMacro( ivq::ITK::BooleanMapSaliencyFunction, itk::FunctionBase );
37
38       itkBooleanMacro( UseBoundedThresholds );
39       itkGetConstMacro( UseBoundedThresholds, bool );
40       itkSetMacro( UseBoundedThresholds, bool );
41
42       // Concepts
43       itkConceptMacro( Concept0, ( itk::Concept::IsFloatingPoint< _TOut > ) );
44
45     public:
46       virtual _TOut Evaluate( const _TIn& in ) const override;
47
48       unsigned int GetNumberOfThresholds( ) const;
49       void ClearThresholds( );
50       void AddThreshold( const _TIn& v );
51       void AddThresholds(
52         const _TIn& v_min,
53         const _TIn& v_max,
54         const _TIn& v_delta
55         );
56
57     protected:
58       BooleanMapSaliencyFunction( );
59       virtual ~BooleanMapSaliencyFunction( );
60
61     private:
62       // Purposely not implemented
63       BooleanMapSaliencyFunction( const Self& other );
64       Self& operator=( const Self& other );
65
66     protected:
67       std::set< _TIn > m_Thresholds;
68       bool m_UseBoundedThresholds;
69     };
70
71   } // ecapseman
72
73 } // ecapseman
74
75 #ifndef ITK_MANUAL_INSTANTIATION
76 #  include <ivq/ITK/BooleanMapSaliencyFunction.hxx>
77 #endif // ITK_MANUAL_INSTANTIATION
78
79 #endif // __ivq__ITK__BooleanMapSaliencyFunction__h__
80
81 // eof - $RCSfile$