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  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 #ifndef __elxQuasiNewtonLBFGS_h
15 #define __elxQuasiNewtonLBFGS_h
16 
17 #include "elxIncludes.h" // include first to avoid MSVS warning
20 
21 namespace elastix
22 {
23 
83 template< class TElastix >
85  public
87  public
88  OptimizerBase< TElastix >
89 {
90 public:
91 
96  typedef itk::SmartPointer< Self > Pointer;
97  typedef itk::SmartPointer< const Self > ConstPointer;
98 
100  itkNewMacro( Self );
101 
104 
109  elxClassNameMacro( "QuasiNewtonLBFGS" );
110 
113  typedef Superclass1::CostFunctionPointer CostFunctionPointer;
118 
127 
131  typedef itk::ReceptorMemberCommand< Self > EventPassThroughType;
132  typedef typename EventPassThroughType::Pointer EventPassThroughPointer;
133 
136  virtual void StartOptimization( void );
137 
140  virtual void BeforeRegistration( void );
141 
142  virtual void BeforeEachResolution( void );
143 
144  virtual void AfterEachResolution( void );
145 
146  virtual void AfterEachIteration( void );
147 
148  virtual void AfterRegistration( void );
149 
150  itkGetConstMacro( StartLineSearch, bool );
151 
152 protected:
153 
155  virtual ~QuasiNewtonLBFGS() {}
156 
158 
160  virtual std::string GetLineSearchStopCondition( void ) const;
161 
164  virtual std::string DeterminePhase( void ) const;
165 
169  virtual bool TestConvergence( bool firstLineSearchDone );
170 
175  virtual void LineSearch(
176  const ParametersType searchDir,
177  double & step,
178  ParametersType & x,
179  MeasureType & f,
180  DerivativeType & g );
181 
182 private:
183 
184  QuasiNewtonLBFGS( const Self & ); // purposely not implemented
185  void operator=( const Self & ); // purposely not implemented
186 
187  void InvokeIterationEvent( const itk::EventObject & event );
188 
195 
196 };
197 
198 } // end namespace elastix
199 
200 #ifndef ITK_MANUAL_INSTANTIATION
201 #include "elxQuasiNewtonLBFGS.hxx"
202 #endif
203 
204 #endif // end #ifndef __elxQuasiNewtonLBFGS_h
OptimizerBase< TElastix > Superclass2
Superclass::RegistrationPointer RegistrationPointer
Superclass::ParametersType ParametersType
virtual void StartOptimization(void)
virtual void AfterEachIteration(void)
Superclass::DerivativeType DerivativeType
virtual void AfterEachResolution(void)
ITK version of the lbfgs algorithm ...
This class is the elastix base class for all Optimizers.
Superclass::CostFunctionType CostFunctionType
Superclass2::RegistrationType RegistrationType
Superclass::ElastixType ElastixType
Superclass::ConfigurationPointer ConfigurationPointer
void InvokeIterationEvent(const itk::EventObject &event)
ITK version of the MoreThuente line search algorithm.
virtual bool TestConvergence(bool firstLineSearchDone)
Superclass2::ElastixPointer ElastixPointer
virtual std::string GetLineSearchStopCondition(void) const
Superclass::ElastixPointer ElastixPointer
itk::SmartPointer< const Self > ConstPointer
virtual std::string DeterminePhase(void) const
Superclass::ConfigurationType ConfigurationType
itk::MoreThuenteLineSearchOptimizer LineOptimizerType
Superclass2::ConfigurationPointer ConfigurationPointer
LineOptimizerPointer m_LineOptimizer
Superclass1::ScalesType ScalesType
EventPassThroughPointer m_EventPasser
Superclass2::ConfigurationType ConfigurationType
Superclass1::CostFunctionPointer CostFunctionPointer
Superclass1::CostFunctionType CostFunctionType
Superclass1::ParametersType ParametersType
Superclass2::ITKBaseType ITKBaseType
itk::Optimizer ITKBaseType
void operator=(const Self &)
Superclass2::RegistrationPointer RegistrationPointer
virtual void BeforeEachResolution(void)
Superclass1::StopConditionType StopConditionType
itk::ReceptorMemberCommand< Self > EventPassThroughType
An optimizer based on the itk::QuasiNewtonLBFGSOptimizer.
elxClassNameMacro("QuasiNewtonLBFGS")
QuasiNewtonLBFGSOptimizer Superclass1
virtual void LineSearch(const ParametersType searchDir, double &step, ParametersType &x, MeasureType &f, DerivativeType &g)
virtual void AfterRegistration(void)
Superclass1::DerivativeType DerivativeType
Superclass::RegistrationType RegistrationType
EventPassThroughType::Pointer EventPassThroughPointer
LineOptimizerType::Pointer LineOptimizerPointer
virtual void BeforeRegistration(void)
itk::SmartPointer< Self > Pointer
Superclass2::ElastixType ElastixType


Generated on 11-03-2014 for elastix by doxygen 1.8.6 elastix logo