go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
elastix::ConjugateGradient< TElastix > Class Template Reference

#include <elxConjugateGradient.h>

Detailed Description

template<class TElastix>
class elastix::ConjugateGradient< TElastix >

An optimizer based on the itk::GenericConjugateGradientOptimizer.

A ConjugateGradient optimizer, using the itk::MoreThuenteLineSearchOptimizer. Different conjugate gradient methods can be selected with this optimizer.

This optimizer support the NewSamplesEveryIteration option. It requests new samples for the computation of each search direction (not during the line search). Actually this makes no sense for a conjugate gradient optimizer. So, think twice before using the NewSamplesEveryIteration option.

The parameters used in this class are:

Parameters:

Optimizer: Select this optimizer as follows:
(Optimizer "ConjugateGradient")

GenerateLineSearchIterations: Whether line search iteration should be counted as elastix-iterations.
example: (GenerateLineSearchIterations "true")
Can only be specified for all resolutions at once.
Default value: "false".

MaximumNumberOfIterations: The maximum number of iterations in each resolution.
example: (MaximumNumberOfIterations 100 100 50)
Default value: 100.

MaximumNumberOfLineSearchIterations: The maximum number of iterations in each resolution.
example: (MaximumNumberOfIterations 10 10 5)
Default value: 10.

StepLength: Set the length of the initial step tried by the itk::MoreThuenteLineSearchOptimizer.
example: (StepLength 2.0 1.0 0.5)
Default value: 1.0.

LineSearchValueTolerance: Determine the Wolfe conditions that the itk::MoreThuenteLineSearchOptimizer tries to satisfy.
example: (LineSearchValueTolerance 0.0001 0.0001 0.0001)
Default value: 0.0001.

LineSearchGradientTolerance: Determine the Wolfe conditions that the itk::MoreThuenteLineSearchOptimizer tries to satisfy.
example: (LineSearchGradientTolerance 0.9 0.9 0.9)
Default value: 0.9.

ValueTolerance: Stopping criterion. See the documentation of the itk::GenericConjugateGradientOptimizer for more information.
example: (ValueTolerance 0.001 0.0001 0.000001)
Default value: 0.00001.

GradientMagnitudeTolerance: Stopping criterion. See the documentation of the itk::GenericConjugateGradientOptimizer for more information.
example: (GradientMagnitudeTolerance 0.001 0.0001 0.000001)
Default value: 0.000001.

ConjugateGradientType: a string that defines how 'beta' is computed in each resolution. The following methods are implemented: "SteepestDescent", "FletcherReeves", "PolakRibiere", "DaiYuan", "HestenesStiefel", and "DaiYuanHestenesStiefel". "SteepestDescent" simply sets beta=0. See the source code of the GenericConjugateGradientOptimizer for more information.
example: (ConjugateGradientType "FletcherReeves" "PolakRibiere")
Default value: "DaiYuanHestenesStiefel".

StopIfWolfeNotSatisfied: Whether to stop the optimisation if in one iteration the Wolfe conditions can not be satisfied by the itk::MoreThuenteLineSearchOptimizer.
In general it is wise to do so.
example: (StopIfWolfeNotSatisfied "true" "false")
Default value: "true".

Definition at line 91 of file elxConjugateGradient.h.

+ Inheritance diagram for elastix::ConjugateGradient< TElastix >:

Public Types

typedef Superclass2::ConfigurationPointer ConfigurationPointer
 
typedef Superclass2::ConfigurationType ConfigurationType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass1::CostFunctionPointer CostFunctionPointer
 
typedef Superclass1::CostFunctionType CostFunctionType
 
typedef Superclass1::DerivativeType DerivativeType
 
typedef Superclass2::ElastixPointer ElastixPointer
 
typedef Superclass2::ElastixType ElastixType
 
typedef EventPassThroughType::Pointer EventPassThroughPointer
 
typedef itk::ReceptorMemberCommand< SelfEventPassThroughType
 
typedef Superclass2::ITKBaseType ITKBaseType
 
typedef LineOptimizerType::Pointer LineOptimizerPointer
 
typedef itk::MoreThuenteLineSearchOptimizer LineOptimizerType
 
typedef Superclass1::ParametersType ParametersType
 
typedef itk::SmartPointer< SelfPointer
 
typedef Superclass2::RegistrationPointer RegistrationPointer
 
typedef Superclass2::RegistrationType RegistrationType
 
typedef Superclass1::ScalesType ScalesType
 
typedef ConjugateGradient Self
 
typedef Superclass1::StopConditionType StopConditionType
 
typedef GenericConjugateGradientOptimizer Superclass1
 
typedef OptimizerBase< TElastix > Superclass2
 
- Public Types inherited from itk::GenericConjugateGradientOptimizer
typedef std::map< BetaDefinitionType, ComputeBetaFunctionTypeBetaDefinitionMapType
 
typedef std::string BetaDefinitionType
 
typedef double(Self::* ComputeBetaFunctionType) (const DerivativeType &, const DerivativeType &, const ParametersType &)
 
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::CostFunctionType CostFunctionType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef LineSearchOptimizerType::Pointer LineSearchOptimizerPointer
 
typedef LineSearchOptimizer LineSearchOptimizerType
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::ScaledCostFunctionType ScaledCostFunctionType
 
typedef Superclass::ScalesType ScalesType
 
typedef GenericConjugateGradientOptimizer Self
 
enum  StopConditionType {
  MetricError , LineSearchError , MaximumNumberOfIterations , GradientMagnitudeTolerance ,
  ValueTolerance , InfiniteBeta , Unknown
}
 
typedef ScaledSingleValuedNonLinearOptimizer Superclass
 
- Public Types inherited from itk::ScaledSingleValuedNonLinearOptimizer
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::CostFunctionType CostFunctionType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef ScaledCostFunctionType::Pointer ScaledCostFunctionPointer
 
typedef ScaledSingleValuedCostFunction ScaledCostFunctionType
 
typedef NonLinearOptimizer::ScalesType ScalesType
 
typedef ScaledSingleValuedNonLinearOptimizer Self
 
typedef SingleValuedNonLinearOptimizer Superclass
 
- Public Types inherited from elastix::OptimizerBase< TElastix >
typedef Superclass::ConfigurationPointer ConfigurationPointer
 
typedef Superclass::ConfigurationType ConfigurationType
 
typedef Superclass::ElastixPointer ElastixPointer
 
typedef Superclass::ElastixType ElastixType
 
typedef itk::Optimizer ITKBaseType
 
typedef ITKBaseType::ParametersType ParametersType
 
typedef Superclass::RegistrationPointer RegistrationPointer
 
typedef Superclass::RegistrationType RegistrationType
 
typedef OptimizerBase Self
 
typedef BaseComponentSE< TElastix > Superclass
 
- Public Types inherited from elastix::BaseComponentSE< TElastix >
typedef Configuration::Pointer ConfigurationPointer
 
typedef Configuration ConfigurationType
 
typedef itk::WeakPointer< ElastixTypeElastixPointer
 
typedef TElastix ElastixType
 
typedef RegistrationTypeRegistrationPointer
 
typedef ElastixType::RegistrationBaseType RegistrationType
 
typedef BaseComponentSE Self
 
typedef BaseComponent Superclass
 

Public Member Functions

void AfterEachIteration (void) override
 
void AfterEachResolution (void) override
 
void AfterRegistration (void) override
 
void BeforeEachResolution (void) override
 
void BeforeRegistration (void) override
 
 elxClassNameMacro ("ConjugateGradient")
 
virtual const char * GetClassName () const
 
virtual bool GetStartLineSearch () const
 
void StartOptimization (void) override
 
- Public Member Functions inherited from itk::GenericConjugateGradientOptimizer
virtual const BetaDefinitionTypeGetBetaDefinition ()
 
virtual const char * GetClassName () const
 
virtual const DerivativeTypeGetCurrentGradient ()
 
virtual unsigned long GetCurrentIteration () const
 
virtual double GetCurrentStepLength () const
 
virtual MeasureType GetCurrentValue () const
 
virtual double GetGradientMagnitudeTolerance () const
 
virtual bool GetInLineSearch () const
 
virtual unsigned long GetMaximumNumberOfIterations () const
 
virtual unsigned long GetMaxNrOfItWithoutImprovement () const
 
virtual const StopConditionTypeGetStopCondition ()
 
virtual double GetValueTolerance () const
 
 itkGetModifiableObjectMacro (LineSearchOptimizer, LineSearchOptimizerType)
 
virtual void ResumeOptimization (void)
 
virtual void SetBetaDefinition (const BetaDefinitionType &arg)
 
virtual void SetGradientMagnitudeTolerance (double _arg)
 
virtual void SetLineSearchOptimizer (LineSearchOptimizerType *_arg)
 
virtual void SetMaximumNumberOfIterations (unsigned long _arg)
 
virtual void SetMaxNrOfItWithoutImprovement (unsigned long arg)
 
virtual void SetValueTolerance (double _arg)
 
void StartOptimization (void) override
 
virtual void StopOptimization (void)
 
- Public Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer
virtual const char * GetClassName () const
 
const ParametersTypeGetCurrentPosition (void) const override
 
virtual bool GetMaximize () const
 
virtual const ScaledCostFunctionTypeGetScaledCostFunction ()
 
virtual const ParametersTypeGetScaledCurrentPosition ()
 
bool GetUseScales (void) const
 
virtual void InitializeScales (void)
 
virtual void MaximizeOff ()
 
virtual void MaximizeOn ()
 
void SetCostFunction (CostFunctionType *costFunction) override
 
virtual void SetMaximize (bool _arg)
 
virtual void SetUseScales (bool arg)
 
- Public Member Functions inherited from elastix::OptimizerBase< TElastix >
void AfterRegistrationBase (void) override
 
void BeforeEachResolutionBase () override
 
virtual ITKBaseTypeGetAsITKBaseType (void)
 
virtual const ITKBaseTypeGetAsITKBaseType (void) const
 
virtual const char * GetClassName () const
 
virtual void SetCurrentPositionPublic (const ParametersType &param)
 
virtual void SetSinusScales (double amplitude, double frequency, unsigned long numberOfParameters)
 
- Public Member Functions inherited from elastix::BaseComponentSE< TElastix >
ConfigurationTypeGetConfiguration (void) const
 
ElastixTypeGetElastix (void) const
 
RegistrationPointer GetRegistration (void) const
 
 ITK_DISALLOW_COPY_AND_ASSIGN (BaseComponentSE)
 
void SetConfiguration (ConfigurationType *_arg)
 
void SetElastix (ElastixType *_arg)
 
- Public Member Functions inherited from elastix::BaseComponent
virtual void AfterEachIteration (void)
 
virtual void AfterEachIterationBase (void)
 
virtual void AfterEachResolution (void)
 
virtual void AfterEachResolutionBase (void)
 
virtual void AfterRegistration (void)
 
virtual void AfterRegistrationBase (void)
 
virtual int BeforeAll (void)
 
virtual int BeforeAllBase (void)
 
virtual void BeforeEachResolution (void)
 
virtual void BeforeEachResolutionBase (void)
 
virtual void BeforeRegistration (void)
 
virtual void BeforeRegistrationBase (void)
 
virtual const char * elxGetClassName (void) const
 
const char * GetComponentLabel (void) const
 
 ITK_DISALLOW_COPY_AND_ASSIGN (BaseComponent)
 
 itkTypeMacroNoParent (BaseComponent)
 
void SetComponentLabel (const char *label, unsigned int idx)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::GenericConjugateGradientOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from elastix::BaseComponent
static std::string ConvertSecondsToDHMS (const double totalSeconds, const unsigned int precision)
 
static void InitializeElastixExecutable ()
 
static bool IsElastixLibrary ()
 

Protected Member Functions

 ConjugateGradient ()
 
virtual std::string DeterminePhase (void) const
 
virtual std::string GetLineSearchStopCondition (void) const
 
void LineSearch (const ParametersType searchDir, double &step, ParametersType &x, MeasureType &f, DerivativeType &g) override
 
bool TestConvergence (bool firstLineSearchDone) override
 
 ~ConjugateGradient () override
 
- Protected Member Functions inherited from itk::GenericConjugateGradientOptimizer
virtual void AddBetaDefinition (const BetaDefinitionType &name, ComputeBetaFunctionType function)
 
virtual double ComputeBeta (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
 
double ComputeBetaDY (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
 
double ComputeBetaDYHS (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
 
double ComputeBetaFR (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
 
double ComputeBetaHS (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
 
double ComputeBetaPR (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
 
double ComputeBetaSD (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
 
virtual void ComputeSearchDirection (const DerivativeType &previousGradient, const DerivativeType &gradient, ParametersType &searchDir)
 
 GenericConjugateGradientOptimizer ()
 
virtual void LineSearch (const ParametersType searchDir, double &step, ParametersType &x, MeasureType &f, DerivativeType &g)
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetInLineSearch (bool _arg)
 
virtual bool TestConvergence (bool firstLineSearchDone)
 
 ~GenericConjugateGradientOptimizer () override
 
- Protected Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer
virtual void GetScaledDerivative (const ParametersType &parameters, DerivativeType &derivative) const
 
virtual MeasureType GetScaledValue (const ParametersType &parameters) const
 
virtual void GetScaledValueAndDerivative (const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ScaledSingleValuedNonLinearOptimizer ()
 
void SetCurrentPosition (const ParametersType &param) override
 
virtual void SetScaledCurrentPosition (const ParametersType &parameters)
 
 ~ScaledSingleValuedNonLinearOptimizer () override
 
- Protected Member Functions inherited from elastix::OptimizerBase< TElastix >
virtual bool GetNewSamplesEveryIteration (void) const
 
 OptimizerBase ()
 
virtual void SelectNewSamples (void)
 
 ~OptimizerBase () override
 
- Protected Member Functions inherited from elastix::BaseComponentSE< TElastix >
 BaseComponentSE ()=default
 
 ~BaseComponentSE () override=default
 
- Protected Member Functions inherited from elastix::BaseComponent
 BaseComponent ()=default
 
virtual ~BaseComponent ()=default
 

Protected Attributes

LineOptimizerPointer m_LineOptimizer
 
- Protected Attributes inherited from itk::GenericConjugateGradientOptimizer
BetaDefinitionType m_BetaDefinition
 
BetaDefinitionMapType m_BetaDefinitionMap
 
DerivativeType m_CurrentGradient
 
unsigned long m_CurrentIteration
 
double m_CurrentStepLength
 
MeasureType m_CurrentValue
 
bool m_InLineSearch
 
bool m_PreviousGradientAndSearchDirValid
 
bool m_Stop
 
StopConditionType m_StopCondition
 
bool m_UseDefaultMaxNrOfItWithoutImprovement
 
- Protected Attributes inherited from itk::ScaledSingleValuedNonLinearOptimizer
ScaledCostFunctionPointer m_ScaledCostFunction
 
ParametersType m_ScaledCurrentPosition
 
- Protected Attributes inherited from elastix::BaseComponentSE< TElastix >
ConfigurationPointer m_Configuration {}
 
ElastixPointer m_Elastix {}
 
RegistrationPointer m_Registration {}
 

Private Member Functions

 ConjugateGradient (const Self &)
 
void InvokeIterationEvent (const itk::EventObject &event)
 
void operator= (const Self &)
 

Private Attributes

EventPassThroughPointer m_EventPasser
 
bool m_GenerateLineSearchIterations
 
double m_SearchDirectionMagnitude
 
bool m_StartLineSearch
 
bool m_StopIfWolfeNotSatisfied
 
bool m_WolfeIsStopCondition
 

Member Typedef Documentation

◆ ConfigurationPointer

template<class TElastix >
typedef Superclass2::ConfigurationPointer elastix::ConjugateGradient< TElastix >::ConfigurationPointer

Definition at line 130 of file elxConjugateGradient.h.

◆ ConfigurationType

template<class TElastix >
typedef Superclass2::ConfigurationType elastix::ConjugateGradient< TElastix >::ConfigurationType

Definition at line 129 of file elxConjugateGradient.h.

◆ ConstPointer

template<class TElastix >
typedef itk::SmartPointer< const Self > elastix::ConjugateGradient< TElastix >::ConstPointer

Definition at line 104 of file elxConjugateGradient.h.

◆ CostFunctionPointer

template<class TElastix >
typedef Superclass1::CostFunctionPointer elastix::ConjugateGradient< TElastix >::CostFunctionPointer

Definition at line 120 of file elxConjugateGradient.h.

◆ CostFunctionType

template<class TElastix >
typedef Superclass1::CostFunctionType elastix::ConjugateGradient< TElastix >::CostFunctionType

Typedef's inherited from Superclass1.

Definition at line 119 of file elxConjugateGradient.h.

◆ DerivativeType

template<class TElastix >
typedef Superclass1::DerivativeType elastix::ConjugateGradient< TElastix >::DerivativeType

Definition at line 123 of file elxConjugateGradient.h.

◆ ElastixPointer

template<class TElastix >
typedef Superclass2::ElastixPointer elastix::ConjugateGradient< TElastix >::ElastixPointer

Definition at line 128 of file elxConjugateGradient.h.

◆ ElastixType

template<class TElastix >
typedef Superclass2::ElastixType elastix::ConjugateGradient< TElastix >::ElastixType

Typedef's inherited from Elastix.

Definition at line 127 of file elxConjugateGradient.h.

◆ EventPassThroughPointer

template<class TElastix >
typedef EventPassThroughType::Pointer elastix::ConjugateGradient< TElastix >::EventPassThroughPointer

Definition at line 139 of file elxConjugateGradient.h.

◆ EventPassThroughType

template<class TElastix >
typedef itk::ReceptorMemberCommand< Self > elastix::ConjugateGradient< TElastix >::EventPassThroughType

Definition at line 138 of file elxConjugateGradient.h.

◆ ITKBaseType

template<class TElastix >
typedef Superclass2::ITKBaseType elastix::ConjugateGradient< TElastix >::ITKBaseType

Definition at line 133 of file elxConjugateGradient.h.

◆ LineOptimizerPointer

template<class TElastix >
typedef LineOptimizerType::Pointer elastix::ConjugateGradient< TElastix >::LineOptimizerPointer

Definition at line 137 of file elxConjugateGradient.h.

◆ LineOptimizerType

template<class TElastix >
typedef itk::MoreThuenteLineSearchOptimizer elastix::ConjugateGradient< TElastix >::LineOptimizerType

Extra typedefs

Definition at line 136 of file elxConjugateGradient.h.

◆ ParametersType

template<class TElastix >
typedef Superclass1::ParametersType elastix::ConjugateGradient< TElastix >::ParametersType

Definition at line 122 of file elxConjugateGradient.h.

◆ Pointer

template<class TElastix >
typedef itk::SmartPointer< Self > elastix::ConjugateGradient< TElastix >::Pointer

Definition at line 103 of file elxConjugateGradient.h.

◆ RegistrationPointer

template<class TElastix >
typedef Superclass2::RegistrationPointer elastix::ConjugateGradient< TElastix >::RegistrationPointer

Definition at line 132 of file elxConjugateGradient.h.

◆ RegistrationType

template<class TElastix >
typedef Superclass2::RegistrationType elastix::ConjugateGradient< TElastix >::RegistrationType

Definition at line 131 of file elxConjugateGradient.h.

◆ ScalesType

template<class TElastix >
typedef Superclass1::ScalesType elastix::ConjugateGradient< TElastix >::ScalesType

Definition at line 124 of file elxConjugateGradient.h.

◆ Self

template<class TElastix >
typedef ConjugateGradient elastix::ConjugateGradient< TElastix >::Self

Standard ITK.

Definition at line 100 of file elxConjugateGradient.h.

◆ StopConditionType

template<class TElastix >
typedef Superclass1::StopConditionType elastix::ConjugateGradient< TElastix >::StopConditionType

Definition at line 121 of file elxConjugateGradient.h.

◆ Superclass1

template<class TElastix >
typedef GenericConjugateGradientOptimizer elastix::ConjugateGradient< TElastix >::Superclass1

Definition at line 101 of file elxConjugateGradient.h.

◆ Superclass2

template<class TElastix >
typedef OptimizerBase< TElastix > elastix::ConjugateGradient< TElastix >::Superclass2

Definition at line 102 of file elxConjugateGradient.h.

Constructor & Destructor Documentation

◆ ConjugateGradient() [1/2]

template<class TElastix >
elastix::ConjugateGradient< TElastix >::ConjugateGradient ( )
protected

◆ ~ConjugateGradient()

template<class TElastix >
elastix::ConjugateGradient< TElastix >::~ConjugateGradient ( )
inlineoverrideprotected

Definition at line 162 of file elxConjugateGradient.h.

◆ ConjugateGradient() [2/2]

template<class TElastix >
elastix::ConjugateGradient< TElastix >::ConjugateGradient ( const Self )
private

Member Function Documentation

◆ AfterEachIteration()

template<class TElastix >
void elastix::ConjugateGradient< TElastix >::AfterEachIteration ( void  )
overridevirtual

Reimplemented from elastix::BaseComponent.

◆ AfterEachResolution()

template<class TElastix >
void elastix::ConjugateGradient< TElastix >::AfterEachResolution ( void  )
overridevirtual

Reimplemented from elastix::BaseComponent.

◆ AfterRegistration()

template<class TElastix >
void elastix::ConjugateGradient< TElastix >::AfterRegistration ( void  )
overridevirtual

Reimplemented from elastix::BaseComponent.

◆ BeforeEachResolution()

template<class TElastix >
void elastix::ConjugateGradient< TElastix >::BeforeEachResolution ( void  )
overridevirtual

Reimplemented from elastix::BaseComponent.

◆ BeforeRegistration()

template<class TElastix >
void elastix::ConjugateGradient< TElastix >::BeforeRegistration ( void  )
overridevirtual

Methods to set parameters and print output at different stages in the registration process.

Reimplemented from elastix::BaseComponent.

◆ DeterminePhase()

template<class TElastix >
virtual std::string elastix::ConjugateGradient< TElastix >::DeterminePhase ( void  ) const
protectedvirtual

Generate a string, representing the phase of optimisation (line search, main)

◆ elxClassNameMacro()

template<class TElastix >
elastix::ConjugateGradient< TElastix >::elxClassNameMacro ( "ConjugateGradient< TElastix >"  )

Name of this class. Use this name in the parameter file to select this specific optimizer.
example: (Optimizer "ConjugateGradient")

◆ GetClassName()

template<class TElastix >
virtual const char * elastix::ConjugateGradient< TElastix >::GetClassName ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::GenericConjugateGradientOptimizer.

◆ GetLineSearchStopCondition()

template<class TElastix >
virtual std::string elastix::ConjugateGradient< TElastix >::GetLineSearchStopCondition ( void  ) const
protectedvirtual

Convert the line search stop condition to a string

◆ GetStartLineSearch()

template<class TElastix >
virtual bool elastix::ConjugateGradient< TElastix >::GetStartLineSearch ( ) const
virtual

◆ InvokeIterationEvent()

template<class TElastix >
void elastix::ConjugateGradient< TElastix >::InvokeIterationEvent ( const itk::EventObject &  event)
private

◆ LineSearch()

template<class TElastix >
void elastix::ConjugateGradient< TElastix >::LineSearch ( const ParametersType  searchDir,
double step,
ParametersType x,
MeasureType f,
DerivativeType g 
)
overrideprotectedvirtual

Call the superclass' implementation. If an itk::ExceptionObject is caught, because the line search optimizer tried a too big step, the exception is printed, but ignored further. The optimizer stops, but elastix just goes on to the next resolution.

Reimplemented from itk::GenericConjugateGradientOptimizer.

◆ New()

template<class TElastix >
static Pointer elastix::ConjugateGradient< TElastix >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TElastix >
void elastix::ConjugateGradient< TElastix >::operator= ( const Self )
private

◆ StartOptimization()

template<class TElastix >
void elastix::ConjugateGradient< TElastix >::StartOptimization ( void  )
override

Check if any scales are set, and set the UseScales flag on or off; after that call the superclass' implementation

◆ TestConvergence()

template<class TElastix >
bool elastix::ConjugateGradient< TElastix >::TestConvergence ( bool  firstLineSearchDone)
overrideprotectedvirtual

Reimplement the superclass. Calls the superclass' implementation and checks if the MoreThuente line search routine has stopped with Wolfe conditions satisfied.

Reimplemented from itk::GenericConjugateGradientOptimizer.

Field Documentation

◆ m_EventPasser

template<class TElastix >
EventPassThroughPointer elastix::ConjugateGradient< TElastix >::m_EventPasser
private

Definition at line 196 of file elxConjugateGradient.h.

◆ m_GenerateLineSearchIterations

template<class TElastix >
bool elastix::ConjugateGradient< TElastix >::m_GenerateLineSearchIterations
private

Definition at line 199 of file elxConjugateGradient.h.

◆ m_LineOptimizer

template<class TElastix >
LineOptimizerPointer elastix::ConjugateGradient< TElastix >::m_LineOptimizer
protected

Definition at line 164 of file elxConjugateGradient.h.

◆ m_SearchDirectionMagnitude

template<class TElastix >
double elastix::ConjugateGradient< TElastix >::m_SearchDirectionMagnitude
private

Definition at line 197 of file elxConjugateGradient.h.

◆ m_StartLineSearch

template<class TElastix >
bool elastix::ConjugateGradient< TElastix >::m_StartLineSearch
private

Definition at line 198 of file elxConjugateGradient.h.

◆ m_StopIfWolfeNotSatisfied

template<class TElastix >
bool elastix::ConjugateGradient< TElastix >::m_StopIfWolfeNotSatisfied
private

Definition at line 200 of file elxConjugateGradient.h.

◆ m_WolfeIsStopCondition

template<class TElastix >
bool elastix::ConjugateGradient< TElastix >::m_WolfeIsStopCondition
private

Definition at line 201 of file elxConjugateGradient.h.



Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo