ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkLBFGSBOptimizerv4.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 __itkLBFGSBOptimizerv4_h
19 #define __itkLBFGSBOptimizerv4_h
20 
22 #include "vnl/algo/vnl_lbfgsb.h"
23 
24 namespace itk
25 {
26 /* Necessary forward declaration */
36 
64  public LBFGSOptimizerBasev4< vnl_lbfgsb >
65 {
66 public:
72 
76 
78  itkNewMacro(Self);
79 
81  itkTypeMacro(LBFGSBOptimizerv4, Superclass);
82 
84  UNBOUNDED = 0,
88  };
89 
94 
99 
101  void SetInitialPosition(const ParametersType & param);
102 
105  {
106  return m_InitialPosition;
107  }
108 
110  virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE;
111 
113  virtual void SetMetric(MetricType *metric) ITK_OVERRIDE;
114 
116  void SetLowerBound(const BoundValueType & value);
117 
118  itkGetConstReferenceMacro(LowerBound,BoundValueType);
119 
121  void SetUpperBound(const BoundValueType & value);
122 
123  itkGetConstReferenceMacro(UpperBound,BoundValueType);
124 
131  void SetBoundSelection(const BoundSelectionType & select);
132 
133  itkGetConstReferenceMacro(BoundSelection,BoundSelectionType);
134 
141  virtual void SetCostFunctionConvergenceFactor(double);
142 
143  itkGetConstMacro(CostFunctionConvergenceFactor, double);
144 
146  virtual void SetMaximumNumberOfCorrections(unsigned int);
147 
148  itkGetConstMacro(MaximumNumberOfCorrections, unsigned int);
149 
151  virtual void SetScales(const ScalesType &) ITK_OVERRIDE;
152 
155  itkGetConstReferenceMacro(InfinityNormOfProjectedGradient, double);
156 
157 protected:
159  virtual ~LBFGSBOptimizerv4();
160  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
161 
163 
166 
168 
169 private:
170  LBFGSBOptimizerv4(const Self &); //purposely not implemented
171  void operator=(const Self &); //purposely not implemented
172 
174 
176  BoundValueType m_LowerBound;
177  BoundValueType m_UpperBound;
178  BoundSelectionType m_BoundSelection;
179 };
180 } // end namespace itk
181 #endif
Superclass::CostFunctionAdaptorType CostFunctionAdaptorType
Light weight base class for most itk classes.
Superclass::MetricType MetricType
SmartPointer< const Self > ConstPointer
Superclass::ScalesType ScalesType
void SetBoundSelection(const BoundSelectionType &select)
Limited memory Broyden Fletcher Goldfarb Shannon minimization with simple bounds. ...
virtual void SetMaximumNumberOfCorrections(unsigned int)
void SetUpperBound(const BoundValueType &value)
void SetLowerBound(const BoundValueType &value)
Wrapper helper around vnl_lbfgsb.
unsigned int m_MaximumNumberOfCorrections
ParametersType & GetInitialPosition(void)
Array< double > BoundValueType
BoundSelectionType m_BoundSelection
LBFGSOptimizerBasev4< vnl_lbfgsb > Superclass
virtual void SetScales(const ScalesType &) ITK_OVERRIDE
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
Superclass::ParametersType ParametersType
virtual void StartOptimization(bool doOnlyInitialization=false) ITK_OVERRIDE
SmartPointer< Self > Pointer
virtual void SetCostFunctionConvergenceFactor(double)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Abstract base for vnl lbfgs algorithm optimizers in ITKv4 registration framework. ...
virtual void SetMetric(MetricType *metric) ITK_OVERRIDE
void SetInitialPosition(const ParametersType &param)