18 #ifndef __itkRegularStepGradientDescentBaseOptimizer_h
19 #define __itkRegularStepGradientDescentBaseOptimizer_h
51 GradientMagnitudeTolerance = 1,
53 ImageNotAvailable = 3,
54 CostFunctionError = 4,
55 MaximumNumberOfIterations = 5,
60 itkSetMacro(Maximize,
bool);
61 itkGetConstReferenceMacro(Maximize,
bool);
62 itkBooleanMacro(Maximize);
63 bool GetMinimize()
const
64 {
return !m_Maximize; }
65 void SetMinimize(
bool v)
66 { this->SetMaximize(!v); }
68 { SetMaximize(
false); }
69 void MinimizeOff(
void)
70 { SetMaximize(
true); }
74 void StartOptimization(
void);
78 void ResumeOptimization(
void);
82 void StopOptimization(
void);
85 itkSetMacro(MaximumStepLength,
double);
86 itkSetMacro(MinimumStepLength,
double);
87 itkSetMacro(RelaxationFactor,
double);
89 itkSetMacro(GradientMagnitudeTolerance,
double);
90 itkGetConstReferenceMacro(CurrentStepLength,
double);
91 itkGetConstReferenceMacro(MaximumStepLength,
double);
92 itkGetConstReferenceMacro(MinimumStepLength,
double);
93 itkGetConstReferenceMacro(RelaxationFactor,
double);
95 itkGetConstReferenceMacro(GradientMagnitudeTolerance,
double);
96 itkGetConstMacro(CurrentIteration,
unsigned int);
97 itkGetConstReferenceMacro(StopCondition, StopConditionType);
98 itkGetConstReferenceMacro(Value, MeasureType);
99 itkGetConstReferenceMacro(Gradient, DerivativeType);
103 virtual const std::string GetStopConditionDescription()
const;
108 void PrintSelf(std::ostream & os,
Indent indent)
const;
113 virtual void AdvanceOneStep(
void);
120 virtual void StepAlongGradient(
127 ex.
SetDescription(
"This method MUST be overloaded in derived classes");
134 void operator=(
const Self &);