freItkSingleValuedCostFunctionWrapper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   F.R.E.E. - flexible registration evaluation engine
00004   Version:   v.1.0.0
00005   Date:      $Date: 2006/09/01 12:00:00 $
00006   Module:    $RCSfile:   freItkSingleValuedCostFunctionWrapper.h,v $
00007   Language:  C++
00008 
00009 
00010 
00011   Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics,
00012   Institute for Medical Biometry and Informatics, University of Heidelberg,
00013   Germany). All rights reserved.
00014   See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm
00015   for details.
00016 
00017      This software is distributed WITHOUT ANY WARRANTY; without even 
00018      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00019      PURPOSE.  See the above copyright notices for more information.
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&); //purposely not implemented
00075   void operator=(const Self&); //purposely not implemented
00076 };
00077 
00078 
00079 } // end namespace FREE
00080 
00081 
00082 #endif
00083 
00084 
00085 

Generated at Sat Oct 13 16:23:49 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000