freAmoebaSOOptimizer.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: freAmoebaSOOptimizer.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 __freAmoebaSOOptimizer_h
00023 #define __freAmoebaSOOptimizer_h
00024 
00025 #include "freVnlSetupOptimizationOptimizer.h"
00026 
00027 #include "vnl/algo/vnl_amoeba.h"
00028 
00029 namespace FREE
00030 {
00031   
00036 class ITK_EXPORT AmoebaSOOptimizer : 
00037         public VnlSetupOptimizationOptimizer
00038 {
00039 public:
00041   typedef AmoebaSOOptimizer                                 Self;
00042   typedef VnlSetupOptimizationOptimizer                                                 Superclass;
00043   typedef itk::SmartPointer<Self>               Pointer;
00044   typedef itk::SmartPointer<const Self>         ConstPointer;
00045 
00047   itkTypeMacro( AmoebaSOOptimizer, VnlSetupOptimizationOptimizer );
00048 
00050   itkNewMacro(Self);
00051 
00053   typedef   vnl_vector<double>     InternalParametersType;
00054 
00056   typedef   vnl_amoeba             InternalOptimizerType;
00057 
00059   vnl_amoeba * GetOptimizer(void);
00060 
00061         typedef itk::Array< double >                            InitialAxisDeltasType;
00062 
00066   virtual void SetMaximumNumberOfIterations( unsigned int n );
00067   itkGetMacro( MaximumNumberOfIterations, unsigned int );
00068 
00077   itkSetMacro(AutomaticInitialSimplex, bool);
00078   itkBooleanMacro(AutomaticInitialSimplex);
00079   itkGetMacro(AutomaticInitialSimplex, bool);
00080 
00083   itkSetMacro(InitialSimplexDelta, InitialAxisDeltasType);
00084   itkGetMacro(InitialSimplexDelta, InitialAxisDeltasType);
00085 
00094   virtual void SetParametersConvergenceTolerance( double tol );
00095   itkGetMacro( ParametersConvergenceTolerance, double );
00096   virtual void SetFunctionConvergenceTolerance( double tol );
00097   itkGetMacro( FunctionConvergenceTolerance, double );
00098 
00099   virtual void StartOptimization( void );
00100 
00101         virtual MeasureType  GetValue (const ParametersType &parameters);
00102         virtual DecomposedMeasureType  GetDecomposedValue (const ParametersType &parameters);
00103 
00104   virtual void SetCostFunction( CostFunctionType * costFunction );
00105 
00106 protected:
00107   AmoebaSOOptimizer();
00108   virtual ~AmoebaSOOptimizer();
00109         void PrintSelf(std::ostream& os, itk::Indent indent) const;
00110 
00111 private:  
00112   AmoebaSOOptimizer(const Self&); //purposely not implemented
00113   void operator=(const Self&);//purposely not implemented
00114 
00115 protected:
00116   bool                          m_OptimizerInitialized;
00117   InternalOptimizerType       * m_VnlOptimizer;
00118   unsigned int                  m_MaximumNumberOfIterations;
00119   double                        m_ParametersConvergenceTolerance;
00120   double                        m_FunctionConvergenceTolerance;
00121 
00122   bool                          m_AutomaticInitialSimplex;
00123   InitialAxisDeltasType         m_InitialSimplexDelta;
00124 };
00125 
00126 } // end namespace FREE
00127 
00128 #endif
00129     
00130  

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