]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Base/Functors/RegionGrow/Base.h
...
[FrontAlgorithms.git] / lib / fpa / Base / Functors / RegionGrow / Base.h
1 #ifndef __fpa__Base__Functors__RegionGrow__Base__h__
2 #define __fpa__Base__Functors__RegionGrow__Base__h__
3
4 #include <itkObject.h>
5 #include <itkObjectFactory.h>
6 #include <fpa/Base/Functors/VertexCostFunctionBase.h>
7
8 namespace fpa
9 {
10   namespace Base
11   {
12     namespace Functors
13     {
14       namespace RegionGrow
15       {
16         /**
17          */
18         template< class _TVertex, class _TOutput >
19         class Base
20           : public fpa::Base::Functors::VertexCostFunctionBase< _TVertex, _TOutput >
21         {
22         public:
23           typedef fpa::Base::Functors::VertexCostFunctionBase< _TVertex, _TOutput > Superclass;
24           typedef Base                            Self;
25           typedef itk::SmartPointer< Self >       Pointer;
26           typedef itk::SmartPointer< const Self > ConstPointer;
27
28           typedef _TVertex TVertex;
29           typedef _TOutput TOutput;
30
31         public:
32           itkTypeMacro( Base, itk::Object );
33
34           itkGetConstMacro( InsideValue, _TOutput );
35           itkGetConstMacro( OutsideValue, _TOutput );
36
37           itkSetMacro( InsideValue, _TOutput );
38           itkSetMacro( OutsideValue, _TOutput );
39
40         public:
41           virtual TOutput Evaluate( const TVertex& a, const TVertex& b ) const = 0;
42
43         protected:
44           Base( )
45             : Superclass( ),
46               m_InsideValue( TOutput( 1 ) ),
47               m_OutsideValue( TOutput( 0 ) )
48             { }
49           virtual ~Base( )
50             { }
51
52         private:
53           // Purposely not defined
54           Base( const Self& other );
55           Self& operator=( const Self& other );
56
57         protected:
58           _TOutput m_InsideValue;
59           _TOutput m_OutsideValue;
60         };
61
62       } // ecapseman
63
64     } // ecapseman
65
66   } // ecapseman
67
68 } // ecapseman
69
70 #endif // __fpa__Base__Functors__RegionGrow__Base__h__
71
72 // eof - $RCSfile$