go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxQuasiNewtonLBFGS.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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 elxQuasiNewtonLBFGS_h
19#define elxQuasiNewtonLBFGS_h
20
21#include "elxIncludes.h" // include first to avoid MSVS warning
24
25namespace elastix
26{
27
87template <class TElastix>
88class ITK_TEMPLATE_EXPORT QuasiNewtonLBFGS
90 , public OptimizerBase<TElastix>
91{
92public:
94
99 using Pointer = itk::SmartPointer<Self>;
100 using ConstPointer = itk::SmartPointer<const Self>;
101
103 itkNewMacro(Self);
104
107
112 elxClassNameMacro("QuasiNewtonLBFGS");
113
115 using Superclass1::CostFunctionType;
116 using Superclass1::CostFunctionPointer;
118 using Superclass1::ParametersType;
119 using Superclass1::DerivativeType;
121
123 using typename Superclass2::ElastixType;
124 using typename Superclass2::RegistrationType;
126
130 using EventPassThroughType = itk::ReceptorMemberCommand<Self>;
131 using EventPassThroughPointer = typename EventPassThroughType::Pointer;
132
135 void
137
140 void
142
143 void
145
146 void
148
149 void
151
152 void
154
155 itkGetConstMacro(StartLineSearch, bool);
156
157protected:
159 ~QuasiNewtonLBFGS() override = default;
160
162
164 virtual std::string
166
169 virtual std::string
171
175 bool
176 TestConvergence(bool firstLineSearchDone) override;
177
182 void
183 LineSearch(const ParametersType searchDir, double & step, ParametersType & x, MeasureType & f, DerivativeType & g)
184 override;
185
186private:
188
189 void
190 InvokeIterationEvent(const itk::EventObject & event);
191
198};
199
200} // end namespace elastix
201
202#ifndef ITK_MANUAL_INSTANTIATION
203# include "elxQuasiNewtonLBFGS.hxx"
204#endif
205
206#endif // end #ifndef elxQuasiNewtonLBFGS_h
This class is the elastix base class for all Optimizers.
typename ElastixType::RegistrationBaseType RegistrationType
itk::Optimizer ITKBaseType
typename ITKBaseType::ParametersType ParametersType
An optimizer based on the itk::QuasiNewtonLBFGSOptimizer.
bool TestConvergence(bool firstLineSearchDone) override
itk::SmartPointer< const Self > ConstPointer
virtual std::string GetLineSearchStopCondition() const
void StartOptimization() override
EventPassThroughPointer m_EventPasser
void BeforeRegistration() override
~QuasiNewtonLBFGS() override=default
void AfterEachIteration() override
void AfterRegistration() override
void LineSearch(const ParametersType searchDir, double &step, ParametersType &x, MeasureType &f, DerivativeType &g) override
LineOptimizerPointer m_LineOptimizer
itk::SmartPointer< Self > Pointer
ITK_DISALLOW_COPY_AND_MOVE(QuasiNewtonLBFGS)
typename EventPassThroughType::Pointer EventPassThroughPointer
void InvokeIterationEvent(const itk::EventObject &event)
void AfterEachResolution() override
virtual std::string DeterminePhase() const
typename Superclass2::ITKBaseType ITKBaseType
void BeforeEachResolution() override
elxClassNameMacro("QuasiNewtonLBFGS")
itk::ReceptorMemberCommand< Self > EventPassThroughType
ITK version of the MoreThuente line search algorithm.
ITK version of the lbfgs algorithm ...


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo