29#include "itkMersenneTwisterRandomVariateGenerator.h"
189template <
typename TElastix>
217 using Superclass1::CostFunctionType;
218 using Superclass1::CostFunctionPointer;
228 using typename Superclass1::ParametersType;
278 itkSetMacro(AutomaticParameterEstimation,
bool);
279 itkGetConstMacro(AutomaticParameterEstimation,
bool);
282 itkSetMacro(MaximumStepLength,
double);
283 itkGetConstReferenceMacro(MaximumStepLength,
double);
286 itkSetClampMacro(RegularizationKappa,
double, 0.0, 1.0);
287 itkGetConstReferenceMacro(RegularizationKappa,
double);
424#ifndef ITK_MANUAL_INSTANTIATION
425# include "elxAdaGrad.hxx"
double m_RegularizationKappa
virtual void AutomaticPreconditionerEstimation()
itk::SmartPointer< Self > Pointer
typename AdvancedTransformType::Pointer AdvancedTransformPointer
virtual void AddRandomPerturbation(ParametersType ¶meters, double sigma)
SizeValueType m_MaxBandCovSize
AdaptiveStepsizeOptimizer Superclass1
bool m_AutomaticParameterEstimationDone
typename ImageRandomSamplerType::Pointer ImageRandomSamplerPointer
void MetricErrorResponse(itk::ExceptionObject &err) override
SizeValueType m_NumberOfSamplesForPrecondition
typename JacobianType::ValueType JacobianValueType
elxClassNameMacro("AdaGrad")
AdvancedTransformPointer m_AdvancedTransform
typename ImageGridSamplerType::Pointer ImageGridSamplerPointer
void AfterEachIteration() override
double m_SigmoidScaleFactor
typename RandomGeneratorType::Pointer RandomGeneratorPointer
bool m_AutomaticParameterEstimation
SizeValueType m_NumberOfSamplesForNoiseCompensationFactor
itk::AdvancedTransform< CoordinateRepresentationType, Self::FixedImageDimension, Self::MovingImageDimension > AdvancedTransformType
typename AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
itk::SmartPointer< const Self > ConstPointer
typename TransformType::ScalarType CoordinateRepresentationType
typename RegistrationType::ITKBaseType itkRegistrationType
typename itkRegistrationType::TransformType TransformType
void BeforeEachResolution() override
virtual void GetScaledDerivativeWithExceptionHandling(const ParametersType ¶meters, DerivativeType &derivative)
void BeforeRegistration() override
SizeValueType m_NumberOfJacobianMeasurements
typename RegistrationType::FixedImageType FixedImageType
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
itk::AdvancedBSplineDeformableTransformBase< CoordinateRepresentationType, Self::FixedImageDimension > AdvancedBSplineDeformableTransformType
SizeValueType m_NumberOfGradientMeasurements
itk::ImageRandomCoordinateSampler< FixedImageType > ImageRandomCoordinateSamplerType
void ResumeOptimization() override
typename PreconditionerEstimationType::Pointer PreconditionerEstimationPointer
itkOverrideGetNameOfClassMacro(AdaGrad)
typename RegistrationType::MovingImageType MovingImageType
itk::ComputePreconditionerUsingDisplacementDistribution< FixedImageType, TransformType > PreconditionerEstimationType
double m_MaximumStepLengthRatio
itk::ImageRandomSamplerBase< FixedImageType > ImageRandomSamplerBaseType
bool m_OriginalButSigmoidToDefault
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
typename ElastixType::FixedImageType OutputImageType
SizeValueType m_MaximumNumberOfSamplingAttempts
typename FixedImageType::RegionType FixedImageRegionType
typename ImageSamplerBaseType::Pointer ImageSamplerBasePointer
void AdvanceOneStep() override
typename ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
typename ImageSampleContainerType::Pointer ImageSampleContainerPointer
typename std::vector< SettingsType > SettingsVectorType
SizeValueType m_PreviousErrorAtIteration
double m_MaximumStepLength
typename ImageRandomCoordinateSamplerType::Pointer ImageRandomCoordinateSamplerPointer
SizeValueType m_NumberOfBandStructureSamples
SettingsVectorType m_SettingsVector
itk::SizeValueType SizeValueType
typename AdvancedBSplineDeformableTransformType::Pointer BSplineTransformBasePointer
itk::ImageSamplerBase< FixedImageType > ImageSamplerBaseType
itk::ImageGridSampler< FixedImageType > ImageGridSamplerType
typename FixedImageType::IndexType FixedImageIndexType
SizeValueType m_CurrentNumberOfSamplingAttempts
ITK_DISALLOW_COPY_AND_MOVE(AdaGrad)
typename Superclass2::ITKBaseType ITKBaseType
void AfterRegistration() override
itk::ComputeDisplacementDistribution< FixedImageType, TransformType > ComputeDisplacementDistributionType
typename TransformType::JacobianType JacobianType
JacobianType TransformJacobianType
typename FixedImageType::PointType FixedImagePointType
SizeValueType m_NumberOfSpatialSamples
typename ImageGridSamplerType::ImageSampleContainerType ImageSampleContainerType
itk::ImageRandomSampler< FixedImageType > ImageRandomSamplerType
bool m_UseNoiseCompensation
void AfterEachResolution() override
~AdaGrad() override=default
virtual void SampleGradients(const ParametersType &mu0, double perturbationSigma, double &gg, double &ee)
OptimizerBase< TElastix > Superclass2
void StartOptimization() override
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
typename ElastixType::RegistrationBaseType RegistrationType
itk::Optimizer ITKBaseType
typename std::vector< SettingsType > SettingsVectorType
typename ITKBaseType::ParametersType ParametersType
This class implements a gradient descent optimizer with adaptive gain.
AdaptiveStepsizeOptimizer()
This is a helper class for the automatic parameter estimation of the ASGD optimizer.
This is a helper class for the automatic estimation of a preconditioner for the FPSGD optimizer....
SmartPointer< Self > Pointer
Samples image voxels on a regular grid.
VectorDataContainer< ImageSampleType > ImageSampleContainerType
SmartPointer< Self > Pointer
Samples an image by randomly composing a set of physical coordinates.
SmartPointer< Self > Pointer
This class is a base class for any image sampler that randomly picks samples.
SmartPointer< Self > Pointer
Samples randomly some voxels of an image.
SmartPointer< Self > Pointer
This class is a base class for any image sampler.
SmartPointer< Self > Pointer