ITK  5.2.0
Insight Toolkit
itkLevenbergMarquardtOptimizer.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  * http://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 itkLevenbergMarquardtOptimizer_h
19 #define itkLevenbergMarquardtOptimizer_h
20 
22 #include "vnl/algo/vnl_levenberg_marquardt.h"
23 #include "ITKOptimizersExport.h"
24 
25 namespace itk
26 {
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_MOVE(LevenbergMarquardtOptimizer);
41 
47 
49  itkNewMacro(Self);
50 
53 
55  using InternalParametersType = vnl_vector<double>;
56 
58  using InternalOptimizerType = vnl_levenberg_marquardt;
59 
61  vnl_levenberg_marquardt *
62  GetOptimizer() const;
63 
65  void
66  StartOptimization() override;
67 
69  void
70  SetCostFunction(MultipleValuedCostFunction * costFunction) override;
71 
72  void
73  SetNumberOfIterations(unsigned int iterations);
74 
75  void
76  SetValueTolerance(double tol);
77 
78  void
79  SetGradientTolerance(double tol);
80 
81  void
82  SetEpsilonFunction(double epsilon);
83 
86  GetValue() const;
87 
88  const std::string
89  GetStopConditionDescription() const override;
90 
91 protected:
93  ~LevenbergMarquardtOptimizer() override;
94 
95  using CostFunctionAdaptorType = Superclass::CostFunctionAdaptorType;
96 
97 private:
100  unsigned int m_NumberOfIterations;
104 };
105 } // end namespace itk
106 
107 #endif
itk::MultipleValuedCostFunction
This class is a base for the CostFunctions returning a multiple values.
Definition: itkMultipleValuedCostFunction.h:35
itk::LevenbergMarquardtOptimizer::m_NumberOfIterations
unsigned int m_NumberOfIterations
Definition: itkLevenbergMarquardtOptimizer.h:100
itk::LevenbergMarquardtOptimizer::m_ValueTolerance
double m_ValueTolerance
Definition: itkLevenbergMarquardtOptimizer.h:101
itk::LevenbergMarquardtOptimizer::m_VnlOptimizer
InternalOptimizerType * m_VnlOptimizer
Definition: itkLevenbergMarquardtOptimizer.h:99
itk::SmartPointer< Self >
itk::LevenbergMarquardtOptimizer::m_EpsilonFunction
double m_EpsilonFunction
Definition: itkLevenbergMarquardtOptimizer.h:103
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::LevenbergMarquardtOptimizer::m_GradientTolerance
double m_GradientTolerance
Definition: itkLevenbergMarquardtOptimizer.h:102
itkMultipleValuedNonLinearVnlOptimizer.h
itk::LevenbergMarquardtOptimizer::CostFunctionAdaptorType
Superclass::CostFunctionAdaptorType CostFunctionAdaptorType
Definition: itkLevenbergMarquardtOptimizer.h:95
itk::LevenbergMarquardtOptimizer::InternalParametersType
vnl_vector< double > InternalParametersType
Definition: itkLevenbergMarquardtOptimizer.h:55
itk::LevenbergMarquardtOptimizer::m_OptimizerInitialized
bool m_OptimizerInitialized
Definition: itkLevenbergMarquardtOptimizer.h:98
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::LevenbergMarquardtOptimizer::InternalOptimizerType
vnl_levenberg_marquardt InternalOptimizerType
Definition: itkLevenbergMarquardtOptimizer.h:58
itk::Array< double >
itk::MultipleValuedNonLinearVnlOptimizer
This class is a base for the Optimization methods that optimize a multi-valued function.
Definition: itkMultipleValuedNonLinearVnlOptimizer.h:37
itk::LevenbergMarquardtOptimizer
Wrap of the vnl_levenberg_marquardt algorithm.
Definition: itkLevenbergMarquardtOptimizer.h:37