ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkLBFGSOptimizerv4.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 __itkLBFGSOptimizerv4_h
19 #define __itkLBFGSOptimizerv4_h
20 
22 #include "vnl/algo/vnl_lbfgs.h"
23 
24 namespace itk
25 {
33  public LBFGSOptimizerBasev4< vnl_lbfgs >
34 {
35 public:
41 
45 
47  itkNewMacro(Self);
48 
50  itkTypeMacro(LBFGSOptimizerv4, Superclass);
51 
53  virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE;
54 
56  virtual void SetMetric(MetricType *metric) ITK_OVERRIDE;
57 
58  void VerboseOn(void);
59  void VerboseOff(void);
60 
67  void SetLineSearchAccuracy(double tol);
68 
69  itkGetConstMacro(LineSearchAccuracy, double);
70 
75  void SetDefaultStepLength(double stp);
76 
77  itkGetConstMacro(DefaultStepLength, double);
78 
79 protected:
81  virtual ~LBFGSOptimizerv4();
82  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
83 
85  typedef vnl_vector< double > InternalParametersType;
86 
88  typedef vnl_lbfgs InternalOptimizerType;
89 
90 private:
91  LBFGSOptimizerv4(const Self &); //purposely not implemented
92  void operator=(const Self &); //purposely not implemented
93 
94  bool m_Verbose;
97 };
98 } // end namespace itk
99 #endif
Light weight base class for most itk classes.
virtual void SetMetric(MetricType *metric) ITK_OVERRIDE
LBFGSOptimizerBasev4< vnl_lbfgs > Superclass
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
Superclass::ParametersType ParametersType
Superclass::ScalesType ScalesType
void SetLineSearchAccuracy(double tol)
vnl_vector< double > InternalParametersType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void SetDefaultStepLength(double stp)
Superclass::MetricType MetricType
Abstract base for vnl lbfgs algorithm optimizers in ITKv4 registration framework. ...
Wrap of the vnl_lbfgs algorithm for use in ITKv4 registration framework.
virtual void StartOptimization(bool doOnlyInitialization=false) ITK_OVERRIDE