Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkGradientDescentOptimizer.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
00007 
00008 =========================================================================*/
00009 
00010 
00011 #ifndef __mitkGradientDescentOptimizer_h
00012 #define __mitkGradientDescentOptimizer_h
00013 
00014 #include "mitkOptimizer.h"
00015 
00030 class MITK_REGISTRATION_API mitkGradientDescentOptimizer : public mitkOptimizer
00031 {
00032 public:
00033     MITK_TYPE(mitkGradientDescentOptimizer, mitkOptimizer)  
00034     virtual void PrintSelf(ostream &os);
00035 
00039     mitkGradientDescentOptimizer();
00040     
00045     double GetCurrentStepLength() { return m_CurrentStepLength; }
00046 
00051     double GetMaximumStepLength() { return m_MaximumStepLength; }
00052 
00057     double GetMinimumStepLength() { return m_MinimumStepLength; }
00058 
00063     void SetCurrentStepLength(double length) { m_CurrentStepLength = length; }
00064 
00069     void SetMaximumStepLength(double length) { m_MaximumStepLength = length; }
00070 
00075     void SetMinimumStepLength(double length) { m_MinimumStepLength = length; }
00076 
00081     void SetGradientMagnitudeTolerance(double tolerance) 
00082             { m_GradientMagnitudeTolerance = tolerance; }
00083 
00088     void SetRelaxationFactor(double factor) { m_RelaxationFactor = factor; }
00089     
00090 protected:
00091     virtual ~mitkGradientDescentOptimizer();    
00092     virtual bool Execute();
00093     void AdvanceOneStep( void );
00094     void StepAlongGradientVector( const double &factor, VectorParameterType &transformedGradient);
00095     void StepAlongGradientVersor( const double &factor, VectorParameterType &transformedGradient);
00096 
00097 private:
00098     mitkGradientDescentOptimizer(const mitkGradientDescentOptimizer&);
00099     void operator = (const mitkGradientDescentOptimizer&);
00100 
00101 protected:
00102     VectorParameterType             m_Gradient; 
00103     VectorParameterType             m_PreviousGradient; 
00104 
00105     double                          m_Value;
00106     double                          m_PreviousValue;
00107     double                          m_GradientMagnitudeTolerance;
00108     double                          m_MaximumStepLength;
00109     double                          m_MinimumStepLength;
00110     double                          m_CurrentStepLength;
00111     double                          m_RelaxationFactor;
00112 };
00113 
00114 
00115 //#define DEFINED_mitkGradientDescentOptimizer
00116 
00117 
00118 
00119 #endif
00120 

Generated on Tue Feb 25 15:00:37 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3