]> Creatis software - cpPlugins.git/blob - lib/ivq/ITK/ExtractLabelFunction.h
bd9f70b11f4ceffe1278970684d732048169e87f
[cpPlugins.git] / lib / ivq / ITK / ExtractLabelFunction.h
1 /* =======================================================================
2  * @author: Leonardo Florez-Valencia
3  * @email: florez-l@javeriana.edu.co
4  * =======================================================================
5  */
6
7 #ifndef __ivq__ITK__ExtractLabelFunction__h__
8 #define __ivq__ITK__ExtractLabelFunction__h__
9
10 #include <set>
11
12 #include <itkFunctionBase.h>
13
14 namespace ivq
15 {
16   namespace ITK
17   {
18     /**
19      */
20     template< class _TIn, class _TOut >
21     class ExtractLabelFunction
22       : public itk::FunctionBase< _TIn, _TOut >
23     {
24     public:
25       typedef ExtractLabelFunction             Self;
26       typedef itk::FunctionBase< _TIn, _TOut > Superclass;
27       typedef itk::SmartPointer< Self >        Pointer;
28       typedef itk::SmartPointer< const Self >  ConstPointer;
29
30       typedef typename Superclass::InputType  TInput;
31       typedef typename Superclass::OutputType TOutput;
32
33     public:
34       itkNewMacro( Self );
35       itkTypeMacro( ivq::ITK::ExtractLabelFunction, itk::FunctionBase );
36
37       itkGetConstMacro( Label, _TIn );
38       itkGetConstMacro( InsideValue, _TOut );
39       itkGetConstMacro( OutsideValue, _TOut );
40
41       itkSetMacro( Label, _TIn );
42       itkSetMacro( InsideValue, _TOut );
43       itkSetMacro( OutsideValue, _TOut );
44
45     public:
46       virtual _TOut Evaluate( const _TIn& in ) const override;
47
48     protected:
49       ExtractLabelFunction( );
50       virtual ~ExtractLabelFunction( );
51
52     private:
53       // Purposely not implemented
54       ExtractLabelFunction( const Self& other );
55       Self& operator=( const Self& other );
56
57     protected:
58       _TIn  m_Label;
59       _TOut m_InsideValue;
60       _TOut m_OutsideValue;
61     };
62
63   } // ecapseman
64
65 } // ecapseman
66
67 #ifndef ITK_MANUAL_INSTANTIATION
68 #  include <ivq/ITK/ExtractLabelFunction.hxx>
69 #endif // ITK_MANUAL_INSTANTIATION
70
71 #endif // __ivq__ITK__ExtractLabelFunction__h__
72
73 // eof - $RCSfile$