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