freExhaustiveSOOptimizer.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: freExhaustiveSOOptimizer.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 __freExhaustiveSOOptimizer_h
00023 #define __freExhaustiveSOOptimizer_h
00024 
00025 #include "freSetupOptimizationOptimizer.h"
00026 
00027 namespace FREE
00028 {
00029   
00076 class ITK_EXPORT ExhaustiveSOOptimizer : 
00077         public SetupOptimizationOptimizer
00078 {
00079 public:
00081   typedef ExhaustiveSOOptimizer                         Self;
00082   typedef SetupOptimizationOptimizer                                                                            Superclass;
00083   typedef itk::SmartPointer<Self>                    Pointer;
00084   typedef itk::SmartPointer<const Self>              ConstPointer;
00085   
00086         typedef itk::Array< unsigned long > StepsType;
00087         typedef itk::Array< long >              ParameterAxisType;
00088         typedef itk::Array< unsigned long > AxisTypeType;
00089 
00091   itkTypeMacro( ExhaustiveSOOptimizer, SetupOptimizationOptimizer );
00092 
00094   itkNewMacro(Self);
00095 
00096   virtual void    StartOptimization( void );
00097 
00098   void StartWalking( void );
00099   void ResumeWalking( void );
00100   void StopWalking( void );
00101   
00102   virtual bool IsStoppable() const;
00103   virtual void StopOptimization();
00104 
00105   virtual bool IsResumeable() const;
00106   virtual void ResumeOptimization();
00107 
00108         unsigned int GetAxisCount() const;
00109 
00110         itkSetMacro( StepLength, double );
00111   itkSetMacro( NumberOfSteps, StepsType );
00112   itkSetMacro( ParameterAxis, ParameterAxisType );
00113   itkSetMacro( AxisType, AxisTypeType );
00114         itkSetMacro( MinimumIsBest, bool );
00115         itkGetMacro( MinimumIsBest, bool );
00116 
00117   itkGetConstReferenceMacro( StepLength, double );
00118   itkGetConstReferenceMacro( NumberOfSteps, StepsType );
00119   itkGetConstReferenceMacro( ParameterAxis, ParameterAxisType );
00120   itkGetConstReferenceMacro( MaximumMetricValue, MeasureType );
00121   itkGetConstReferenceMacro( MinimumMetricValue, MeasureType );
00122   itkGetConstReferenceMacro( MaximumDecomposedMetricValue, DecomposedMeasureType );
00123   itkGetConstReferenceMacro( MinimumDecomposedMetricValue, DecomposedMeasureType );
00124   itkGetConstReferenceMacro( MinimumMetricValuePosition, ParametersType );
00125   itkGetConstReferenceMacro( MaximumMetricValuePosition, ParametersType );
00126   itkGetConstReferenceMacro( CurrentIndex, ParametersType );
00127   itkGetConstReferenceMacro( MaximumNumberOfIterations, unsigned long );
00128 
00129 protected:
00130   ExhaustiveSOOptimizer();
00131   virtual ~ExhaustiveSOOptimizer() {};
00132   void PrintSelf(std::ostream& os, itk::Indent indent) const;
00133 
00137   void AdvanceOneStep( void );
00138   void IncrementIndex( ParametersType & param );
00139 
00140 private:  
00141   ExhaustiveSOOptimizer(const Self&); //purposely not implemented
00142   void operator=(const Self&);//purposely not implemented
00143 
00144 protected:
00145   StepsType            m_NumberOfSteps;
00146   unsigned long        m_CurrentIteration;
00147   bool                 m_Stop;
00148   unsigned int         m_CurrentParameter;
00149   double               m_StepLength; 
00150   ParametersType       m_CurrentIndex;
00151   unsigned long        m_MaximumNumberOfIterations;
00152   MeasureType          m_MaximumMetricValue;
00153   MeasureType          m_MinimumMetricValue;
00154   DecomposedMeasureType  m_MaximumDecomposedMetricValue;
00155   DecomposedMeasureType  m_MinimumDecomposedMetricValue;
00156   ParametersType       m_MinimumMetricValuePosition;
00157   ParametersType       m_MaximumMetricValuePosition;
00158   ParameterAxisType    m_ParameterAxis;
00159         AxisTypeType                             m_AxisType;
00160         bool                                                             m_MinimumIsBest;
00161 };
00162 
00163 } // end namespace FREE
00164 
00165 
00166 
00167 #endif
00168     
00169  

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