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 >
89 public
91 public
92 OptimizerBase< TElastix >
93{
94public:
95
100 typedef itk::SmartPointer< Self > Pointer;
101 typedef itk::SmartPointer< const Self > ConstPointer;
102
104 itkNewMacro( Self );
105
108
113 elxClassNameMacro( "QuasiNewtonLBFGS" );
114
117 typedef Superclass1::CostFunctionPointer CostFunctionPointer;
122
131
135 typedef itk::ReceptorMemberCommand< Self > EventPassThroughType;
136 typedef typename EventPassThroughType::Pointer EventPassThroughPointer;
137
140 void StartOptimization( void ) override;
141
144 void BeforeRegistration( void ) override;
145
146 void BeforeEachResolution( void ) override;
147
148 void AfterEachResolution( void ) override;
149
150 void AfterEachIteration( void ) override;
151
152 void AfterRegistration( void ) override;
153
154 itkGetConstMacro( StartLineSearch, bool );
155
156protected:
157
159 ~QuasiNewtonLBFGS() override {}
160
162
164 virtual std::string GetLineSearchStopCondition( void ) const;
165
168 virtual std::string DeterminePhase( void ) const;
169
173 bool TestConvergence( bool firstLineSearchDone ) override;
174
180 const ParametersType searchDir,
181 double & step,
182 ParametersType & x,
183 MeasureType & f,
184 DerivativeType & g ) override;
185
186private:
187
188 QuasiNewtonLBFGS( const Self & ); // purposely not implemented
189 void operator=( const Self & ); // purposely not implemented
190
191 void InvokeIterationEvent( const itk::EventObject & event );
192
199
200};
201
202} // end namespace elastix
203
204#ifndef ITK_MANUAL_INSTANTIATION
205#include "elxQuasiNewtonLBFGS.hxx"
206#endif
207
208#endif // end #ifndef __elxQuasiNewtonLBFGS_h
A class that deals with user given parameters and command line arguments.
This class is the elastix base class for all Optimizers.
Superclass::ConfigurationPointer ConfigurationPointer
itk::Optimizer ITKBaseType
Superclass::ElastixType ElastixType
Superclass::ElastixPointer ElastixPointer
Superclass::RegistrationPointer RegistrationPointer
Superclass::RegistrationType RegistrationType
An optimizer based on the itk::QuasiNewtonLBFGSOptimizer.
bool TestConvergence(bool firstLineSearchDone) override
Superclass2::ConfigurationType ConfigurationType
Superclass2::RegistrationType RegistrationType
void AfterRegistration(void) override
Superclass1::ScalesType ScalesType
QuasiNewtonLBFGS(const Self &)
OptimizerBase< TElastix > Superclass2
EventPassThroughPointer m_EventPasser
void AfterEachResolution(void) override
void AfterEachIteration(void) override
Superclass2::ConfigurationPointer ConfigurationPointer
void LineSearch(const ParametersType searchDir, double &step, ParametersType &x, MeasureType &f, DerivativeType &g) override
LineOptimizerPointer m_LineOptimizer
Superclass1::CostFunctionType CostFunctionType
void operator=(const Self &)
LineOptimizerType::Pointer LineOptimizerPointer
Superclass2::ElastixType ElastixType
virtual std::string GetLineSearchStopCondition(void) const
void InvokeIterationEvent(const itk::EventObject &event)
itk::ReceptorMemberCommand< Self > EventPassThroughType
itk::SmartPointer< Self > Pointer
EventPassThroughType::Pointer EventPassThroughPointer
QuasiNewtonLBFGSOptimizer Superclass1
void BeforeEachResolution(void) override
void StartOptimization(void) override
itk::SmartPointer< const Self > ConstPointer
Superclass1::DerivativeType DerivativeType
Superclass1::CostFunctionPointer CostFunctionPointer
elxClassNameMacro("QuasiNewtonLBFGS")
void BeforeRegistration(void) override
Superclass2::ITKBaseType ITKBaseType
itk::MoreThuenteLineSearchOptimizer LineOptimizerType
Superclass2::ElastixPointer ElastixPointer
virtual std::string DeterminePhase(void) const
Superclass1::StopConditionType StopConditionType
Superclass1::ParametersType ParametersType
Superclass2::RegistrationPointer RegistrationPointer
ITK version of the MoreThuente line search algorithm.
ITK version of the lbfgs algorithm ...
Superclass::CostFunctionType CostFunctionType
Superclass::DerivativeType DerivativeType
Superclass::ParametersType ParametersType


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo