00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __freItkSingleValuedCostFunctionWrapper_h
00023 #define __freItkSingleValuedCostFunctionWrapper_h
00024
00025 #include "freSetupOptimizationMetric.h"
00026
00027 #include "itkSingleValuedCostFunction.h"
00028
00029 namespace FREE
00030 {
00031
00039 class ITK_EXPORT ItkSingleValuedCostFunctionWrapper :
00040 public itk::SingleValuedCostFunction
00041 {
00042 public:
00044 typedef ItkSingleValuedCostFunctionWrapper Self;
00045 typedef itk::SingleValuedCostFunction Superclass;
00046 typedef itk::SmartPointer<Self> Pointer;
00047 typedef itk::SmartPointer<const Self> ConstPointer;
00048
00050 itkTypeMacro( SingleValuedCostFunction, SingleValuedCostFunction );
00051 itkNewMacro( Self );
00052
00053 typedef SetupOptimizationMetric WrappedCostFunctionType;
00054 typedef WrappedCostFunctionType::Pointer WrappedCostFunctionPointer;
00055
00056 virtual MeasureType GetValue( const ParametersType & parameters ) const;
00057 virtual void GetDerivative( const ParametersType & parameters,
00058 DerivativeType & derivative ) const;
00059 virtual void GetValueAndDerivative( const ParametersType & parameters,
00060 MeasureType& Value, DerivativeType& Derivative ) const;
00061
00062 virtual unsigned int GetNumberOfParameters(void) const;
00063
00064 itkGetObjectMacro(WrappedCostFunction, WrappedCostFunctionType)
00065 itkSetObjectMacro(WrappedCostFunction, WrappedCostFunctionType)
00066
00067 protected:
00068 ItkSingleValuedCostFunctionWrapper();
00069 virtual ~ItkSingleValuedCostFunctionWrapper();
00070
00071 WrappedCostFunctionPointer m_WrappedCostFunction;
00072
00073 private:
00074 ItkSingleValuedCostFunctionWrapper(const Self&);
00075 void operator=(const Self&);
00076 };
00077
00078
00079 }
00080
00081
00082 #endif
00083
00084
00085