ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkLevenbergMarquardtOptimizer.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 
24 namespace itk
25 {
34 {
35 public:
41 
43  itkNewMacro(Self);
44 
47 
49  typedef vnl_vector< double > InternalParametersType;
50 
52  typedef vnl_levenberg_marquardt InternalOptimizerType;
53 
55  vnl_levenberg_marquardt * GetOptimizer(void) const;
56 
58  virtual void StartOptimization(void) ITK_OVERRIDE;
59 
61  virtual void SetCostFunction(MultipleValuedCostFunction *costFunction) ITK_OVERRIDE;
62 
63  void SetNumberOfIterations(unsigned int iterations);
64 
65  void SetValueTolerance(double tol);
66 
67  void SetGradientTolerance(double tol);
68 
69  void SetEpsilonFunction(double epsilon);
70 
72  MeasureType GetValue() const;
73 
74  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
75 
76 protected:
78  virtual ~LevenbergMarquardtOptimizer();
79 
81 
82 private:
83  LevenbergMarquardtOptimizer(const Self &); //purposely not implemented
84  void operator=(const Self &); //purposely not implemented
85 
88  unsigned int m_NumberOfIterations;
92 };
93 } // end namespace itk
94 
95 #endif
virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE
Light weight base class for most itk classes.
This class is a base for the Optimization methods that optimize a multi-valued function.
This class is a base for the CostFunctions returning a multiple values.
Superclass::CostFunctionAdaptorType CostFunctionAdaptorType
void SetGradientTolerance(double tol)
MeasureType GetValue() const
void SetValueTolerance(double tol)
void SetEpsilonFunction(double epsilon)
virtual void StartOptimization(void) ITK_OVERRIDE
virtual void SetCostFunction(MultipleValuedCostFunction *costFunction) ITK_OVERRIDE
Wrap of the vnl_levenberg_marquardt algorithm.
void SetNumberOfIterations(unsigned int iterations)
vnl_levenberg_marquardt * GetOptimizer(void) const
MultipleValuedNonLinearVnlOptimizer Superclass