go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkFiniteDifferenceGradientDescentOptimizer.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkFiniteDifferenceGradientDescentOptimizer_h
16 #define __itkFiniteDifferenceGradientDescentOptimizer_h
17 
19 
20 namespace itk
21 {
22 
53 {
54 public:
55 
59  typedef SmartPointer< Self > Pointer;
60  typedef SmartPointer< const Self > ConstPointer;
61 
63  itkNewMacro( Self );
64 
67 
69  typedef enum {
73 
75  virtual void AdvanceOneStep( void );
76 
78  void StartOptimization( void );
79 
82  void ResumeOptimization( void );
83 
86  void StopOptimization( void );
87 
89  itkSetMacro( NumberOfIterations, unsigned long );
90 
92  itkGetConstMacro( NumberOfIterations, unsigned long );
93 
95  itkGetConstMacro( CurrentIteration, unsigned long );
96 
98  itkGetConstMacro( Value, double );
99 
101  itkGetConstMacro( StopCondition, StopConditionType );
102 
104  itkSetMacro( Param_a, double );
105  itkGetMacro( Param_a, double );
106 
108  itkSetMacro( Param_c, double );
109  itkGetMacro( Param_c, double );
110 
112  itkSetMacro( Param_A, double );
113  itkGetMacro( Param_A, double );
114 
116  itkSetMacro( Param_alpha, double );
117  itkGetMacro( Param_alpha, double );
118 
120  itkSetMacro( Param_gamma, double );
121  itkGetMacro( Param_gamma, double );
122 
123  itkGetConstMacro( ComputeCurrentValue, bool );
124  itkSetMacro( ComputeCurrentValue, bool );
125  itkBooleanMacro( ComputeCurrentValue );
126 
128  itkGetConstMacro( GradientMagnitude, double );
129  itkGetConstMacro( LearningRate, double );
130 
131 protected:
132 
135 
137  void PrintSelf( std::ostream & os, Indent indent ) const;
138 
139  // made protected so subclass can access
143 
150 
151  // Functions to compute the parameters at iteration k.
152  virtual double Compute_a( unsigned long k ) const;
153 
154  virtual double Compute_c( unsigned long k ) const;
155 
156 private:
157 
158  FiniteDifferenceGradientDescentOptimizer( const Self & ); // purposely not implemented
159  void operator=( const Self & ); // purposely not implemented
160 
162  bool m_Stop;
163  double m_Value;
165  unsigned long m_NumberOfIterations;
166  unsigned long m_CurrentIteration;
167 
169  double m_Param_a;
170  double m_Param_c;
171  double m_Param_A;
174 
175 };
176 
177 } // end namespace itk
178 
179 #endif // end #ifndef __itkFiniteDifferenceGradientDescentOptimizer_h
virtual double Compute_c(unsigned long k) const
virtual double Compute_a(unsigned long k) const
void PrintSelf(std::ostream &os, Indent indent) const


Generated on 27-04-2014 for elastix by doxygen 1.8.6 elastix logo