1 #ifndef __FPA__BASE__FUNCTORS__INVERTCOSTFUNCTION__H__
2 #define __FPA__BASE__FUNCTORS__INVERTCOSTFUNCTION__H__
4 #include <itkFunctionBase.h>
15 class InvertCostFunction
16 : public itk::FunctionBase< C, C >
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;
27 itkTypeMacro( InvertCostFunction, itkFunctionBase );
30 virtual C Evaluate( const C& input ) const
33 return( C( -1 ) / ( C( 1 ) - C( input ) ) );
35 return( C( 1 ) / ( C( 1 ) + C( input ) ) );
42 virtual ~InvertCostFunction( )
46 // Purposely not implemented
47 InvertCostFunction( const Self& );
48 void operator=( const Self& );
57 #endif // __FPA__BASE__FUNCTORS__INVERTCOSTFUNCTION__H__