#ifndef __FPA__BASE__FUNCTORS__INVERTCOSTFUNCTION__H__ #define __FPA__BASE__FUNCTORS__INVERTCOSTFUNCTION__H__ #include namespace fpa { namespace Base { namespace Functors { /** */ template< class C > class InvertCostFunction : public itk::FunctionBase< C, C > { public: /// Type-related and pointers typedef InvertCostFunction Self; typedef itk::FunctionBase< C, C > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; public: itkNewMacro( Self ); itkTypeMacro( InvertCostFunction, itkFunctionBase ); public: virtual C Evaluate( const C& input ) const { return( C( 1 ) / ( C( 1 ) + C( input ) ) ); } protected: InvertCostFunction( ) : Superclass( ) { } virtual ~InvertCostFunction( ) { } private: // Purposely not implemented InvertCostFunction( const Self& ); void operator=( const Self& ); }; } // ecapseman } // ecapseman } // ecapseman #endif // __FPA__BASE__FUNCTORS__INVERTCOSTFUNCTION__H__ // eof - $RCSfile$