go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxConjugateGradient.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 __elxConjugateGradient_h
15 #define __elxConjugateGradient_h
16 
17 #include "elxIncludes.h" // include first to avoid MSVS warning
20 
21 namespace elastix
22 {
23 
86 template< class TElastix >
88  public
90  public
91  OptimizerBase< TElastix >
92 {
93 public:
94 
99  typedef itk::SmartPointer< Self > Pointer;
100  typedef itk::SmartPointer< const Self > ConstPointer;
101 
103  itkNewMacro( Self );
104 
107 
112  elxClassNameMacro( "ConjugateGradient" );
113 
116  typedef Superclass1::CostFunctionPointer CostFunctionPointer;
121 
130 
134  typedef itk::ReceptorMemberCommand< Self > EventPassThroughType;
135  typedef typename EventPassThroughType::Pointer EventPassThroughPointer;
136 
139  virtual void StartOptimization( void );
140 
143  virtual void BeforeRegistration( void );
144 
145  virtual void BeforeEachResolution( void );
146 
147  virtual void AfterEachResolution( void );
148 
149  virtual void AfterEachIteration( void );
150 
151  virtual void AfterRegistration( void );
152 
153  itkGetConstMacro( StartLineSearch, bool );
154 
155 protected:
156 
158  virtual ~ConjugateGradient() {}
159 
161 
163  virtual std::string GetLineSearchStopCondition( void ) const;
164 
167  virtual std::string DeterminePhase( void ) const;
168 
172  virtual bool TestConvergence( bool firstLineSearchDone );
173 
178  virtual void LineSearch(
179  const ParametersType searchDir,
180  double & step,
181  ParametersType & x,
182  MeasureType & f,
183  DerivativeType & g );
184 
185 private:
186 
187  ConjugateGradient( const Self & ); // purposely not implemented
188  void operator=( const Self & ); // purposely not implemented
189 
190  void InvokeIterationEvent( const itk::EventObject & event );
191 
198 
199 };
200 
201 } // end namespace elastix
202 
203 #ifndef ITK_MANUAL_INSTANTIATION
204 #include "elxConjugateGradient.hxx"
205 #endif
206 
207 #endif // end #ifndef __elxConjugateGradient_h
Superclass1::CostFunctionType CostFunctionType
itk::SmartPointer< Self > Pointer
Superclass::RegistrationPointer RegistrationPointer
itk::MoreThuenteLineSearchOptimizer LineOptimizerType
LineOptimizerType::Pointer LineOptimizerPointer
EventPassThroughType::Pointer EventPassThroughPointer
elxClassNameMacro("ConjugateGradient")
This class is the elastix base class for all Optimizers.
Superclass::ElastixType ElastixType
virtual void LineSearch(const ParametersType searchDir, double &step, ParametersType &x, MeasureType &f, DerivativeType &g)
Superclass::ConfigurationPointer ConfigurationPointer
Superclass1::DerivativeType DerivativeType
virtual std::string GetLineSearchStopCondition(void) const
ITK version of the MoreThuente line search algorithm.
void operator=(const Self &)
Superclass::ElastixPointer ElastixPointer
virtual void AfterEachIteration(void)
virtual std::string DeterminePhase(void) const
Superclass2::ElastixType ElastixType
Superclass::ConfigurationType ConfigurationType
Superclass1::StopConditionType StopConditionType
itk::ReceptorMemberCommand< Self > EventPassThroughType
Superclass2::RegistrationPointer RegistrationPointer
Superclass2::RegistrationType RegistrationType
OptimizerBase< TElastix > Superclass2
itk::SmartPointer< const Self > ConstPointer
virtual void BeforeRegistration(void)
LineOptimizerPointer m_LineOptimizer
Superclass1::ScalesType ScalesType
itk::Optimizer ITKBaseType
virtual void AfterRegistration(void)
EventPassThroughPointer m_EventPasser
Superclass2::ElastixPointer ElastixPointer
virtual bool TestConvergence(bool firstLineSearchDone)
Superclass2::ConfigurationPointer ConfigurationPointer
virtual void BeforeEachResolution(void)
An optimizer based on the itk::GenericConjugateGradientOptimizer.
Superclass2::ITKBaseType ITKBaseType
Superclass1::CostFunctionPointer CostFunctionPointer
Superclass::RegistrationType RegistrationType
virtual void StartOptimization(void)
Superclass2::ConfigurationType ConfigurationType
GenericConjugateGradientOptimizer Superclass1
Superclass1::ParametersType ParametersType
void InvokeIterationEvent(const itk::EventObject &event)
virtual void AfterEachResolution(void)


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