18 #ifndef itkLBFGSOptimizerBasev4_h
19 #define itkLBFGSOptimizerBasev4_h
22 #include "vnl/algo/vnl_lbfgs.h"
23 #include "vnl/algo/vnl_lbfgsb.h"
25 #include "ITKOptimizersv4Export.h"
39 template<
typename TInternalVnlOptimizerType >
73 template<
typename TInternalVnlOptimizerType >
106 void StartOptimization(
bool doOnlyInitialization =
false)
override;
114 virtual void SetTrace(
bool flag);
116 itkGetConstMacro(Trace,
bool);
117 itkBooleanMacro(Trace);
120 virtual void SetMaximumNumberOfFunctionEvaluations(
unsigned int n);
122 itkGetConstMacro(MaximumNumberOfFunctionEvaluations,
unsigned int);
129 virtual void SetGradientConvergenceTolerance(
double gtol);
131 itkGetConstMacro(GradientConvergenceTolerance,
double);
139 void PrintSelf(std::ostream & os,
Indent indent)
const override;
143 bool m_OptimizerInitialized{
false};
151 unsigned int m_MaximumNumberOfFunctionEvaluations{2000};
152 double m_GradientConvergenceTolerance{1
e-5};
153 double m_InfinityNormOfProjectedGradient{0.0};
154 double m_CostFunctionConvergenceFactor{1
e+7};
163 #ifndef ITK_MANUAL_INSTANTIATION
164 #include "itkLBFGSOptimizerBasev4.hxx"
Light weight base class for most itk classes.
Superclass::MetricType MetricType
std::unique_ptr< InternalOptimizerType > InternalOptimizerAutoPointer
Superclass::ParametersType ParametersType
InternalOptimizerAutoPointer m_VnlOptimizer
Wrapper helper around vnl optimizer.
Superclass::StopConditionDescriptionType StopConditionDescriptionType
Wrapper helper around vnl_lbfgsb.
Superclass::ScalesType ScalesType
std::ostringstream m_StopConditionDescription
This class is an Adaptor that allows to pass itk::ObjectToObjectMetricBase objects to vnl_optimizers ...
This is a base for the ITKv4 Optimization methods using the vnl library.
static constexpr double e
The base of the natural logarithm or Euler's number
Control indentation during Print() invocation.
Superclass::StopConditionReturnStringType StopConditionReturnStringType
Abstract base for vnl lbfgs algorithm optimizers in ITKv4 registration framework. ...