18#ifndef __elxAdaptiveStochasticGradientDescent_h
19#define __elxAdaptiveStochasticGradientDescent_h
28#include "itkMersenneTwisterRandomVariateGenerator.h"
192template<
class TElastix >
277 itkSetMacro( MaximumStepLength,
double );
278 itkGetConstMacro( MaximumStepLength,
double );
284 itkGetConstReferenceMacro( MaximumNumberOfSamplingAttempts,
SizeValueType );
301 struct SettingsType {
double a, A, alpha, fmax, fmin, omega; };
336 itkGetStaticConstMacro( FixedImageDimension ),
392 double perturbationSigma,
double & gg,
double & ee );
432#ifndef ITK_MANUAL_INSTANTIATION
433#include "elxAdaptiveStochasticGradientDescent.hxx"
A gradient descent optimizer with an adaptive gain.
AdaptiveStochasticGradientDescent Self
SizeValueType m_NumberOfBandStructureSamples
Superclass1::StopConditionType StopConditionType
AdaptiveStochasticGradientDescent(const Self &)
SizeValueType m_CurrentNumberOfSamplingAttempts
void BeforeRegistration(void) override
RandomGeneratorPointer m_RandomGenerator
FixedImageType::RegionType FixedImageRegionType
itk::ImageGridSampler< FixedImageType > ImageGridSamplerType
virtual void PrintSettingsVector(const SettingsVectorType &settings) const
virtual void AutomaticParameterEstimation(void)
void StartOptimization(void) override
void BeforeEachResolution(void) override
ImageRandomCoordinateSamplerType::Pointer ImageRandomCoordinateSamplerPointer
ImageSamplerBaseType::Pointer ImageSamplerBasePointer
RegistrationType::FixedImageType FixedImageType
ProgressCommand ProgressCommandType
JacobianType TransformJacobianType
itk::ComputeJacobianTerms< FixedImageType, TransformType > ComputeJacobianTermsType
Superclass2::ElastixPointer ElastixPointer
ProgressCommand::Pointer ProgressCommandPointer
ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
RegistrationType::MovingImageType MovingImageType
TransformType::ScalarType CoordinateRepresentationType
virtual void SampleGradients(const ParametersType &mu0, double perturbationSigma, double &gg, double &ee)
Superclass1::ParametersType ParametersType
itk::SmartPointer< Self > Pointer
SizeValueType m_NumberOfGradientMeasurements
itk::ImageSamplerBase< FixedImageType > ImageSamplerBaseType
double m_MaximumStepLength
Superclass2::RegistrationPointer RegistrationPointer
Superclass2::ITKBaseType ITKBaseType
Superclass2::ElastixType ElastixType
itk::AdvancedTransform< CoordinateRepresentationType, itkGetStaticConstMacro(FixedImageDimension), itkGetStaticConstMacro(MovingImageDimension) > AdvancedTransformType
AdvancedTransformPointer m_AdvancedTransform
ImageSampleContainerType::Pointer ImageSampleContainerPointer
itk::SmartPointer< const Self > ConstPointer
RandomGeneratorType::Pointer RandomGeneratorPointer
void operator=(const Self &)
Superclass2::ConfigurationPointer ConfigurationPointer
itk::SizeValueType SizeValueType
ImageGridSamplerType::Pointer ImageGridSamplerPointer
TransformType::JacobianType JacobianType
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
virtual void AutomaticParameterEstimationUsingDisplacementDistribution(void)
FixedImageType::IndexType FixedImageIndexType
SizeValueType m_NumberOfJacobianMeasurements
SizeValueType m_MaximumNumberOfSamplingAttempts
void AfterRegistration(void) override
~AdaptiveStochasticGradientDescent() override
bool m_UseNoiseCompensation
FixedImageType::PointType FixedImagePointType
void AfterEachIteration(void) override
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
void ResumeOptimization(void) override
itk::ComputeDisplacementDistribution< FixedImageType, TransformType > ComputeDisplacementDistributionType
itk::ImageRandomCoordinateSampler< FixedImageType > ImageRandomCoordinateSamplerType
SizeValueType m_MaxBandCovSize
OptimizerBase< TElastix > Superclass2
elxClassNameMacro("AdaptiveStochasticGradientDescent")
SizeValueType m_PreviousErrorAtIteration
bool m_AutomaticParameterEstimationDone
virtual void AddRandomPerturbation(ParametersType ¶meters, double sigma)
Superclass1::CostFunctionPointer CostFunctionPointer
itkRegistrationType::TransformType TransformType
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
itk::ImageRandomSamplerBase< FixedImageType > ImageRandomSamplerBaseType
bool m_AutomaticParameterEstimation
virtual void CheckForAdvancedTransform(void)
Superclass2::ConfigurationType ConfigurationType
double m_MaximumStepLengthRatio
JacobianType::ValueType JacobianValueType
void AfterEachResolution(void) override
void MetricErrorResponse(itk::ExceptionObject &err) override
virtual void GetScaledDerivativeWithExceptionHandling(const ParametersType ¶meters, DerivativeType &derivative)
std::vector< SettingsType > SettingsVectorType
Superclass1::CostFunctionType CostFunctionType
SizeValueType m_NumberOfSamplesForExactGradient
AdaptiveStochasticGradientDescent()
SettingsVectorType m_SettingsVector
double m_SigmoidScaleFactor
bool m_OriginalButSigmoidToDefault
ImageGridSamplerType::ImageSampleContainerType ImageSampleContainerType
AdvancedTransformType::Pointer AdvancedTransformPointer
AdaptiveStochasticGradientDescentOptimizer Superclass1
virtual void AutomaticParameterEstimationOriginal(void)
RegistrationType::ITKBaseType itkRegistrationType
Superclass2::RegistrationType RegistrationType
A class that deals with user given parameters and command line arguments.
This class is the elastix base class for all Optimizers.
Superclass::ConfigurationPointer ConfigurationPointer
itk::Optimizer ITKBaseType
Superclass::ElastixType ElastixType
Superclass::ElastixPointer ElastixPointer
Superclass::RegistrationPointer RegistrationPointer
Superclass::RegistrationType RegistrationType
A specialized Command object for updating the progress of a filter.
itk::SmartPointer< Self > Pointer
This class implements a gradient descent optimizer with adaptive gain.
Superclass::CostFunctionType CostFunctionType
Superclass::ParametersType ParametersType
Superclass::StopConditionType StopConditionType
This is a helper class for the automatic parameter estimation of the ASGD optimizer.
This is a helper class for the automatic parameter estimation of the ASGD optimizer.
Samples image voxels on a regular grid.
Samples an image by randomly composing a set of physical coordinates.
This class is a base class for any image sampler that randomly picks samples.
This class is a base class for any image sampler.
Superclass::ParametersType ParametersType
Superclass::DerivativeType DerivativeType
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.