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

#include <elxAdaptiveStochasticLBFGS.h>

Detailed Description

template<class TElastix>
class elastix::AdaptiveStochasticLBFGS< TElastix >

A gradient descent optimizer with an adaptive gain.

This class is a wrap around the AdaptiveStochasticVarianceReducedGradientOptimizer class. It takes care of setting parameters and printing progress information. For more information about the optimization method, please read the documentation of the AdaptiveStochasticVarianceReducedGradientOptimizer class.

This optimizer is very suitable to be used in combination with the Random image sampler, or with the RandomCoordinate image sampler, with the setting (NewSamplesEveryIteration "true"). Much effort has been spent on providing reasonable default values for all parameters, to simplify usage. In most registration problems, good results should be obtained without specifying any of the parameters described below (except the first of course, which defines the optimizer to use).

This optimization method is described in the following references:

[1] Y.Qiao, Z.Sun, B.P.F. Lelieveldt, M.Staring A stochastic quasi-newton method for non-rigid image registration Medical Image Computing and Computer-Assisted Intervention (MICCAI), pp. 297-304, 2015. http://dx.doi.org/10.1007/978-3-319-24571-3_36

The parameters used in this class are:

Parameters:

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

MaximumNumberOfIterations: The maximum number of iterations in each resolution.
example: (MaximumNumberOfIterations 100 100 50)
Default/recommended value: 500. When you are in a hurry, you may go down to 250 for example. When you have plenty of time, and want to be absolutely sure of the best results, a setting of 2000 is reasonable. In general, 500 gives satisfactory results.

MaximumNumberOfSamplingAttempts: The maximum number of sampling attempts. Sometimes not enough corresponding samples can be drawn, upon which an exception is thrown. With this parameter it is possible to try to draw another set of samples.
example: (MaximumNumberOfSamplingAttempts 10 15 10)
Default value: 0, i.e. just fail immediately, for backward compatibility.

AutomaticParameterEstimation: When this parameter is set to "true", many other parameters are calculated automatically: SP_a, SP_alpha, SigmoidMax, SigmoidMin, and SigmoidScale. In the elastix.log file the actually chosen values for these parameters can be found.
example: (AutomaticParameterEstimation "true")
Default/recommended value: "true". The parameter can be specified for each resolution, or for all resolutions at once.

UseAdaptiveStepSizes: When this parameter is set to "true", the adaptive step size mechanism described in the documentation of itk::AdaptiveStochasticVarianceReducedGradientOptimizer is used. The parameter can be specified for each resolution, or for all resolutions at once.
example: (UseAdaptiveStepSizes "true")
Default/recommend value: "true", because it makes the registration more robust. In case of using a RandomCoordinate sampler, with (UseRandomSampleRegion "true"), the adaptive step size mechanism is turned off, no matter the user setting.

MaximumStepLength: Also called $\delta$. This parameter can be considered as the maximum voxel displacement between two iterations. The larger this parameter, the more aggressive the optimization. The parameter can be specified for each resolution, or for all resolutions at once.
example: (MaximumStepLength 1.0)
Default: mean voxel spacing of fixed and moving image. This seems to work well in general. This parameter only has influence when AutomaticParameterEstimation is used.

Todo:
: this class contains a lot of functional code, which actually does not belong here.
See also
AdaptiveStochasticLBFGS

Definition at line 103 of file elxAdaptiveStochasticLBFGS.h.

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

Data Structures

struct  MultiThreaderParameterType
 
struct  SettingsType
 

Public Types

typedef Superclass2::ConfigurationPointer ConfigurationPointer
 
typedef Superclass2::ConfigurationType ConfigurationType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass1::CostFunctionPointer CostFunctionPointer
 
typedef Superclass1::CostFunctionType CostFunctionType
 
typedef Superclass2::ElastixPointer ElastixPointer
 
typedef Superclass2::ElastixType ElastixType
 
typedef Superclass2::ITKBaseType ITKBaseType
 
typedef LineOptimizerType::Pointer LineOptimizerPointer
 
typedef itk::MoreThuenteLineSearchOptimizer LineOptimizerType
 
typedef LineSearchOptimizerType::Pointer LineSearchOptimizerPointer
 
typedef itk::LineSearchOptimizer LineSearchOptimizerType
 
typedef Superclass1::ParametersType ParametersType
 
typedef itk::SmartPointer< SelfPointer
 
typedef Superclass2::RegistrationPointer RegistrationPointer
 
typedef Superclass2::RegistrationType RegistrationType
 
typedef AdaptiveStochasticLBFGS Self
 
typedef itk::SizeValueType SizeValueType
 
typedef Superclass1::StopConditionType StopConditionType
 
typedef AdaptiveStochasticLBFGSOptimizer Superclass1
 
typedef OptimizerBase< TElastix > Superclass2
 
typedef unsigned int ThreadIdType
 
- Public Types inherited from itk::AdaptiveStochasticLBFGSOptimizer
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::CostFunctionType CostFunctionType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::ScaledCostFunctionPointer ScaledCostFunctionPointer
 
typedef Superclass::ScaledCostFunctionType ScaledCostFunctionType
 
typedef Superclass::ScalesType ScalesType
 
typedef AdaptiveStochasticLBFGSOptimizer Self
 
typedef Superclass::StopConditionType StopConditionType
 
typedef StandardStochasticGradientOptimizer Superclass
 
- Public Types inherited from itk::StandardStochasticGradientOptimizer
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::CostFunctionType CostFunctionType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::ScaledCostFunctionPointer ScaledCostFunctionPointer
 
typedef Superclass::ScaledCostFunctionType ScaledCostFunctionType
 
typedef Superclass::ScalesType ScalesType
 
typedef StandardStochasticGradientOptimizer Self
 
typedef Superclass::StopConditionType StopConditionType
 
typedef StochasticGradientDescentOptimizer Superclass
 
- Public Types inherited from itk::StochasticGradientDescentOptimizer
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::CostFunctionType CostFunctionType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::ScaledCostFunctionPointer ScaledCostFunctionPointer
 
typedef Superclass::ScaledCostFunctionType ScaledCostFunctionType
 
typedef Superclass::ScalesType ScalesType
 
typedef StochasticGradientDescentOptimizer Self
 
enum  StopConditionType {
  MaximumNumberOfIterations , MetricError , MinimumStepSize , InvalidDiagonalMatrix ,
  GradientMagnitudeTolerance , LineSearchError
}
 
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 AdvanceOneStep (void) override
 
void AfterEachIteration (void) override
 
void AfterEachResolution (void) override
 
void AfterRegistration (void) override
 
void BeforeEachResolution (void) override
 
void BeforeRegistration (void) override
 
 elxClassNameMacro ("AdaptiveStochasticLBFGS")
 
virtual bool GetAutomaticLBFGSStepsizeEstimation () const
 
virtual bool GetAutomaticParameterEstimation () const
 
virtual const char * GetClassName () const
 
virtual const SizeValueTypeGetMaximumNumberOfSamplingAttempts ()
 
virtual double GetMaximumStepLength () const
 
virtual void LBFGSUpdate (void)
 
void MetricErrorResponse (itk::ExceptionObject &err) override
 
void ResumeOptimization (void) override
 
virtual void SetAutomaticLBFGSStepsizeEstimation (bool _arg)
 
virtual void SetAutomaticParameterEstimation (bool _arg)
 
virtual void SetMaximumNumberOfSamplingAttempts (SizeValueType _arg)
 
virtual void SetMaximumStepLength (double _arg)
 
void SetNumberOfWorkUnits (ThreadIdType numberOfThreads)
 
void StartOptimization (void) override
 
void StopOptimization (void) override
 
- Public Member Functions inherited from itk::AdaptiveStochasticLBFGSOptimizer
virtual const char * GetClassName () const
 
virtual double GetSigmoidMax () const
 
virtual double GetSigmoidMin () const
 
virtual double GetSigmoidScale () const
 
virtual bool GetUseAdaptiveStepSizes () const
 
virtual bool GetUseSearchDirForAdaptiveStepSize () const
 
virtual void SetSigmoidMax (double _arg)
 
virtual void SetSigmoidMin (double _arg)
 
virtual void SetSigmoidScale (double _arg)
 
virtual void SetUseAdaptiveStepSizes (bool _arg)
 
virtual void SetUseSearchDirForAdaptiveStepSize (bool _arg)
 
- Public Member Functions inherited from itk::StandardStochasticGradientOptimizer
void AdvanceOneStep (void) override
 
virtual const char * GetClassName () const
 
virtual double GetCurrentTime () const
 
virtual double GetInitialTime () const
 
virtual double GetParam_a () const
 
virtual double GetParam_A () const
 
virtual double GetParam_alpha () const
 
virtual double GetParam_beta () const
 
virtual void ResetCurrentTimeToInitialTime (void)
 
virtual void SetInitialTime (double _arg)
 
virtual void SetParam_a (double _arg)
 
virtual void SetParam_A (double _arg)
 
virtual void SetParam_alpha (double _arg)
 
virtual void SetParam_beta (double _arg)
 
void StartOptimization (void) override
 
- Public Member Functions inherited from itk::StochasticGradientDescentOptimizer
virtual void AdvanceOneStep (void)
 
virtual const char * GetClassName () const
 
virtual unsigned int GetCurrentInnerIteration () const
 
virtual unsigned int GetCurrentIteration () const
 
virtual const DerivativeTypeGetGradient ()
 
virtual unsigned int GetLBFGSMemory () const
 
virtual const doubleGetLearningRate ()
 
virtual const unsigned long & GetNumberOfInnerIterations ()
 
virtual const unsigned long & GetNumberOfIterations ()
 
virtual const DerivativeTypeGetPreviousGradient ()
 
virtual const ParametersTypeGetPreviousPosition ()
 
virtual const DerivativeTypeGetSearchDir ()
 
virtual const StopConditionTypeGetStopCondition ()
 
virtual const doubleGetValue ()
 
virtual void MetricErrorResponse (ExceptionObject &err)
 
virtual void ResumeOptimization (void)
 
virtual void SetLearningRate (double _arg)
 
virtual void SetNumberOfIterations (unsigned long _arg)
 
void SetNumberOfWorkUnits (ThreadIdType numberOfThreads)
 
virtual void SetPreviousGradient (DerivativeType _arg)
 
virtual void SetPreviousPosition (ParametersType _arg)
 
virtual void SetUseEigen (bool _arg)
 
virtual void SetUseMultiThread (bool _arg)
 
virtual void SetUseOpenMP (bool _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::AdaptiveStochasticLBFGSOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::StandardStochasticGradientOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::StochasticGradientDescentOptimizer
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 Types

typedef itk::AdvancedTransform< CoordinateRepresentationType, itkGetStaticConstMacro(FixedImageDimension), itkGetStaticConstMacro(MovingImageDimension) > AdvancedTransformType
 
typedef itk::ComputeDisplacementDistribution< FixedImageType, TransformTypeComputeDisplacementDistributionType
 
typedef itk::ComputeJacobianTerms< FixedImageType, TransformTypeComputeJacobianTermsType
 
typedef TransformType::ScalarType CoordinateRepresentationType
 
typedef itk::Array< doubleDiagonalMatrixType
 
typedef FixedImageType::IndexType FixedImageIndexType
 
typedef FixedImageType::PointType FixedImagePointType
 
typedef FixedImageType::RegionType FixedImageRegionType
 
typedef RegistrationType::FixedImageType FixedImageType
 
typedef ImageGridSamplerType::Pointer ImageGridSamplerPointer
 
typedef itk::ImageGridSampler< FixedImageTypeImageGridSamplerType
 
typedef ImageRadomSampleContainerType::Pointer ImageRadomSampleContainerPointer
 
typedef ImageRandomSamplerType::ImageSampleContainerType ImageRadomSampleContainerType
 
typedef ImageRandomCoordinateSamplerType::Pointer ImageRandomCoordinateSamplerPointer
 
typedef itk::ImageRandomCoordinateSampler< FixedImageTypeImageRandomCoordinateSamplerType
 
typedef ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
 
typedef itk::ImageRandomSamplerBase< FixedImageTypeImageRandomSamplerBaseType
 
typedef ImageRandomSamplerType::Pointer ImageRandomSamplerPointer
 
typedef itk::ImageRandomSampler< FixedImageTypeImageRandomSamplerType
 
typedef ImageSampleContainerType::Pointer ImageSampleContainerPointer
 
typedef ImageGridSamplerType::ImageSampleContainerType ImageSampleContainerType
 
typedef ImageSamplerBaseType::Pointer ImageSamplerBasePointer
 
typedef itk::ImageSamplerBase< FixedImageTypeImageSamplerBaseType
 
typedef ImageSamplerBaseType::ImageSampleType ImageSampleType
 
typedef RegistrationType::ITKBaseType itkRegistrationType
 
typedef TransformType::JacobianType JacobianType
 
typedef JacobianType::ValueType JacobianValueType
 
typedef RegistrationType::MovingImageType MovingImageType
 
typedef AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
 
typedef ProgressCommand::Pointer ProgressCommandPointer
 
typedef ProgressCommand ProgressCommandType
 
typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
 
typedef itk::Array< doubleRhoType
 
typedef std::vector< SettingsTypeSettingsVectorType
 
typedef std::vector< ParametersTypeSType
 
typedef JacobianType TransformJacobianType
 
typedef itkRegistrationType::TransformType TransformType
 
typedef std::vector< DerivativeTypeYType
 
- Protected Types inherited from itk::StochasticGradientDescentOptimizer
typedef itk::PlatformMultiThreader ThreaderType
 
typedef ThreaderType::WorkUnitInfo ThreadInfoType
 

Protected Member Functions

 AdaptiveStochasticLBFGS ()
 
virtual void AddRandomPerturbation (ParametersType &parameters, double sigma)
 
virtual void AutomaticLBFGSStepsizeEstimation (void)
 
virtual void AutomaticParameterEstimation (void)
 
virtual void AutomaticParameterEstimationOriginal (void)
 
virtual void AutomaticParameterEstimationUsingDisplacementDistribution (void)
 
virtual void CheckForAdvancedTransform (void)
 
virtual void ComputeDiagonalMatrix (DiagonalMatrixType &diag_H0)
 
virtual void ComputeSearchDirection (const DerivativeType &gradient, DerivativeType &searchDir)
 
virtual void GetScaledDerivativeWithExceptionHandling (const ParametersType &parameters, DerivativeType &derivative)
 
 itkStaticConstMacro (FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
 
 itkStaticConstMacro (MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
 
virtual void PrintSettingsVector (const SettingsVectorType &settings) const
 
virtual void SampleGradients (const ParametersType &mu0, double perturbationSigma, double &gg, double &ee)
 
virtual void StoreCurrentPoint (const ParametersType &step, const DerivativeType &grad_dif)
 
 ~AdaptiveStochasticLBFGS () override
 
- Protected Member Functions inherited from itk::AdaptiveStochasticLBFGSOptimizer
 AdaptiveStochasticLBFGSOptimizer ()
 
void UpdateCurrentTime (void) override
 
 ~AdaptiveStochasticLBFGSOptimizer () override
 
- Protected Member Functions inherited from itk::StandardStochasticGradientOptimizer
virtual double Compute_a (double k) const
 
virtual double Compute_beta (double k) const
 
 StandardStochasticGradientOptimizer ()
 
virtual void UpdateCurrentTime (void)
 
 ~StandardStochasticGradientOptimizer () override
 
- Protected Member Functions inherited from itk::StochasticGradientDescentOptimizer
void PrintSelf (std::ostream &os, Indent indent) const override
 
 StochasticGradientDescentOptimizer ()
 
 ~StochasticGradientDescentOptimizer () 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

AdvancedTransformType::Pointer m_AdvancedTransform
 
unsigned int m_Bound
 
unsigned int m_CurrentT
 
RhoType m_HessianFillValue
 
double m_NoiseFactor
 
SizeValueType m_NumberOfGradientMeasurements
 
SizeValueType m_NumberOfJacobianMeasurements
 
SizeValueType m_NumberOfSamplesForExactGradient
 
DerivativeType m_PreviousCurvatureGradient
 
unsigned int m_PreviousT
 
RandomGeneratorType::Pointer m_RandomGenerator
 
RhoType m_Rho
 
SType m_S
 
SettingsVectorType m_SettingsVector
 
double m_SigmoidScaleFactor
 
double m_WindowScale
 
YType m_Y
 
- Protected Attributes inherited from itk::AdaptiveStochasticLBFGSOptimizer
double m_SearchLengthScale
 
std::string m_StepSizeStrategy
 
unsigned long m_UpdateFrequenceL
 
bool m_UseAdaptiveStepSizes
 
bool m_UseSearchDirForAdaptiveStepSize
 
- Protected Attributes inherited from itk::StandardStochasticGradientOptimizer
double m_CurrentTime
 
bool m_UseConstantStep
 
- Protected Attributes inherited from itk::StochasticGradientDescentOptimizer
unsigned long m_CurrentInnerIteration
 
unsigned long m_CurrentIteration
 
DerivativeType m_Gradient
 
unsigned long m_LBFGSMemory
 
double m_LearningRate
 
ParametersType m_MeanSearchDir
 
unsigned long m_NumberOfInnerIterations
 
unsigned long m_NumberOfIterations
 
DerivativeType m_PrePreviousGradient
 
ParametersType m_PrePreviousSearchDir
 
DerivativeType m_PreviousGradient
 
ParametersType m_PreviousPosition
 
ParametersType m_PreviousSearchDir
 
ParametersType m_SearchDir
 
bool m_Stop
 
StopConditionType m_StopCondition
 
ThreaderType::Pointer m_Threader
 
double m_Value
 
- 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

 AdaptiveStochasticLBFGS (const Self &)
 
void operator= (const Self &)
 
void ThreadedAdvanceOneStep (ThreadIdType threadId, ParametersType &newPosition)
 

Static Private Member Functions

static itk::ITK_THREAD_RETURN_TYPE AdvanceOneStepThreaderCallback (void *arg)
 

Private Attributes

bool m_AutomaticLBFGSStepsizeEstimation
 
bool m_AutomaticParameterEstimation
 
bool m_AutomaticParameterEstimationDone
 
SizeValueType m_CurrentNumberOfSamplingAttempts
 
SizeValueType m_MaxBandCovSize
 
SizeValueType m_MaximumNumberOfSamplingAttempts
 
double m_MaximumStepLength
 
SizeValueType m_NumberOfBandStructureSamples
 
SizeValueType m_NumberOfInnerLoopSamples
 
SizeValueType m_NumberOfSpatialSamples
 
bool m_OriginalButSigmoidToDefault
 
SizeValueType m_OutsideIterations
 
SizeValueType m_PreviousErrorAtIteration
 
bool m_UseAdaptiveLBFGSStepSizes
 
bool m_UseNoiseCompensation
 
bool m_UseNoiseFactor
 

Member Typedef Documentation

◆ AdvancedTransformType

template<class TElastix >
typedef itk::AdvancedTransform< CoordinateRepresentationType, itkGetStaticConstMacro(FixedImageDimension), itkGetStaticConstMacro(MovingImageDimension) > elastix::AdaptiveStochasticLBFGS< TElastix >::AdvancedTransformType
protected

Definition at line 286 of file elxAdaptiveStochasticLBFGS.h.

◆ ComputeDisplacementDistributionType

template<class TElastix >
typedef itk::ComputeDisplacementDistribution< FixedImageType,TransformType > elastix::AdaptiveStochasticLBFGS< TElastix >::ComputeDisplacementDistributionType
protected

Definition at line 244 of file elxAdaptiveStochasticLBFGS.h.

◆ ComputeJacobianTermsType

template<class TElastix >
typedef itk::ComputeJacobianTerms< FixedImageType,TransformType > elastix::AdaptiveStochasticLBFGS< TElastix >::ComputeJacobianTermsType
protected

Definition at line 238 of file elxAdaptiveStochasticLBFGS.h.

◆ ConfigurationPointer

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

Definition at line 138 of file elxAdaptiveStochasticLBFGS.h.

◆ ConfigurationType

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

Definition at line 137 of file elxAdaptiveStochasticLBFGS.h.

◆ ConstPointer

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

Definition at line 114 of file elxAdaptiveStochasticLBFGS.h.

◆ CoordinateRepresentationType

template<class TElastix >
typedef TransformType::ScalarType elastix::AdaptiveStochasticLBFGS< TElastix >::CoordinateRepresentationType
protected

Definition at line 282 of file elxAdaptiveStochasticLBFGS.h.

◆ CostFunctionPointer

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

Definition at line 131 of file elxAdaptiveStochasticLBFGS.h.

◆ CostFunctionType

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

Typedef's inherited from Superclass1.

Definition at line 130 of file elxAdaptiveStochasticLBFGS.h.

◆ DiagonalMatrixType

template<class TElastix >
typedef itk::Array< double > elastix::AdaptiveStochasticLBFGS< TElastix >::DiagonalMatrixType
protected

Definition at line 294 of file elxAdaptiveStochasticLBFGS.h.

◆ ElastixPointer

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

Definition at line 136 of file elxAdaptiveStochasticLBFGS.h.

◆ ElastixType

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

Typedef's inherited from Superclass2.

Definition at line 135 of file elxAdaptiveStochasticLBFGS.h.

◆ FixedImageIndexType

template<class TElastix >
typedef FixedImageType::IndexType elastix::AdaptiveStochasticLBFGS< TElastix >::FixedImageIndexType
protected

Definition at line 232 of file elxAdaptiveStochasticLBFGS.h.

◆ FixedImagePointType

template<class TElastix >
typedef FixedImageType::PointType elastix::AdaptiveStochasticLBFGS< TElastix >::FixedImagePointType
protected

Definition at line 233 of file elxAdaptiveStochasticLBFGS.h.

◆ FixedImageRegionType

template<class TElastix >
typedef FixedImageType::RegionType elastix::AdaptiveStochasticLBFGS< TElastix >::FixedImageRegionType
protected

Definition at line 231 of file elxAdaptiveStochasticLBFGS.h.

◆ FixedImageType

template<class TElastix >
typedef RegistrationType::FixedImageType elastix::AdaptiveStochasticLBFGS< TElastix >::FixedImageType
protected

Protected typedefs

Definition at line 228 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageGridSamplerPointer

template<class TElastix >
typedef ImageGridSamplerType::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::ImageGridSamplerPointer
protected

Definition at line 268 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageGridSamplerType

template<class TElastix >
typedef itk::ImageGridSampler< FixedImageType > elastix::AdaptiveStochasticLBFGS< TElastix >::ImageGridSamplerType
protected

Image grid sampler.

Definition at line 267 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRadomSampleContainerPointer

template<class TElastix >
typedef ImageRadomSampleContainerType::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRadomSampleContainerPointer
protected

Definition at line 264 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRadomSampleContainerType

template<class TElastix >
typedef ImageRandomSamplerType::ImageSampleContainerType elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRadomSampleContainerType
protected

Definition at line 262 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomCoordinateSamplerPointer

template<class TElastix >
typedef ImageRandomCoordinateSamplerType::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRandomCoordinateSamplerPointer
protected

Definition at line 255 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomCoordinateSamplerType

template<class TElastix >
typedef itk::ImageRandomCoordinateSampler<FixedImageType> elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRandomCoordinateSamplerType
protected

Definition at line 253 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomSamplerBasePointer

template<class TElastix >
typedef ImageRandomSamplerBaseType::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRandomSamplerBasePointer
protected

Definition at line 251 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomSamplerBaseType

template<class TElastix >
typedef itk::ImageRandomSamplerBase<FixedImageType> elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRandomSamplerBaseType
protected

Definition at line 249 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomSamplerPointer

template<class TElastix >
typedef ImageRandomSamplerType::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRandomSamplerPointer
protected

Definition at line 260 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomSamplerType

template<class TElastix >
typedef itk::ImageRandomSampler< FixedImageType > elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRandomSamplerType
protected

Image random sampler.

Definition at line 259 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageSampleContainerPointer

template<class TElastix >
typedef ImageSampleContainerType::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::ImageSampleContainerPointer
protected

Definition at line 271 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageSampleContainerType

template<class TElastix >
typedef ImageGridSamplerType::ImageSampleContainerType elastix::AdaptiveStochasticLBFGS< TElastix >::ImageSampleContainerType
protected

Definition at line 270 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageSamplerBasePointer

template<class TElastix >
typedef ImageSamplerBaseType::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::ImageSamplerBasePointer
protected

Definition at line 248 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageSamplerBaseType

template<class TElastix >
typedef itk::ImageSamplerBase<FixedImageType> elastix::AdaptiveStochasticLBFGS< TElastix >::ImageSamplerBaseType
protected

Samplers:

Definition at line 247 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageSampleType

template<class TElastix >
typedef ImageSamplerBaseType::ImageSampleType elastix::AdaptiveStochasticLBFGS< TElastix >::ImageSampleType
protected

Definition at line 256 of file elxAdaptiveStochasticLBFGS.h.

◆ ITKBaseType

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

Definition at line 141 of file elxAdaptiveStochasticLBFGS.h.

◆ itkRegistrationType

template<class TElastix >
typedef RegistrationType::ITKBaseType elastix::AdaptiveStochasticLBFGS< TElastix >::itkRegistrationType
protected

Definition at line 234 of file elxAdaptiveStochasticLBFGS.h.

◆ JacobianType

template<class TElastix >
typedef TransformType::JacobianType elastix::AdaptiveStochasticLBFGS< TElastix >::JacobianType
protected

Definition at line 236 of file elxAdaptiveStochasticLBFGS.h.

◆ JacobianValueType

template<class TElastix >
typedef JacobianType::ValueType elastix::AdaptiveStochasticLBFGS< TElastix >::JacobianValueType
protected

Definition at line 239 of file elxAdaptiveStochasticLBFGS.h.

◆ LineOptimizerPointer

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

Definition at line 155 of file elxAdaptiveStochasticLBFGS.h.

◆ LineOptimizerType

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

Definition at line 154 of file elxAdaptiveStochasticLBFGS.h.

◆ LineSearchOptimizerPointer

template<class TElastix >
typedef LineSearchOptimizerType::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::LineSearchOptimizerPointer

Definition at line 153 of file elxAdaptiveStochasticLBFGS.h.

◆ LineSearchOptimizerType

template<class TElastix >
typedef itk::LineSearchOptimizer elastix::AdaptiveStochasticLBFGS< TElastix >::LineSearchOptimizerType

Definition at line 151 of file elxAdaptiveStochasticLBFGS.h.

◆ MovingImageType

template<class TElastix >
typedef RegistrationType::MovingImageType elastix::AdaptiveStochasticLBFGS< TElastix >::MovingImageType
protected

Definition at line 229 of file elxAdaptiveStochasticLBFGS.h.

◆ NonZeroJacobianIndicesType

template<class TElastix >
typedef AdvancedTransformType::NonZeroJacobianIndicesType elastix::AdaptiveStochasticLBFGS< TElastix >::NonZeroJacobianIndicesType
protected

Definition at line 288 of file elxAdaptiveStochasticLBFGS.h.

◆ ParametersType

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

Typedef for the ParametersType.

Definition at line 149 of file elxAdaptiveStochasticLBFGS.h.

◆ Pointer

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

Definition at line 113 of file elxAdaptiveStochasticLBFGS.h.

◆ ProgressCommandPointer

template<class TElastix >
typedef ProgressCommand::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::ProgressCommandPointer
protected

Definition at line 276 of file elxAdaptiveStochasticLBFGS.h.

◆ ProgressCommandType

template<class TElastix >
typedef ProgressCommand elastix::AdaptiveStochasticLBFGS< TElastix >::ProgressCommandType
protected

Definition at line 275 of file elxAdaptiveStochasticLBFGS.h.

◆ RandomGeneratorType

template<class TElastix >
typedef itk::Statistics::MersenneTwisterRandomVariateGenerator elastix::AdaptiveStochasticLBFGS< TElastix >::RandomGeneratorType
protected

Other protected typedefs

Definition at line 274 of file elxAdaptiveStochasticLBFGS.h.

◆ RegistrationPointer

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

Definition at line 140 of file elxAdaptiveStochasticLBFGS.h.

◆ RegistrationType

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

Definition at line 139 of file elxAdaptiveStochasticLBFGS.h.

◆ RhoType

template<class TElastix >
typedef itk::Array< double > elastix::AdaptiveStochasticLBFGS< TElastix >::RhoType
protected

For L-BFGS usage.

Definition at line 291 of file elxAdaptiveStochasticLBFGS.h.

◆ Self

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

Standard ITK.

Definition at line 110 of file elxAdaptiveStochasticLBFGS.h.

◆ SettingsVectorType

template<class TElastix >
typedef std::vector<SettingsType> elastix::AdaptiveStochasticLBFGS< TElastix >::SettingsVectorType
protected

Definition at line 241 of file elxAdaptiveStochasticLBFGS.h.

◆ SizeValueType

template<class TElastix >
typedef itk::SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::SizeValueType

Definition at line 142 of file elxAdaptiveStochasticLBFGS.h.

◆ StopConditionType

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

Definition at line 132 of file elxAdaptiveStochasticLBFGS.h.

◆ SType

template<class TElastix >
typedef std::vector< ParametersType > elastix::AdaptiveStochasticLBFGS< TElastix >::SType
protected

Definition at line 292 of file elxAdaptiveStochasticLBFGS.h.

◆ Superclass1

template<class TElastix >
typedef AdaptiveStochasticLBFGSOptimizer elastix::AdaptiveStochasticLBFGS< TElastix >::Superclass1

Definition at line 111 of file elxAdaptiveStochasticLBFGS.h.

◆ Superclass2

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

Definition at line 112 of file elxAdaptiveStochasticLBFGS.h.

◆ ThreadIdType

template<class TElastix >
typedef unsigned int elastix::AdaptiveStochasticLBFGS< TElastix >::ThreadIdType

Type to count and reference number of threads

Definition at line 217 of file elxAdaptiveStochasticLBFGS.h.

◆ TransformJacobianType

template<class TElastix >
typedef JacobianType elastix::AdaptiveStochasticLBFGS< TElastix >::TransformJacobianType
protected

Typedefs for support of sparse Jacobians and AdvancedTransforms.

Definition at line 279 of file elxAdaptiveStochasticLBFGS.h.

◆ TransformType

template<class TElastix >
typedef itkRegistrationType::TransformType elastix::AdaptiveStochasticLBFGS< TElastix >::TransformType
protected

Definition at line 235 of file elxAdaptiveStochasticLBFGS.h.

◆ YType

template<class TElastix >
typedef std::vector< DerivativeType > elastix::AdaptiveStochasticLBFGS< TElastix >::YType
protected

Definition at line 293 of file elxAdaptiveStochasticLBFGS.h.

Constructor & Destructor Documentation

◆ AdaptiveStochasticLBFGS() [1/2]

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

◆ ~AdaptiveStochasticLBFGS()

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

Definition at line 297 of file elxAdaptiveStochasticLBFGS.h.

◆ AdaptiveStochasticLBFGS() [2/2]

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

Member Function Documentation

◆ AddRandomPerturbation()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::AddRandomPerturbation ( ParametersType parameters,
double  sigma 
)
protectedvirtual

Helper function that adds a random perturbation delta to the input parameters, with delta ~ sigma * N(0,I). Used by SampleGradients.

◆ AdvanceOneStep()

template<class TElastix >
void elastix::AdaptiveStochasticLBFGS< TElastix >::AdvanceOneStep ( void  )
overridevirtual

AdvanceOneStep.

Reimplemented from itk::StochasticGradientDescentOptimizer.

◆ AdvanceOneStepThreaderCallback()

template<class TElastix >
static itk::ITK_THREAD_RETURN_TYPE elastix::AdaptiveStochasticLBFGS< TElastix >::AdvanceOneStepThreaderCallback ( void *  arg)
staticprivate

The callback function.

◆ AfterEachIteration()

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

Reimplemented from elastix::BaseComponent.

◆ AfterEachResolution()

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

Reimplemented from elastix::BaseComponent.

◆ AfterRegistration()

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

Reimplemented from elastix::BaseComponent.

◆ AutomaticLBFGSStepsizeEstimation()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::AutomaticLBFGSStepsizeEstimation ( void  )
protectedvirtual

◆ AutomaticParameterEstimation()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::AutomaticParameterEstimation ( void  )
protectedvirtual

Select different method to estimate some reasonable values for the parameters SP_a, SP_alpha (=1), SigmoidMin, SigmoidMax (=1), and SigmoidScale.

◆ AutomaticParameterEstimationOriginal()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::AutomaticParameterEstimationOriginal ( void  )
protectedvirtual

Original estimation method to get the reasonable values for the parameters SP_a, SP_alpha (=1), SigmoidMin, SigmoidMax (=1), and SigmoidScale.

◆ AutomaticParameterEstimationUsingDisplacementDistribution()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::AutomaticParameterEstimationUsingDisplacementDistribution ( void  )
protectedvirtual

Estimates some reasonable values for the parameters using displacement distribution SP_a, SP_alpha (=1)

◆ BeforeEachResolution()

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

Reimplemented from elastix::BaseComponent.

◆ BeforeRegistration()

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

Methods invoked by elastix, in which parameters can be set and progress information can be printed.

Reimplemented from elastix::BaseComponent.

◆ CheckForAdvancedTransform()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::CheckForAdvancedTransform ( void  )
protectedvirtual

Check if the transform is an advanced transform. Called by Initialize.

◆ ComputeDiagonalMatrix()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::ComputeDiagonalMatrix ( DiagonalMatrixType diag_H0)
protectedvirtual

Compute H0

Override this method if not satisfied with the default choice.

◆ ComputeSearchDirection()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::ComputeSearchDirection ( const DerivativeType gradient,
DerivativeType searchDir 
)
protectedvirtual

Compute -Hg

COMPUTE -H*G USING THE FORMULA GIVEN IN: Nocedal, J. 1980, "Updating quasi-Newton matrices with limited storage", Mathematics of Computation, Vol.24, No.151, pp. 773-782.

◆ elxClassNameMacro()

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

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

◆ GetAutomaticLBFGSStepsizeEstimation()

template<class TElastix >
virtual bool elastix::AdaptiveStochasticLBFGS< TElastix >::GetAutomaticLBFGSStepsizeEstimation ( ) const
virtual

◆ GetAutomaticParameterEstimation()

template<class TElastix >
virtual bool elastix::AdaptiveStochasticLBFGS< TElastix >::GetAutomaticParameterEstimation ( ) const
virtual

◆ GetClassName()

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

Run-time type information (and related methods).

Reimplemented from itk::AdaptiveStochasticLBFGSOptimizer.

◆ GetMaximumNumberOfSamplingAttempts()

template<class TElastix >
virtual const SizeValueType & elastix::AdaptiveStochasticLBFGS< TElastix >::GetMaximumNumberOfSamplingAttempts ( )
virtual

Get the MaximumNumberOfSamplingAttempts.

◆ GetMaximumStepLength()

template<class TElastix >
virtual double elastix::AdaptiveStochasticLBFGS< TElastix >::GetMaximumStepLength ( ) const
virtual

◆ GetScaledDerivativeWithExceptionHandling()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::GetScaledDerivativeWithExceptionHandling ( const ParametersType parameters,
DerivativeType derivative 
)
protectedvirtual

Helper function, which calls GetScaledValueAndDerivative and does some exception handling. Used by SampleGradients.

◆ itkStaticConstMacro() [1/2]

template<class TElastix >
elastix::AdaptiveStochasticLBFGS< TElastix >::itkStaticConstMacro ( FixedImageDimension  ,
unsigned int  ,
FixedImageType::ImageDimension   
)
protected

◆ itkStaticConstMacro() [2/2]

template<class TElastix >
elastix::AdaptiveStochasticLBFGS< TElastix >::itkStaticConstMacro ( MovingImageDimension  ,
unsigned int  ,
MovingImageType::ImageDimension   
)
protected

◆ LBFGSUpdate()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::LBFGSUpdate ( void  )
virtual

LBFGS Update step.

◆ MetricErrorResponse()

template<class TElastix >
void elastix::AdaptiveStochasticLBFGS< TElastix >::MetricErrorResponse ( itk::ExceptionObject &  err)
override

Stop optimization and pass on exception.

◆ New()

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

Method for creation through the object factory.

◆ operator=()

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

◆ PrintSettingsVector()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::PrintSettingsVector ( const SettingsVectorType settings) const
protectedvirtual

Print the contents of the settings vector to elxout.

◆ ResumeOptimization()

template<class TElastix >
void elastix::AdaptiveStochasticLBFGS< TElastix >::ResumeOptimization ( void  )
overridevirtual

If automatic gain estimation is desired, then estimate SP_a, SP_alpha SigmoidScale, SigmoidMax, SigmoidMin. After that call Superclass' implementation.

Reimplemented from itk::StochasticGradientDescentOptimizer.

◆ SampleGradients()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::SampleGradients ( const ParametersType mu0,
double  perturbationSigma,
double gg,
double ee 
)
protectedvirtual

Measure some derivatives, exact and approximated. Returns the squared magnitude of the gradient and approximation error. Needed for the automatic parameter estimation. Gradients are measured at position mu_n, which are generated according to: mu_n - mu_0 ~ N(0, perturbationSigma^2 I ); gg = g^T g, etc.

◆ SetAutomaticLBFGSStepsizeEstimation()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::SetAutomaticLBFGSStepsizeEstimation ( bool  _arg)
virtual

Set/Get whether automatic LBFGS step size estimation is desired.

◆ SetAutomaticParameterEstimation()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::SetAutomaticParameterEstimation ( bool  _arg)
virtual

Set/Get whether automatic parameter estimation is desired. If true, make sure to set the maximum step length.

The following parameters are automatically determined: SP_a, SP_alpha (=1), SigmoidMin, SigmoidMax (=1), SigmoidScale. A usually suitable value for SP_A is 20, which is the default setting, if not specified by the user.

◆ SetMaximumNumberOfSamplingAttempts()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::SetMaximumNumberOfSamplingAttempts ( SizeValueType  _arg)
virtual

Set the MaximumNumberOfSamplingAttempts.

◆ SetMaximumStepLength()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::SetMaximumStepLength ( double  _arg)
virtual

Set/Get maximum step length.

◆ SetNumberOfWorkUnits()

template<class TElastix >
void elastix::AdaptiveStochasticLBFGS< TElastix >::SetNumberOfWorkUnits ( ThreadIdType  numberOfThreads)
inline

Set the number of threads.

Definition at line 220 of file elxAdaptiveStochasticLBFGS.h.

◆ StartOptimization()

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

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

◆ StopOptimization()

template<class TElastix >
void elastix::AdaptiveStochasticLBFGS< TElastix >::StopOptimization ( void  )
overridevirtual

Stop optimization.

See also
StopOptimization

Reimplemented from itk::StochasticGradientDescentOptimizer.

◆ StoreCurrentPoint()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::StoreCurrentPoint ( const ParametersType step,
const DerivativeType grad_dif 
)
protectedvirtual

Store s = x_k - x_k-1 and y = g_k - g_k-1 in m_S and m_Y, and store 1/(ys) in m_Rho.

◆ ThreadedAdvanceOneStep()

template<class TElastix >
void elastix::AdaptiveStochasticLBFGS< TElastix >::ThreadedAdvanceOneStep ( ThreadIdType  threadId,
ParametersType newPosition 
)
inlineprivate

The threaded implementation of AdvanceOneStep().

Field Documentation

◆ m_AdvancedTransform

template<class TElastix >
AdvancedTransformType::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::m_AdvancedTransform
protected

The transform stored as AdvancedTransform

Definition at line 308 of file elxAdaptiveStochasticLBFGS.h.

◆ m_AutomaticLBFGSStepsizeEstimation

template<class TElastix >
bool elastix::AdaptiveStochasticLBFGS< TElastix >::m_AutomaticLBFGSStepsizeEstimation
private

Definition at line 420 of file elxAdaptiveStochasticLBFGS.h.

◆ m_AutomaticParameterEstimation

template<class TElastix >
bool elastix::AdaptiveStochasticLBFGS< TElastix >::m_AutomaticParameterEstimation
private

Definition at line 419 of file elxAdaptiveStochasticLBFGS.h.

◆ m_AutomaticParameterEstimationDone

template<class TElastix >
bool elastix::AdaptiveStochasticLBFGS< TElastix >::m_AutomaticParameterEstimationDone
private

Definition at line 427 of file elxAdaptiveStochasticLBFGS.h.

◆ m_Bound

template<class TElastix >
unsigned int elastix::AdaptiveStochasticLBFGS< TElastix >::m_Bound
protected

Definition at line 393 of file elxAdaptiveStochasticLBFGS.h.

◆ m_CurrentNumberOfSamplingAttempts

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_CurrentNumberOfSamplingAttempts
private

Definition at line 425 of file elxAdaptiveStochasticLBFGS.h.

◆ m_CurrentT

template<class TElastix >
unsigned int elastix::AdaptiveStochasticLBFGS< TElastix >::m_CurrentT
protected

Definition at line 391 of file elxAdaptiveStochasticLBFGS.h.

◆ m_HessianFillValue

template<class TElastix >
RhoType elastix::AdaptiveStochasticLBFGS< TElastix >::m_HessianFillValue
protected

Definition at line 398 of file elxAdaptiveStochasticLBFGS.h.

◆ m_MaxBandCovSize

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_MaxBandCovSize
private

Private variables for band size estimation of covariance matrix.

Definition at line 432 of file elxAdaptiveStochasticLBFGS.h.

◆ m_MaximumNumberOfSamplingAttempts

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_MaximumNumberOfSamplingAttempts
private

Private variables for the sampling attempts.

Definition at line 424 of file elxAdaptiveStochasticLBFGS.h.

◆ m_MaximumStepLength

template<class TElastix >
double elastix::AdaptiveStochasticLBFGS< TElastix >::m_MaximumStepLength
private

Definition at line 421 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NoiseFactor

template<class TElastix >
double elastix::AdaptiveStochasticLBFGS< TElastix >::m_NoiseFactor
protected

Definition at line 390 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfBandStructureSamples

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_NumberOfBandStructureSamples
private

Definition at line 433 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfGradientMeasurements

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_NumberOfGradientMeasurements
protected

Some options for automatic parameter estimation.

Definition at line 303 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfInnerLoopSamples

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_NumberOfInnerLoopSamples
private

Definition at line 434 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfJacobianMeasurements

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_NumberOfJacobianMeasurements
protected

Definition at line 304 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfSamplesForExactGradient

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_NumberOfSamplesForExactGradient
protected

Definition at line 305 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfSpatialSamples

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_NumberOfSpatialSamples
private

Definition at line 435 of file elxAdaptiveStochasticLBFGS.h.

◆ m_OriginalButSigmoidToDefault

template<class TElastix >
bool elastix::AdaptiveStochasticLBFGS< TElastix >::m_OriginalButSigmoidToDefault
private

Definition at line 439 of file elxAdaptiveStochasticLBFGS.h.

◆ m_OutsideIterations

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_OutsideIterations
private

Definition at line 429 of file elxAdaptiveStochasticLBFGS.h.

◆ m_PreviousCurvatureGradient

template<class TElastix >
DerivativeType elastix::AdaptiveStochasticLBFGS< TElastix >::m_PreviousCurvatureGradient
protected

Setting: the minimum gradient magnitude.

The optimizer stops when: ||CurrentGradient|| < GradientMagnitudeTolerance * max(1, ||CurrentPosition||)

Definition at line 388 of file elxAdaptiveStochasticLBFGS.h.

◆ m_PreviousErrorAtIteration

template<class TElastix >
SizeValueType elastix::AdaptiveStochasticLBFGS< TElastix >::m_PreviousErrorAtIteration
private

Definition at line 426 of file elxAdaptiveStochasticLBFGS.h.

◆ m_PreviousT

template<class TElastix >
unsigned int elastix::AdaptiveStochasticLBFGS< TElastix >::m_PreviousT
protected

Definition at line 392 of file elxAdaptiveStochasticLBFGS.h.

◆ m_RandomGenerator

template<class TElastix >
RandomGeneratorType::Pointer elastix::AdaptiveStochasticLBFGS< TElastix >::m_RandomGenerator
protected

RandomGenerator for AddRandomPerturbation.

Definition at line 311 of file elxAdaptiveStochasticLBFGS.h.

◆ m_Rho

template<class TElastix >
RhoType elastix::AdaptiveStochasticLBFGS< TElastix >::m_Rho
protected

Definition at line 395 of file elxAdaptiveStochasticLBFGS.h.

◆ m_S

template<class TElastix >
SType elastix::AdaptiveStochasticLBFGS< TElastix >::m_S
protected

Definition at line 396 of file elxAdaptiveStochasticLBFGS.h.

◆ m_SettingsVector

template<class TElastix >
SettingsVectorType elastix::AdaptiveStochasticLBFGS< TElastix >::m_SettingsVector
protected

Variable to store the automatically determined settings for each resolution.

Definition at line 300 of file elxAdaptiveStochasticLBFGS.h.

◆ m_SigmoidScaleFactor

template<class TElastix >
double elastix::AdaptiveStochasticLBFGS< TElastix >::m_SigmoidScaleFactor
protected

Definition at line 313 of file elxAdaptiveStochasticLBFGS.h.

◆ m_UseAdaptiveLBFGSStepSizes

template<class TElastix >
bool elastix::AdaptiveStochasticLBFGS< TElastix >::m_UseAdaptiveLBFGSStepSizes
private

Definition at line 442 of file elxAdaptiveStochasticLBFGS.h.

◆ m_UseNoiseCompensation

template<class TElastix >
bool elastix::AdaptiveStochasticLBFGS< TElastix >::m_UseNoiseCompensation
private

The flag of using noise compensation.

Definition at line 438 of file elxAdaptiveStochasticLBFGS.h.

◆ m_UseNoiseFactor

template<class TElastix >
bool elastix::AdaptiveStochasticLBFGS< TElastix >::m_UseNoiseFactor
private

Definition at line 440 of file elxAdaptiveStochasticLBFGS.h.

◆ m_WindowScale

template<class TElastix >
double elastix::AdaptiveStochasticLBFGS< TElastix >::m_WindowScale
protected

Definition at line 399 of file elxAdaptiveStochasticLBFGS.h.

◆ m_Y

template<class TElastix >
YType elastix::AdaptiveStochasticLBFGS< TElastix >::m_Y
protected

Definition at line 397 of file elxAdaptiveStochasticLBFGS.h.



Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo