ITK  6.0.0
Insight Toolkit
itkLBFGSOptimizerv4.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkLBFGSOptimizerv4_h
19#define itkLBFGSOptimizerv4_h
20
22#include "vnl/algo/vnl_lbfgs.h"
23#include "ITKOptimizersv4Export.h"
24
25namespace itk
26{
87class ITKOptimizersv4_EXPORT LBFGSOptimizerv4 : public LBFGSOptimizerBasev4<vnl_lbfgs>
88{
89public:
90 ITK_DISALLOW_COPY_AND_MOVE(LBFGSOptimizerv4);
91
97
98 using MetricType = Superclass::MetricType;
99 using ParametersType = Superclass::ParametersType;
100 using ScalesType = Superclass::ScalesType;
101
103 itkNewMacro(Self);
104
106 itkOverrideGetNameOfClassMacro(LBFGSOptimizerv4);
107
109 void
110 StartOptimization(bool doOnlyInitialization = false) override;
111
113 void
114 SetMetric(MetricType * metric) override;
115
116 void
118 void
120
127 void
129
130 itkGetConstMacro(LineSearchAccuracy, double);
131
136 void
138
139 itkGetConstMacro(DefaultStepLength, double);
140
141protected:
144 void
145 PrintSelf(std::ostream & os, Indent indent) const override;
146
148 using InternalParametersType = vnl_vector<double>;
149
151 using InternalOptimizerType = vnl_lbfgs;
152
153private:
154 bool m_Verbose{ false };
155 double m_LineSearchAccuracy{ 0.9 };
156 double m_DefaultStepLength{ 1.0 };
157};
158} // end namespace itk
159#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Abstract base for vnl lbfgs algorithm optimizers in ITKv4 registration framework.
Wrap of the vnl_lbfgs algorithm for use in ITKv4 registration framework. The vnl_lbfgs is a wrapper f...
void SetDefaultStepLength(double f)
~LBFGSOptimizerv4() override
vnl_vector< double > InternalParametersType
void SetLineSearchAccuracy(double f)
void SetMetric(MetricType *metric) override
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::ParametersType ParametersType
Superclass::ScalesType ScalesType
Superclass::MetricType MetricType
void StartOptimization(bool doOnlyInitialization=false) override
Light weight base class for most itk classes.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....