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::AdaptiveStochasticVarianceReducedGradient< TElastix > Class Template Reference

#include <elxAdaptiveStochasticVarianceReducedGradient.h>

Detailed Description

template<class TElastix>
class elastix::AdaptiveStochasticVarianceReducedGradient< 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] P. Cruz Almost sure convergence and asymptotical normality of a generalization of Kesten's stochastic approximation algorithm for multidimensional case Technical Report, 2005. http://hdl.handle.net/2052/74

[2] S. Klein, J.P.W. Pluim, and M. Staring, M.A. Viergever, Adaptive stochastic gradient descent optimisation for image registration International Journal of Computer Vision, vol. 81, no. 3, pp. 227-239, 2009 http://dx.doi.org/10.1007/s11263-008-0168-y

Acceleration in case of many transform parameters was proposed in the following paper:

[3] Y.Qiao, B.P.F. Lelieveldt, M.Staring Fast Automatic Step Size Estimation for Gradient Descent Optimization of Image Registration IEEE Transactions on Medical Imaging, vol. 35, no. 2, pp. 391 - 403, February 2016 http://dx.doi.org/10.1109/TMI.2015.2476354

The parameters used in this class are:

Parameters:

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

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

SP_a: The gain $a(k)$ at each iteration $k$ is defined by
$a(k) =  SP\_a / (SP\_A + k + 1)^{SP\_alpha}$.
SP_a can be defined for each resolution.
example: (SP_a 3200.0 3200.0 1600.0)
The default value is 400.0. Tuning this variable for you specific problem is recommended. Alternatively set the AutomaticParameterEstimation to "true". In that case, you do not need to specify SP_a. SP_a has no influence when AutomaticParameterEstimation is used.

SP_A: The gain $a(k)$ at each iteration $k$ is defined by
$a(k) =  SP\_a / (SP\_A + k + 1)^{SP\_alpha}$.
SP_A can be defined for each resolution.
example: (SP_A 50.0 50.0 100.0)
The default/recommended value for this particular optimizer is 20.0.

SP_alpha: The gain $a(k)$ at each iteration $k$ is defined by
$a(k) =  SP\_a / (SP\_A + k + 1)^{SP\_alpha}$.
SP_alpha can be defined for each resolution.
example: (SP_alpha 0.602 0.602 0.602)
The default/recommended value for this particular optimizer is 1.0. Alternatively set the AutomaticParameterEstimation to "true". In that case, you do not need to specify SP_alpha. SP_alpha has no influence when AutomaticParameterEstimation is used.

SigmoidMax: The maximum of the sigmoid function ( $f_{max}$). Must be larger than 0. The parameter can be specified for each resolution, or for all resolutions at once.
example: (SigmoidMax 1.0)
Default/recommended value: 1.0. This parameter has no influence when AutomaticParameterEstimation is used. In that case, always a value 1.0 is used.

SigmoidMin: The minimum of the sigmoid function ( $f_{min}$). Must be smaller than 0. The parameter can be specified for each resolution, or for all resolutions at once.
example: (SigmoidMin -0.8)
Default value: -0.8. This parameter has no influence when AutomaticParameterEstimation is used. In that case, the value is automatically determined, depending on the images, metric etc.

SigmoidScale: The scale/width of the sigmoid function ( $\omega$). The parameter can be specified for each resolution, or for all resolutions at once.
example: (SigmoidScale 0.00001)
Default value: 1e-8. This parameter has no influence when AutomaticParameterEstimation is used. In that case, the value is automatically determined, depending on the images, metric etc.

SigmoidInitialTime: the initial time input for the sigmoid ( $t_0$). Must be larger than 0.0. The parameter can be specified for each resolution, or for all resolutions at once.
example: (SigmoidInitialTime 0.0 5.0 5.0)
Default value: 0.0. When increased, the optimization starts with smaller steps, leaving the possibility to increase the steps when necessary. If set to 0.0, the method starts with with the largest step allowed.

NumberOfGradientMeasurements: Number of gradients N to estimate the average square magnitudes of the exact gradient and the approximation error. The parameter can be specified for each resolution, or for all resolutions at once.
example: (NumberOfGradientMeasurements 10)
Default value: 0, which means that the value is automatically estimated. In principle, the more the better, but the slower. In practice N=10 is usually sufficient. But the automatic estimation achieved by N=0 also works good. The parameter has only influence when AutomaticParameterEstimation is used.

NumberOfJacobianMeasurements: The number of voxels M where the Jacobian is measured, which is used to estimate the covariance matrix. The parameter can be specified for each resolution, or for all resolutions at once.
example: (NumberOfJacobianMeasurements 5000 10000 20000)
Default value: M = max( 1000, nrofparams ), with nrofparams the number of transform parameters. This is a rather crude rule of thumb, which seems to work in practice. In principle, the more the better, but the slower. The parameter has only influence when AutomaticParameterEstimation is used.

NumberOfSamplesForExactGradient: The number of image samples used to compute the 'exact' gradient. The samples are chosen on a uniform grid. The parameter can be specified for each resolution, or for all resolutions at once.
example: (NumberOfSamplesForExactGradient 100000)
Default/recommended: 100000. This works in general. If the image is smaller, the number of samples is automatically reduced. In principle, the more the better, but the slower. The parameter has only influence when AutomaticParameterEstimation is used.

ASGDParameterEstimationMethod: The ASGD parameter estimation method used in this optimizer. The parameter can be specified for each resolution.
example: (ASGDParameterEstimationMethod "Original")
or (ASGDParameterEstimationMethod "DisplacementDistribution")
Default: Original.

MaximumDisplacementEstimationMethod: The suitable position selection method used only for displacement distribution estimation method. The parameter can be specified for each resolution.
example: (MaximumDisplacementEstimationMethod "2sigma")
or (MaximumDisplacementEstimationMethod "95percentile")
Default: 2sigma.

NoiseCompensation: Selects whether or not to use noise compensation. The parameter can be specified for each resolution, or for all resolutions at once.
example: (NoiseCompensation "true")
Default/recommended: true.

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

Definition at line 193 of file elxAdaptiveStochasticVarianceReducedGradient.h.

+ Inheritance diagram for elastix::AdaptiveStochasticVarianceReducedGradient< 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 Superclass1::ParametersType ParametersType
 
typedef itk::SmartPointer< SelfPointer
 
typedef Superclass2::RegistrationPointer RegistrationPointer
 
typedef Superclass2::RegistrationType RegistrationType
 
typedef AdaptiveStochasticVarianceReducedGradient Self
 
typedef itk::SizeValueType SizeValueType
 
typedef AdaptiveStochasticVarianceReducedGradientOptimizer Superclass1
 
typedef OptimizerBase< TElastix > Superclass2
 
typedef unsigned int ThreadIdType
 
- Public Types inherited from itk::AdaptiveStochasticVarianceReducedGradientOptimizer
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 AdaptiveStochasticVarianceReducedGradientOptimizer Self
 
typedef Superclass::StopConditionType StopConditionType
 
typedef StandardStochasticVarianceReducedGradientOptimizer Superclass
 
- Public Types inherited from itk::StandardStochasticVarianceReducedGradientOptimizer
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 StandardStochasticVarianceReducedGradientOptimizer Self
 
typedef Superclass::StopConditionType StopConditionType
 
typedef StochasticVarianceReducedGradientDescentOptimizer Superclass
 
- Public Types inherited from itk::StochasticVarianceReducedGradientDescentOptimizer
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 StochasticVarianceReducedGradientDescentOptimizer 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 ("AdaptiveStochasticVarianceReducedGradient")
 
virtual bool GetAutomaticParameterEstimation () const
 
virtual const char * GetClassName () const
 
virtual const SizeValueTypeGetMaximumNumberOfSamplingAttempts ()
 
virtual double GetMaximumStepLength () const
 
virtual const DerivativeTypeGetMeanGradient ()
 
void MetricErrorResponse (itk::ExceptionObject &err) override
 
void ResumeOptimization (void) override
 
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::AdaptiveStochasticVarianceReducedGradientOptimizer
virtual const char * GetClassName () const
 
virtual double GetSigmoidMax () const
 
virtual double GetSigmoidMin () const
 
virtual double GetSigmoidScale () const
 
virtual bool GetUseAdaptiveStepSizes () const
 
virtual void SetSigmoidMax (double _arg)
 
virtual void SetSigmoidMin (double _arg)
 
virtual void SetSigmoidScale (double _arg)
 
virtual void SetUseAdaptiveStepSizes (bool _arg)
 
- Public Member Functions inherited from itk::StandardStochasticVarianceReducedGradientOptimizer
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::StochasticVarianceReducedGradientDescentOptimizer
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::AdaptiveStochasticVarianceReducedGradientOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::StandardStochasticVarianceReducedGradientOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::StochasticVarianceReducedGradientDescentOptimizer
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 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 std::vector< SettingsTypeSettingsVectorType
 
typedef JacobianType TransformJacobianType
 
typedef itkRegistrationType::TransformType TransformType
 
- Protected Types inherited from itk::StochasticVarianceReducedGradientDescentOptimizer
typedef itk::PlatformMultiThreader ThreaderType
 
typedef ThreaderType::WorkUnitInfo ThreadInfoType
 

Protected Member Functions

 AdaptiveStochasticVarianceReducedGradient ()
 
virtual void AddRandomPerturbation (ParametersType &parameters, double sigma)
 
virtual void AutomaticParameterEstimation (void)
 
virtual void AutomaticParameterEstimationOriginal (void)
 
virtual void AutomaticParameterEstimationUsingDisplacementDistribution (void)
 
virtual void CheckForAdvancedTransform (void)
 
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)
 
 ~AdaptiveStochasticVarianceReducedGradient () override
 
- Protected Member Functions inherited from itk::AdaptiveStochasticVarianceReducedGradientOptimizer
 AdaptiveStochasticVarianceReducedGradientOptimizer ()
 
void UpdateCurrentTime (void) override
 
 ~AdaptiveStochasticVarianceReducedGradientOptimizer () override
 
- Protected Member Functions inherited from itk::StandardStochasticVarianceReducedGradientOptimizer
virtual double Compute_a (double k) const
 
virtual double Compute_beta (double k) const
 
 StandardStochasticVarianceReducedGradientOptimizer ()
 
virtual void UpdateCurrentTime (void)
 
 ~StandardStochasticVarianceReducedGradientOptimizer () override
 
- Protected Member Functions inherited from itk::StochasticVarianceReducedGradientDescentOptimizer
void PrintSelf (std::ostream &os, Indent indent) const override
 
 StochasticVarianceReducedGradientDescentOptimizer ()
 
 ~StochasticVarianceReducedGradientDescentOptimizer () 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
 
DerivativeType m_ExactGradient
 
DerivativeType m_MeanGradient
 
double m_NoiseFactor
 
SizeValueType m_NumberOfGradientMeasurements
 
SizeValueType m_NumberOfJacobianMeasurements
 
SizeValueType m_NumberOfSamplesForExactGradient
 
RandomGeneratorType::Pointer m_RandomGenerator
 
SettingsVectorType m_SettingsVector
 
double m_SigmoidScaleFactor
 
- Protected Attributes inherited from itk::AdaptiveStochasticVarianceReducedGradientOptimizer
DerivativeType m_PreviousGradient
 
- Protected Attributes inherited from itk::StandardStochasticVarianceReducedGradientOptimizer
double m_CurrentTime
 
bool m_UseConstantStep
 
- Protected Attributes inherited from itk::StochasticVarianceReducedGradientDescentOptimizer
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_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

 AdaptiveStochasticVarianceReducedGradient (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_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_UseNoiseCompensation
 
bool m_UseNoiseFactor
 

Member Typedef Documentation

◆ AdvancedTransformType

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

◆ ComputeDisplacementDistributionType

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

◆ ComputeJacobianTermsType

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

◆ ConfigurationPointer

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

◆ ConfigurationType

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

◆ ConstPointer

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

◆ CoordinateRepresentationType

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

◆ CostFunctionPointer

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

◆ CostFunctionType

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

Typedef's inherited from Superclass1.

Definition at line 220 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ ElastixPointer

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

◆ ElastixType

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

Typedef's inherited from Superclass2.

Definition at line 225 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ FixedImageIndexType

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

◆ FixedImagePointType

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

◆ FixedImageRegionType

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

◆ FixedImageType

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

Protected typedefs

Definition at line 304 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ ImageGridSamplerPointer

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

◆ ImageGridSamplerType

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

Image grid sampler.

Definition at line 343 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ ImageRadomSampleContainerPointer

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

◆ ImageRadomSampleContainerType

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

◆ ImageRandomCoordinateSamplerPointer

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

◆ ImageRandomCoordinateSamplerType

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

◆ ImageRandomSamplerBasePointer

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

◆ ImageRandomSamplerBaseType

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

◆ ImageRandomSamplerPointer

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

◆ ImageRandomSamplerType

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

Image random sampler.

Definition at line 335 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ ImageSampleContainerPointer

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

◆ ImageSampleContainerType

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

◆ ImageSamplerBasePointer

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

◆ ImageSamplerBaseType

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

Samplers:

Definition at line 323 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ ImageSampleType

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

◆ ITKBaseType

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

◆ itkRegistrationType

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

◆ JacobianType

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

◆ JacobianValueType

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

◆ MovingImageType

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

◆ NonZeroJacobianIndicesType

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

◆ ParametersType

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

Typedef for the ParametersType.

Definition at line 235 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ Pointer

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

◆ ProgressCommandPointer

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

◆ ProgressCommandType

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

◆ RandomGeneratorType

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

Other protected typedefs

Definition at line 350 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ RegistrationPointer

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

◆ RegistrationType

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

◆ Self

Standard ITK.

Definition at line 200 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ SettingsVectorType

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

◆ SizeValueType

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

◆ Superclass1

◆ Superclass2

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

◆ ThreadIdType

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

Type to count and reference number of threads

Definition at line 293 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ TransformJacobianType

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

Typedefs for support of sparse Jacobians and AdvancedTransforms.

Definition at line 355 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ TransformType

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

Constructor & Destructor Documentation

◆ AdaptiveStochasticVarianceReducedGradient() [1/2]

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

◆ ~AdaptiveStochasticVarianceReducedGradient()

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

◆ AdaptiveStochasticVarianceReducedGradient() [2/2]

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

Member Function Documentation

◆ AddRandomPerturbation()

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

Advance one step following the gradient direction.

Reimplemented from itk::StochasticVarianceReducedGradientDescentOptimizer.

◆ AdvanceOneStepThreaderCallback()

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

The callback function.

◆ AfterEachIteration()

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

Reimplemented from elastix::BaseComponent.

◆ AfterEachResolution()

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

Reimplemented from elastix::BaseComponent.

◆ AfterRegistration()

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

Reimplemented from elastix::BaseComponent.

◆ AutomaticParameterEstimation()

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

Reimplemented from elastix::BaseComponent.

◆ BeforeRegistration()

template<class TElastix >
void elastix::AdaptiveStochasticVarianceReducedGradient< 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::AdaptiveStochasticVarianceReducedGradient< TElastix >::CheckForAdvancedTransform ( void  )
protectedvirtual

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

◆ elxClassNameMacro()

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

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

◆ GetAutomaticParameterEstimation()

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

◆ GetClassName()

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

Run-time type information (and related methods).

Reimplemented from itk::AdaptiveStochasticVarianceReducedGradientOptimizer.

◆ GetMaximumNumberOfSamplingAttempts()

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

Get the MaximumNumberOfSamplingAttempts.

◆ GetMaximumStepLength()

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

◆ GetMeanGradient()

template<class TElastix >
virtual const DerivativeType & elastix::AdaptiveStochasticVarianceReducedGradient< TElastix >::GetMeanGradient ( )
virtual

Get the Previous gradient.

◆ GetScaledDerivativeWithExceptionHandling()

template<class TElastix >
virtual void elastix::AdaptiveStochasticVarianceReducedGradient< 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::AdaptiveStochasticVarianceReducedGradient< TElastix >::itkStaticConstMacro ( FixedImageDimension  ,
unsigned int  ,
FixedImageType::ImageDimension   
)
protected

◆ itkStaticConstMacro() [2/2]

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

◆ MetricErrorResponse()

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

Stop optimization and pass on exception.

◆ New()

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

Method for creation through the object factory.

◆ operator=()

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

◆ PrintSettingsVector()

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

Print the contents of the settings vector to elxout.

◆ ResumeOptimization()

template<class TElastix >
void elastix::AdaptiveStochasticVarianceReducedGradient< 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::StochasticVarianceReducedGradientDescentOptimizer.

◆ SampleGradients()

template<class TElastix >
virtual void elastix::AdaptiveStochasticVarianceReducedGradient< 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.

◆ SetAutomaticParameterEstimation()

template<class TElastix >
virtual void elastix::AdaptiveStochasticVarianceReducedGradient< 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::AdaptiveStochasticVarianceReducedGradient< TElastix >::SetMaximumNumberOfSamplingAttempts ( SizeValueType  _arg)
virtual

Set the MaximumNumberOfSamplingAttempts.

◆ SetMaximumStepLength()

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

Set/Get maximum step length.

◆ SetNumberOfWorkUnits()

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

Set the number of threads.

Definition at line 296 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ StartOptimization()

template<class TElastix >
void elastix::AdaptiveStochasticVarianceReducedGradient< 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::AdaptiveStochasticVarianceReducedGradient< TElastix >::StopOptimization ( void  )
overridevirtual

Stop optimization.

See also
ResumeOptimization

Reimplemented from itk::StochasticVarianceReducedGradientDescentOptimizer.

◆ ThreadedAdvanceOneStep()

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

The threaded implementation of AdvanceOneStep().

Field Documentation

◆ m_AdvancedTransform

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

The transform stored as AdvancedTransform

Definition at line 378 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ m_AutomaticParameterEstimation

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

◆ m_AutomaticParameterEstimationDone

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

◆ m_CurrentNumberOfSamplingAttempts

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

◆ m_ExactGradient

template<class TElastix >
DerivativeType elastix::AdaptiveStochasticVarianceReducedGradient< TElastix >::m_ExactGradient
protected

◆ m_MaxBandCovSize

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

Private variables for band size estimation of covariance matrix.

Definition at line 464 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ m_MaximumNumberOfSamplingAttempts

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

Private variables for the sampling attempts.

Definition at line 456 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ m_MaximumStepLength

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

◆ m_MeanGradient

template<class TElastix >
DerivativeType elastix::AdaptiveStochasticVarianceReducedGradient< TElastix >::m_MeanGradient
protected

◆ m_NoiseFactor

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

◆ m_NumberOfBandStructureSamples

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

◆ m_NumberOfGradientMeasurements

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

Some options for automatic parameter estimation.

Definition at line 373 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ m_NumberOfInnerLoopSamples

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

◆ m_NumberOfJacobianMeasurements

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

◆ m_NumberOfSamplesForExactGradient

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

◆ m_NumberOfSpatialSamples

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

◆ m_OriginalButSigmoidToDefault

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

◆ m_OutsideIterations

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

◆ m_PreviousErrorAtIteration

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

◆ m_RandomGenerator

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

RandomGenerator for AddRandomPerturbation.

Definition at line 381 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ m_SettingsVector

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

Variable to store the automatically determined settings for each resolution.

Definition at line 370 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ m_SigmoidScaleFactor

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

◆ m_UseNoiseCompensation

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

The flag of using noise compensation.

Definition at line 470 of file elxAdaptiveStochasticVarianceReducedGradient.h.

◆ m_UseNoiseFactor

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


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo