ITK  4.2.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 {
32 class ITK_EXPORT LevenbergMarquardtOptimizer:
34 {
35 public:
41 
43  itkNewMacro(Self);
44 
47 
50 
52  typedef vnl_levenberg_marquardt InternalOptimizerType;
53 
55  vnl_levenberg_marquardt * GetOptimizer(void) const;
56 
58  void StartOptimization(void);
59 
61  virtual void SetCostFunction(MultipleValuedCostFunction *costFunction);
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  const std::string GetStopConditionDescription() const;
75 
76 protected:
78  virtual ~LevenbergMarquardtOptimizer();
79 
80  typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType;
81 private:
82  LevenbergMarquardtOptimizer(const Self &); //purposely not implemented
83  void operator=(const Self &); //purposely not implemented
84 
87  unsigned int m_NumberOfIterations;
91 };
92 } // end namespace itk
93 
94 #endif
95