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 >:
Inheritance graph
[legend]

Data Structures

struct  MultiThreaderParameterType
 
struct  SettingsType
 

Public Types

using ConstPointer = itk::SmartPointer< const Self >
 
using ITKBaseType = typename Superclass2::ITKBaseType
 
using LineOptimizerPointer = LineOptimizerType::Pointer
 
using LineOptimizerType = itk::MoreThuenteLineSearchOptimizer
 
using LineSearchOptimizerPointer = LineSearchOptimizerType::Pointer
 
using LineSearchOptimizerType = itk::LineSearchOptimizer
 
using Pointer = itk::SmartPointer< Self >
 
using Self = AdaptiveStochasticLBFGS
 
using SizeValueType = itk::SizeValueType
 
using Superclass1 = AdaptiveStochasticLBFGSOptimizer
 
using Superclass2 = OptimizerBase< TElastix >
 
using ThreadIdType = unsigned int
 
- Public Types inherited from itk::AdaptiveStochasticLBFGSOptimizer
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = AdaptiveStochasticLBFGSOptimizer
 
using Superclass = StandardStochasticGradientOptimizer
 
- Public Types inherited from itk::StandardStochasticGradientOptimizer
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = StandardStochasticGradientOptimizer
 
enum  StopConditionType
 
using Superclass = StochasticGradientDescentOptimizer
 
- Public Types inherited from itk::StochasticGradientDescentOptimizer
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using ScaledCostFunctionPointer = ScaledCostFunctionType::Pointer
 
using ScaledCostFunctionType = ScaledSingleValuedCostFunction
 
using ScalesType = NonLinearOptimizer::ScalesType
 
using Self = StochasticGradientDescentOptimizer
 
enum  StopConditionType {
  MaximumNumberOfIterations , MetricError , MinimumStepSize , InvalidDiagonalMatrix ,
  GradientMagnitudeTolerance , LineSearchError
}
 
using Superclass = ScaledSingleValuedNonLinearOptimizer
 
- Public Types inherited from itk::ScaledSingleValuedNonLinearOptimizer
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using ScaledCostFunctionPointer = ScaledCostFunctionType::Pointer
 
using ScaledCostFunctionType = ScaledSingleValuedCostFunction
 
using ScalesType = NonLinearOptimizer::ScalesType
 
using Self = ScaledSingleValuedNonLinearOptimizer
 
using Superclass = SingleValuedNonLinearOptimizer
 
- Public Types inherited from elastix::OptimizerBase< TElastix >
using ElastixType = TElastix
 
using ITKBaseType = itk::Optimizer
 
using ParametersType = typename ITKBaseType::ParametersType
 
using RegistrationType = typename ElastixType::RegistrationBaseType
 
using Self = OptimizerBase
 
using Superclass = BaseComponentSE< TElastix >
 
- Public Types inherited from elastix::BaseComponentSE< TElastix >
using ConfigurationPointer = Configuration::Pointer
 
using ElastixType = TElastix
 
using RegistrationType = typename ElastixType::RegistrationBaseType
 
using Self = BaseComponentSE
 
using Superclass = BaseComponent
 

Public Member Functions

void AdvanceOneStep () override
 
void AfterEachIteration () override
 
void AfterEachResolution () override
 
void AfterRegistration () override
 
void BeforeEachResolution () override
 
void BeforeRegistration () override
 
 elxClassNameMacro ("AdaptiveStochasticLBFGS")
 
virtual bool GetAutomaticLBFGSStepsizeEstimation () const
 
virtual bool GetAutomaticParameterEstimation () const
 
virtual const char * GetClassName () const
 
virtual const SizeValueTypeGetMaximumNumberOfSamplingAttempts ()
 
virtual double GetMaximumStepLength () const
 
 ITK_DISALLOW_COPY_AND_MOVE (AdaptiveStochasticLBFGS)
 
virtual void LBFGSUpdate ()
 
void MetricErrorResponse (itk::ExceptionObject &err) override
 
void ResumeOptimization () 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 () override
 
void StopOptimization () 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
 
 ITK_DISALLOW_COPY_AND_MOVE (AdaptiveStochasticLBFGSOptimizer)
 
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 () 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
 
 ITK_DISALLOW_COPY_AND_MOVE (StandardStochasticGradientOptimizer)
 
virtual void ResetCurrentTimeToInitialTime ()
 
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 () override
 
- Public Member Functions inherited from itk::StochasticGradientDescentOptimizer
virtual void AdvanceOneStep ()
 
virtual const char * GetClassName () const
 
virtual unsigned int GetCurrentInnerIteration () const
 
virtual unsigned int GetCurrentIteration () const
 
virtual const DerivativeType & GetGradient ()
 
virtual unsigned int GetLBFGSMemory () const
 
virtual const doubleGetLearningRate ()
 
virtual const unsigned long & GetNumberOfInnerIterations ()
 
virtual const unsigned long & GetNumberOfIterations ()
 
virtual const DerivativeType & GetPreviousGradient ()
 
virtual const ParametersType & GetPreviousPosition ()
 
virtual const DerivativeType & GetSearchDir ()
 
virtual const StopConditionTypeGetStopCondition ()
 
virtual const doubleGetValue ()
 
 ITK_DISALLOW_COPY_AND_MOVE (StochasticGradientDescentOptimizer)
 
virtual void MetricErrorResponse (ExceptionObject &err)
 
virtual void ResumeOptimization ()
 
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 () override
 
virtual void StopOptimization ()
 
- Public Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer
virtual const char * GetClassName () const
 
const ParametersType & GetCurrentPosition () const override
 
virtual bool GetMaximize () const
 
virtual const ScaledCostFunctionTypeGetScaledCostFunction ()
 
virtual const ParametersType & GetScaledCurrentPosition ()
 
bool GetUseScales () const
 
virtual void InitializeScales ()
 
 ITK_DISALLOW_COPY_AND_MOVE (ScaledSingleValuedNonLinearOptimizer)
 
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 () override
 
void BeforeEachResolutionBase () override
 
ITKBaseTypeGetAsITKBaseType ()
 
const ITKBaseTypeGetAsITKBaseType () const
 
virtual const char * GetClassName () const
 
 ITK_DISALLOW_COPY_AND_MOVE (OptimizerBase)
 
virtual void SetCurrentPositionPublic (const ParametersType &param)
 
virtual void SetSinusScales (double amplitude, double frequency, unsigned long numberOfParameters)
 
- Public Member Functions inherited from elastix::BaseComponentSE< TElastix >
void AddTargetCellToIterationInfo (const char *const name)
 
ConfigurationGetConfiguration () const
 
ElastixTypeGetElastix () const
 
xl::xoutbaseGetIterationInfoAt (const char *const name)
 
RegistrationTypeGetRegistration () const
 
 ITK_DISALLOW_COPY_AND_MOVE (BaseComponentSE)
 
int RemoveTargetCellFromIterationInfo (const char *const name)
 
void SetConfiguration (Configuration *_arg)
 
void SetElastix (ElastixType *_arg)
 
- Public Member Functions inherited from elastix::BaseComponent
virtual void AfterEachIteration ()
 
virtual void AfterEachIterationBase ()
 
virtual void AfterEachResolution ()
 
virtual void AfterEachResolutionBase ()
 
virtual void AfterRegistration ()
 
virtual void AfterRegistrationBase ()
 
virtual int BeforeAll ()
 
virtual int BeforeAllBase ()
 
virtual void BeforeEachResolution ()
 
virtual void BeforeEachResolutionBase ()
 
virtual void BeforeRegistration ()
 
virtual void BeforeRegistrationBase ()
 
virtual const char * elxGetClassName () const
 
const char * GetComponentLabel () const
 
 ITK_DISALLOW_COPY_AND_MOVE (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
template<typename TBaseComponent >
static auto AsITKBaseType (TBaseComponent *const baseComponent) -> decltype(baseComponent->GetAsITKBaseType())
 
static void InitializeElastixExecutable ()
 
static bool IsElastixLibrary ()
 

Protected Types

using AdvancedTransformType = itk::AdvancedTransform< CoordinateRepresentationType, Self::FixedImageDimension, Self::MovingImageDimension >
 
using ComputeDisplacementDistributionType = itk::ComputeDisplacementDistribution< FixedImageType, TransformType >
 
using ComputeJacobianTermsType = itk::ComputeJacobianTerms< FixedImageType, TransformType >
 
using CoordinateRepresentationType = typename TransformType::ScalarType
 
using DiagonalMatrixType = itk::Array< double >
 
using FixedImageIndexType = typename FixedImageType::IndexType
 
using FixedImagePointType = typename FixedImageType::PointType
 
using FixedImageRegionType = typename FixedImageType::RegionType
 
using FixedImageType = typename RegistrationType::FixedImageType
 
using ImageGridSamplerPointer = typename ImageGridSamplerType::Pointer
 
using ImageGridSamplerType = itk::ImageGridSampler< FixedImageType >
 
using ImageRadomSampleContainerPointer = typename ImageRadomSampleContainerType::Pointer
 
using ImageRadomSampleContainerType = typename ImageRandomSamplerType::ImageSampleContainerType
 
using ImageRandomCoordinateSamplerPointer = typename ImageRandomCoordinateSamplerType::Pointer
 
using ImageRandomCoordinateSamplerType = itk::ImageRandomCoordinateSampler< FixedImageType >
 
using ImageRandomSamplerBasePointer = typename ImageRandomSamplerBaseType::Pointer
 
using ImageRandomSamplerBaseType = itk::ImageRandomSamplerBase< FixedImageType >
 
using ImageRandomSamplerPointer = typename ImageRandomSamplerType::Pointer
 
using ImageRandomSamplerType = itk::ImageRandomSampler< FixedImageType >
 
using ImageSampleContainerPointer = typename ImageSampleContainerType::Pointer
 
using ImageSampleContainerType = typename ImageGridSamplerType::ImageSampleContainerType
 
using ImageSamplerBasePointer = typename ImageSamplerBaseType::Pointer
 
using ImageSamplerBaseType = itk::ImageSamplerBase< FixedImageType >
 
using ImageSampleType = typename ImageSamplerBaseType::ImageSampleType
 
using itkRegistrationType = typename RegistrationType::ITKBaseType
 
using JacobianType = typename TransformType::JacobianType
 
using JacobianValueType = typename JacobianType::ValueType
 
using MovingImageType = typename RegistrationType::MovingImageType
 
using NonZeroJacobianIndicesType = typename AdvancedTransformType::NonZeroJacobianIndicesType
 
using ProgressCommandPointer = typename ProgressCommand::Pointer
 
using ProgressCommandType = ProgressCommand
 
using RandomGeneratorType = itk::Statistics::MersenneTwisterRandomVariateGenerator
 
using RhoType = itk::Array< double >
 
using SettingsVectorType = typename std::vector< SettingsType >
 
using SType = std::vector< ParametersType >
 
using TransformJacobianType = JacobianType
 
using TransformType = typename itkRegistrationType::TransformType
 
using YType = std::vector< DerivativeType >
 
- Protected Types inherited from itk::StochasticGradientDescentOptimizer
using ThreaderType = itk::PlatformMultiThreader
 
using ThreadInfoType = ThreaderType::WorkUnitInfo
 

Protected Member Functions

 AdaptiveStochasticLBFGS ()
 
virtual void AddRandomPerturbation (ParametersType &parameters, double sigma)
 
virtual void AutomaticLBFGSStepsizeEstimation ()
 
virtual void AutomaticParameterEstimation ()
 
virtual void AutomaticParameterEstimationOriginal ()
 
virtual void AutomaticParameterEstimationUsingDisplacementDistribution ()
 
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=default
 
- Protected Member Functions inherited from itk::AdaptiveStochasticLBFGSOptimizer
 AdaptiveStochasticLBFGSOptimizer ()
 
void UpdateCurrentTime () override
 
 ~AdaptiveStochasticLBFGSOptimizer () override=default
 
- 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 ()
 
 ~StandardStochasticGradientOptimizer () override=default
 
- Protected Member Functions inherited from itk::StochasticGradientDescentOptimizer
void PrintSelf (std::ostream &os, Indent indent) const override
 
 StochasticGradientDescentOptimizer ()
 
 ~StochasticGradientDescentOptimizer () override=default
 
- 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=default
 
- Protected Member Functions inherited from elastix::OptimizerBase< TElastix >
virtual bool GetNewSamplesEveryIteration () const
 
 OptimizerBase ()=default
 
virtual void SelectNewSamples ()
 
 ~OptimizerBase () override=default
 
- 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 { 10 }
 
std::string m_StepSizeStrategy
 
unsigned long m_UpdateFrequenceL
 
bool m_UseAdaptiveStepSizes { true }
 
bool m_UseSearchDirForAdaptiveStepSize
 
- Protected Attributes inherited from itk::StandardStochasticGradientOptimizer
double m_CurrentTime { 0.0 }
 
bool m_UseConstantStep
 
- Protected Attributes inherited from itk::StochasticGradientDescentOptimizer
unsigned long m_CurrentInnerIteration
 
unsigned long m_CurrentIteration { 0 }
 
DerivativeType m_Gradient
 
unsigned long m_LBFGSMemory { 0 }
 
double m_LearningRate { 1.0 }
 
ParametersType m_MeanSearchDir
 
unsigned long m_NumberOfInnerIterations
 
unsigned long m_NumberOfIterations { 100 }
 
DerivativeType m_PrePreviousGradient
 
ParametersType m_PrePreviousSearchDir
 
DerivativeType m_PreviousGradient
 
ParametersType m_PreviousPosition
 
ParametersType m_PreviousSearchDir
 
ParametersType m_SearchDir
 
bool m_Stop { false }
 
StopConditionType m_StopCondition { MaximumNumberOfIterations }
 
ThreaderType::Pointer m_Threader { ThreaderType::New() }
 
double m_Value { 0.0 }
 
- Protected Attributes inherited from itk::ScaledSingleValuedNonLinearOptimizer
ScaledCostFunctionPointer m_ScaledCostFunction
 
ParametersType m_ScaledCurrentPosition
 
- Protected Attributes inherited from elastix::BaseComponentSE< TElastix >
ConfigurationPointer m_Configuration {}
 
itk::WeakPointer< TElastix > m_Elastix {}
 
RegistrationTypem_Registration {}
 

Private Member Functions

void ThreadedAdvanceOneStep (ThreadIdType threadId, ParametersType &newPosition)
 

Static Private Member Functions

static itk::ITK_THREAD_RETURN_TYPE AdvanceOneStepThreaderCallback (void *arg)
 

Private Attributes

 elxOverrideGetSelfMacro
 
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 >
using elastix::AdaptiveStochasticLBFGS< TElastix >::AdvancedTransformType = itk::AdvancedTransform<CoordinateRepresentationType, Self::FixedImageDimension, Self::MovingImageDimension>
protected

Definition at line 285 of file elxAdaptiveStochasticLBFGS.h.

◆ ComputeDisplacementDistributionType

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

Definition at line 252 of file elxAdaptiveStochasticLBFGS.h.

◆ ComputeJacobianTermsType

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

Definition at line 244 of file elxAdaptiveStochasticLBFGS.h.

◆ ConstPointer

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

Definition at line 115 of file elxAdaptiveStochasticLBFGS.h.

◆ CoordinateRepresentationType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::CoordinateRepresentationType = typename TransformType::ScalarType
protected

Definition at line 284 of file elxAdaptiveStochasticLBFGS.h.

◆ DiagonalMatrixType

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

Definition at line 293 of file elxAdaptiveStochasticLBFGS.h.

◆ FixedImageIndexType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::FixedImageIndexType = typename FixedImageType::IndexType
protected

Definition at line 239 of file elxAdaptiveStochasticLBFGS.h.

◆ FixedImagePointType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::FixedImagePointType = typename FixedImageType::PointType
protected

Definition at line 240 of file elxAdaptiveStochasticLBFGS.h.

◆ FixedImageRegionType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::FixedImageRegionType = typename FixedImageType::RegionType
protected

Definition at line 238 of file elxAdaptiveStochasticLBFGS.h.

◆ FixedImageType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::FixedImageType = typename RegistrationType::FixedImageType
protected

Protected typedefs

Definition at line 235 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageGridSamplerPointer

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ImageGridSamplerPointer = typename ImageGridSamplerType::Pointer
protected

Definition at line 271 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageGridSamplerType

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

Image grid sampler.

Definition at line 270 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRadomSampleContainerPointer

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRadomSampleContainerPointer = typename ImageRadomSampleContainerType::Pointer
protected

Definition at line 267 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRadomSampleContainerType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRadomSampleContainerType = typename ImageRandomSamplerType::ImageSampleContainerType
protected

Definition at line 266 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomCoordinateSamplerPointer

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRandomCoordinateSamplerPointer = typename ImageRandomCoordinateSamplerType::Pointer
protected

Definition at line 260 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomCoordinateSamplerType

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

Definition at line 259 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomSamplerBasePointer

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRandomSamplerBasePointer = typename ImageRandomSamplerBaseType::Pointer
protected

Definition at line 258 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomSamplerBaseType

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

Definition at line 257 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomSamplerPointer

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ImageRandomSamplerPointer = typename ImageRandomSamplerType::Pointer
protected

Definition at line 265 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageRandomSamplerType

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

Image random sampler.

Definition at line 264 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageSampleContainerPointer

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ImageSampleContainerPointer = typename ImageSampleContainerType::Pointer
protected

Definition at line 273 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageSampleContainerType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ImageSampleContainerType = typename ImageGridSamplerType::ImageSampleContainerType
protected

Definition at line 272 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageSamplerBasePointer

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ImageSamplerBasePointer = typename ImageSamplerBaseType::Pointer
protected

Definition at line 256 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageSamplerBaseType

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

Samplers:

Definition at line 255 of file elxAdaptiveStochasticLBFGS.h.

◆ ImageSampleType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ImageSampleType = typename ImageSamplerBaseType::ImageSampleType
protected

Definition at line 261 of file elxAdaptiveStochasticLBFGS.h.

◆ ITKBaseType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ITKBaseType = typename Superclass2::ITKBaseType

Definition at line 137 of file elxAdaptiveStochasticLBFGS.h.

◆ itkRegistrationType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::itkRegistrationType = typename RegistrationType::ITKBaseType
protected

Definition at line 241 of file elxAdaptiveStochasticLBFGS.h.

◆ JacobianType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::JacobianType = typename TransformType::JacobianType
protected

Definition at line 243 of file elxAdaptiveStochasticLBFGS.h.

◆ JacobianValueType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::JacobianValueType = typename JacobianType::ValueType
protected

Definition at line 245 of file elxAdaptiveStochasticLBFGS.h.

◆ LineOptimizerPointer

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::LineOptimizerPointer = LineOptimizerType::Pointer

Definition at line 151 of file elxAdaptiveStochasticLBFGS.h.

◆ LineOptimizerType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::LineOptimizerType = itk::MoreThuenteLineSearchOptimizer

Definition at line 150 of file elxAdaptiveStochasticLBFGS.h.

◆ LineSearchOptimizerPointer

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::LineSearchOptimizerPointer = LineSearchOptimizerType::Pointer

Definition at line 149 of file elxAdaptiveStochasticLBFGS.h.

◆ LineSearchOptimizerType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::LineSearchOptimizerType = itk::LineSearchOptimizer

Definition at line 147 of file elxAdaptiveStochasticLBFGS.h.

◆ MovingImageType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::MovingImageType = typename RegistrationType::MovingImageType
protected

Definition at line 236 of file elxAdaptiveStochasticLBFGS.h.

◆ NonZeroJacobianIndicesType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::NonZeroJacobianIndicesType = typename AdvancedTransformType::NonZeroJacobianIndicesType
protected

Definition at line 287 of file elxAdaptiveStochasticLBFGS.h.

◆ Pointer

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

Definition at line 114 of file elxAdaptiveStochasticLBFGS.h.

◆ ProgressCommandPointer

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ProgressCommandPointer = typename ProgressCommand::Pointer
protected

Definition at line 278 of file elxAdaptiveStochasticLBFGS.h.

◆ ProgressCommandType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ProgressCommandType = ProgressCommand
protected

Definition at line 277 of file elxAdaptiveStochasticLBFGS.h.

◆ RandomGeneratorType

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

Other protected typedefs

Definition at line 276 of file elxAdaptiveStochasticLBFGS.h.

◆ RhoType

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

For L-BFGS usage.

Definition at line 290 of file elxAdaptiveStochasticLBFGS.h.

◆ Self

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::Self = AdaptiveStochasticLBFGS

Standard ITK.

Definition at line 111 of file elxAdaptiveStochasticLBFGS.h.

◆ SettingsVectorType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::SettingsVectorType = typename std::vector<SettingsType>
protected

Definition at line 250 of file elxAdaptiveStochasticLBFGS.h.

◆ SizeValueType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::SizeValueType = itk::SizeValueType

Definition at line 138 of file elxAdaptiveStochasticLBFGS.h.

◆ SType

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

Definition at line 291 of file elxAdaptiveStochasticLBFGS.h.

◆ Superclass1

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::Superclass1 = AdaptiveStochasticLBFGSOptimizer

Definition at line 112 of file elxAdaptiveStochasticLBFGS.h.

◆ Superclass2

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::Superclass2 = OptimizerBase<TElastix>

Definition at line 113 of file elxAdaptiveStochasticLBFGS.h.

◆ ThreadIdType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::ThreadIdType = unsigned int

Type to count and reference number of threads

Definition at line 224 of file elxAdaptiveStochasticLBFGS.h.

◆ TransformJacobianType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::TransformJacobianType = JacobianType
protected

Typedefs for support of sparse Jacobians and AdvancedTransforms.

Definition at line 281 of file elxAdaptiveStochasticLBFGS.h.

◆ TransformType

template<class TElastix >
using elastix::AdaptiveStochasticLBFGS< TElastix >::TransformType = typename itkRegistrationType::TransformType
protected

Definition at line 242 of file elxAdaptiveStochasticLBFGS.h.

◆ YType

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

Definition at line 292 of file elxAdaptiveStochasticLBFGS.h.

Constructor & Destructor Documentation

◆ AdaptiveStochasticLBFGS()

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

◆ ~AdaptiveStochasticLBFGS()

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

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 ( )
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 ( )
overridevirtual

Reimplemented from elastix::BaseComponent.

◆ AfterEachResolution()

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

Reimplemented from elastix::BaseComponent.

◆ AfterRegistration()

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

Reimplemented from elastix::BaseComponent.

◆ AutomaticLBFGSStepsizeEstimation()

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

◆ AutomaticParameterEstimation()

template<class TElastix >
virtual void elastix::AdaptiveStochasticLBFGS< TElastix >::AutomaticParameterEstimation ( )
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 ( )
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 ( )
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 ( )
overridevirtual

Reimplemented from elastix::BaseComponent.

◆ BeforeRegistration()

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

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

Reimplemented from elastix::BaseComponent.

◆ 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.

◆ ITK_DISALLOW_COPY_AND_MOVE()

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

◆ 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 ( )
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.

◆ 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 ( )
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 228 of file elxAdaptiveStochasticLBFGS.h.

◆ StartOptimization()

template<class TElastix >
void elastix::AdaptiveStochasticLBFGS< TElastix >::StartOptimization ( )
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 ( )
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

◆ elxOverrideGetSelfMacro

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

Definition at line 403 of file elxAdaptiveStochasticLBFGS.h.

◆ m_AdvancedTransform

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

The transform stored as AdvancedTransform

Definition at line 307 of file elxAdaptiveStochasticLBFGS.h.

◆ m_AutomaticLBFGSStepsizeEstimation

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

Definition at line 421 of file elxAdaptiveStochasticLBFGS.h.

◆ m_AutomaticParameterEstimation

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

Definition at line 420 of file elxAdaptiveStochasticLBFGS.h.

◆ m_AutomaticParameterEstimationDone

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

Definition at line 428 of file elxAdaptiveStochasticLBFGS.h.

◆ m_Bound

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

Definition at line 394 of file elxAdaptiveStochasticLBFGS.h.

◆ m_CurrentNumberOfSamplingAttempts

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

Definition at line 426 of file elxAdaptiveStochasticLBFGS.h.

◆ m_CurrentT

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

Definition at line 392 of file elxAdaptiveStochasticLBFGS.h.

◆ m_HessianFillValue

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

Definition at line 399 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 433 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 425 of file elxAdaptiveStochasticLBFGS.h.

◆ m_MaximumStepLength

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

Definition at line 422 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NoiseFactor

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

Definition at line 391 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfBandStructureSamples

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

Definition at line 434 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 302 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfInnerLoopSamples

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

Definition at line 435 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfJacobianMeasurements

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

Definition at line 303 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfSamplesForExactGradient

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

Definition at line 304 of file elxAdaptiveStochasticLBFGS.h.

◆ m_NumberOfSpatialSamples

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

Definition at line 436 of file elxAdaptiveStochasticLBFGS.h.

◆ m_OriginalButSigmoidToDefault

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

Definition at line 440 of file elxAdaptiveStochasticLBFGS.h.

◆ m_OutsideIterations

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

Definition at line 430 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 389 of file elxAdaptiveStochasticLBFGS.h.

◆ m_PreviousErrorAtIteration

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

Definition at line 427 of file elxAdaptiveStochasticLBFGS.h.

◆ m_PreviousT

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

Definition at line 393 of file elxAdaptiveStochasticLBFGS.h.

◆ m_RandomGenerator

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

RandomGenerator for AddRandomPerturbation.

Definition at line 310 of file elxAdaptiveStochasticLBFGS.h.

◆ m_Rho

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

Definition at line 396 of file elxAdaptiveStochasticLBFGS.h.

◆ m_S

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

Definition at line 397 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 299 of file elxAdaptiveStochasticLBFGS.h.

◆ m_SigmoidScaleFactor

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

Definition at line 312 of file elxAdaptiveStochasticLBFGS.h.

◆ m_UseAdaptiveLBFGSStepSizes

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

Definition at line 443 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 439 of file elxAdaptiveStochasticLBFGS.h.

◆ m_UseNoiseFactor

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

Definition at line 441 of file elxAdaptiveStochasticLBFGS.h.

◆ m_WindowScale

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

Definition at line 400 of file elxAdaptiveStochasticLBFGS.h.

◆ m_Y

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

Definition at line 398 of file elxAdaptiveStochasticLBFGS.h.



Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo