]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Base/Functors/InvertCostFunction.h
Major refactoring
[FrontAlgorithms.git] / lib / fpa / Base / Functors / InvertCostFunction.h
1 #ifndef __FPA__BASE__FUNCTORS__INVERTCOSTFUNCTION__H__
2 #define __FPA__BASE__FUNCTORS__INVERTCOSTFUNCTION__H__
3
4 #include <itkFunctionBase.h>
5
6 namespace fpa
7 {
8   namespace Base
9   {
10     namespace Functors
11     {
12       /**
13        */
14       template< class C >
15       class InvertCostFunction
16         : public itk::FunctionBase< C, C >
17       {
18       public:
19         /// Type-related and pointers
20         typedef InvertCostFunction              Self;
21         typedef itk::FunctionBase< C, C >       Superclass;
22         typedef itk::SmartPointer< Self >       Pointer;
23         typedef itk::SmartPointer< const Self > ConstPointer;
24
25       public:
26         itkNewMacro( Self );
27         itkTypeMacro( InvertCostFunction, itkFunctionBase );
28
29       public:
30         virtual C Evaluate( const C& input ) const
31           {
32             return( C( 1 ) / ( C( 1 ) + C( input ) ) );
33           }
34
35       protected:
36         InvertCostFunction( )
37           : Superclass( )
38           { }
39         virtual ~InvertCostFunction( )
40           { }
41
42       private:
43         // Purposely not implemented
44         InvertCostFunction( const Self& );
45         void operator=( const Self& );
46       };
47
48     } // ecapseman
49
50   } // ecapseman
51
52 } // ecapseman
53
54 #endif // __FPA__BASE__FUNCTORS__INVERTCOSTFUNCTION__H__
55
56 // eof - $RCSfile$