freConstrainedOnePlusOneEvolutionarySOOptimizer.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: freConstrainedOnePlusOneEvolutionarySOOptimizer.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 __freConstrainedOnePlusOneEvolutionarySOOptimizer_h
00023 #define __freConstrainedOnePlusOneEvolutionarySOOptimizer_h
00024 
00025 #include "freSetupOptimizationOptimizer.h"
00026 #include "freRegistrationObserver.h"
00027 
00028 #include "itkRandomVariateGeneratorBase.h"
00029 
00030 namespace FREE
00031 {
00032   
00041 class ITK_EXPORT ConstrainedOnePlusOneEvolutionarySOOptimizer : 
00042         public SetupOptimizationOptimizer
00043 {
00044 public:
00046   typedef ConstrainedOnePlusOneEvolutionarySOOptimizer  Self;
00047   typedef SetupOptimizationOptimizer                                                            Superclass;
00048   typedef itk::SmartPointer<Self>               Pointer;
00049   typedef itk::SmartPointer<const Self>         ConstPointer;
00050 
00052   itkTypeMacro( ConstrainedOnePlusOneEvolutionarySOOptimizer, SetupOptimizationOptimizer );
00053 
00055   itkNewMacro(Self);
00056 
00058         typedef itk::Statistics::RandomVariateGeneratorBase NormalVariateGeneratorType ;
00059   
00061   itkSetMacro( Maximize, bool );
00062   itkBooleanMacro( Maximize );
00063 
00065   itkSetMacro( MaximumIteration, unsigned int );
00066   itkGetConstReferenceMacro( MaximumIteration, unsigned int );
00067 
00069   itkSetMacro( GrowthFactor, double );
00070   itkGetConstReferenceMacro( GrowthFactor, double );
00071 
00073   itkSetMacro( ShrinkFactor, double );
00074   itkGetConstReferenceMacro( ShrinkFactor, double );
00075 
00077   itkSetMacro( InitialRadius, double ) ;
00078   itkGetConstReferenceMacro( InitialRadius, double );
00079 
00080 
00083   itkSetMacro( Epsilon, double );   
00084   itkGetConstReferenceMacro( Epsilon, double );   
00085 
00087   itkGetConstReferenceMacro( FrobeniusNorm, double );   
00088 
00089   void SetNormalVariateGenerator(NormalVariateGeneratorType* generator) ;
00090 
00092         MeasureType GetValue() const { return this->GetCurrentValue(); }
00093 
00095   itkGetConstReferenceMacro( CurrentIteration, unsigned int) ;
00096 
00100   virtual void StartOptimization() ;
00101 
00105   virtual void StopOptimization() 
00106   { m_Stop = true;}
00107 
00109   virtual bool IsStoppable() const
00110   { return true; };
00111  
00112   itkGetConstReferenceMacro( CurrentChildValue, MeasureType );
00113   itkGetConstReferenceMacro( CurrentChildPosition, ParametersType );
00114 
00120   void Initialize(double initialRadius, double grow = -1, double shrink = -1) ;
00121 
00122 protected:
00123   ConstrainedOnePlusOneEvolutionarySOOptimizer();
00124   virtual ~ConstrainedOnePlusOneEvolutionarySOOptimizer();
00125         void PrintSelf(std::ostream& os, itk::Indent indent) const;
00126 
00128   NormalVariateGeneratorType::Pointer m_RandomGenerator ;
00129 
00131   unsigned int m_MaximumIteration ;
00132 
00134   unsigned int m_CurrentIteration ;
00135 
00137   bool m_Maximize;
00138 
00141   double m_Epsilon ;
00142 
00144   double m_InitialRadius ;
00145 
00147   double m_GrowthFactor ;
00148 
00150   double m_ShrinkFactor ;
00151 
00153   bool m_Initialized ;
00154 
00159   bool m_Stop ;
00160 
00163   double m_FrobeniusNorm;
00164 
00165   mutable MeasureType m_CurrentChildValue;
00166   mutable ParametersType m_CurrentChildPosition;
00167 
00168   void CheckTraitsOfChild( vnl_vector<double>& child );
00169 
00170 private:  
00171   ConstrainedOnePlusOneEvolutionarySOOptimizer(const Self&); //purposely not implemented
00172   void operator=(const Self&);//purposely not implemented
00173 };
00174 
00175 } // end namespace FREE
00176 
00177 #endif
00178     
00179  

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