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 
15 #ifndef __elxQuasiNewtonLBFGS_h
16 #define __elxQuasiNewtonLBFGS_h
17 
20 #include "elxIncludes.h"
21 
22 namespace elastix
23 {
24 
25 
85  template <class TElastix>
87  public
89  public
90  OptimizerBase<TElastix>
91  {
92  public:
93 
98  typedef itk::SmartPointer<Self> Pointer;
99  typedef itk::SmartPointer<const Self> ConstPointer;
100 
102  itkNewMacro( Self );
103 
106 
111  elxClassNameMacro( "QuasiNewtonLBFGS" );
112 
114  typedef Superclass1::CostFunctionType CostFunctionType;
115  typedef Superclass1::CostFunctionPointer CostFunctionPointer;
116  typedef Superclass1::StopConditionType StopConditionType;
117  typedef Superclass1::ParametersType ParametersType;
118  typedef Superclass1::DerivativeType DerivativeType;
119  typedef Superclass1::ScalesType ScalesType;
120 
129 
133  typedef itk::ReceptorMemberCommand<Self> EventPassThroughType;
134  typedef typename EventPassThroughType::Pointer EventPassThroughPointer;
135 
138  virtual void StartOptimization(void);
139 
142  virtual void BeforeRegistration(void);
143  virtual void BeforeEachResolution(void);
144  virtual void AfterEachResolution(void);
145  virtual void AfterEachIteration(void);
146  virtual void AfterRegistration(void);
147 
148  itkGetConstMacro(StartLineSearch, bool);
149 
150 
151  protected:
152 
154  virtual ~QuasiNewtonLBFGS() {};
155 
157 
159  virtual std::string GetLineSearchStopCondition(void) const;
160 
163  virtual std::string DeterminePhase(void) const;
164 
168  virtual bool TestConvergence( bool firstLineSearchDone );
169 
174  virtual void LineSearch(
175  const ParametersType searchDir,
176  double & step,
177  ParametersType & x,
178  MeasureType & f,
179  DerivativeType & g );
180 
181  private:
182 
183  QuasiNewtonLBFGS( const Self& ); // purposely not implemented
184  void operator=( const Self& ); // purposely not implemented
185 
186  void InvokeIterationEvent(const itk::EventObject & event);
187 
194 
195  }; // end class QuasiNewtonLBFGS
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
205 
Superclass::RegistrationPointer RegistrationPointer
virtual void StartOptimization(void)
virtual void AfterEachIteration(void)
virtual void AfterEachResolution(void)
ITK version of the lbfgs algorithm ...
This class is the elastix base class for all Optimizers.
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
virtual std::string DeterminePhase(void) const
OptimizerBase< TElastix > Superclass2
Superclass::ConfigurationType ConfigurationType
itk::ReceptorMemberCommand< Self > EventPassThroughType
itk::MoreThuenteLineSearchOptimizer LineOptimizerType
itk::SmartPointer< const Self > ConstPointer
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
itk::SmartPointer< Self > Pointer
void operator=(const Self &)
Superclass2::RegistrationPointer RegistrationPointer
virtual void BeforeEachResolution(void)
Superclass1::StopConditionType StopConditionType
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)
Superclass2::ElastixType ElastixType


Generated on 04-01-2014 for elastix by doxygen 1.8.5 elastix logo