18#ifndef __elxAdaptiveStochasticVarianceReducedGradient_h
19#define __elxAdaptiveStochasticVarianceReducedGradient_h
26#include "itkMersenneTwisterRandomVariateGenerator.h"
29#include "itkPlatformMultiThreader.h"
192template <
class TElastix>
280 itkSetMacro( MaximumStepLength,
double );
281 itkGetConstMacro( MaximumStepLength,
double );
287 itkGetConstReferenceMacro( MaximumNumberOfSamplingAttempts,
SizeValueType );
298 this->
m_Threader->SetNumberOfWorkUnits( numberOfThreads );
361 itkGetStaticConstMacro(FixedImageDimension),
416 double perturbationSigma,
double & gg,
double & ee );
479#ifndef ITK_MANUAL_INSTANTIATION
480#include "elxAdaptiveStochasticVarianceReducedGradient.hxx"
A gradient descent optimizer with an adaptive gain.
SizeValueType m_NumberOfJacobianMeasurements
itk::ImageRandomCoordinateSampler< FixedImageType > ImageRandomCoordinateSamplerType
itk::AdvancedTransform< CoordinateRepresentationType, itkGetStaticConstMacro(FixedImageDimension), itkGetStaticConstMacro(MovingImageDimension) > AdvancedTransformType
void BeforeEachResolution(void) override
JacobianType TransformJacobianType
void operator=(const Self &)
~AdaptiveStochasticVarianceReducedGradient() override
void BeforeRegistration(void) override
Superclass2::RegistrationType RegistrationType
itk::ComputeJacobianTerms< FixedImageType, TransformType > ComputeJacobianTermsType
bool m_AutomaticParameterEstimationDone
void ThreadedAdvanceOneStep(ThreadIdType threadId, ParametersType &newPosition)
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
SizeValueType m_NumberOfInnerLoopSamples
Superclass1::CostFunctionType CostFunctionType
AdaptiveStochasticVarianceReducedGradient()
ImageSamplerBaseType::Pointer ImageSamplerBasePointer
Superclass1::CostFunctionPointer CostFunctionPointer
SizeValueType m_NumberOfGradientMeasurements
Superclass2::ElastixPointer ElastixPointer
void MetricErrorResponse(itk::ExceptionObject &err) override
FixedImageType::PointType FixedImagePointType
itk::ImageGridSampler< FixedImageType > ImageGridSamplerType
RegistrationType::MovingImageType MovingImageType
itk::ImageRandomSampler< FixedImageType > ImageRandomSamplerType
SizeValueType m_PreviousErrorAtIteration
FixedImageType::IndexType FixedImageIndexType
itk::ImageSamplerBase< FixedImageType > ImageSamplerBaseType
ProgressCommand ProgressCommandType
AdaptiveStochasticVarianceReducedGradientOptimizer Superclass1
void StopOptimization(void) override
itk::SizeValueType SizeValueType
virtual void GetScaledDerivativeWithExceptionHandling(const ParametersType ¶meters, DerivativeType &derivative)
Superclass2::ConfigurationType ConfigurationType
ImageSampleContainerType::Pointer ImageSampleContainerPointer
SettingsVectorType m_SettingsVector
ImageGridSamplerType::Pointer ImageGridSamplerPointer
AdaptiveStochasticVarianceReducedGradient Self
itkRegistrationType::TransformType TransformType
Superclass2::RegistrationPointer RegistrationPointer
ImageRandomSamplerType::Pointer ImageRandomSamplerPointer
ImageGridSamplerType::ImageSampleContainerType ImageSampleContainerType
void AdvanceOneStep(void) override
bool m_UseNoiseCompensation
ImageRadomSampleContainerType::Pointer ImageRadomSampleContainerPointer
DerivativeType m_ExactGradient
AdvancedTransformType::Pointer m_AdvancedTransform
RandomGeneratorType::Pointer m_RandomGenerator
TransformType::ScalarType CoordinateRepresentationType
RegistrationType::FixedImageType FixedImageType
SizeValueType m_MaximumNumberOfSamplingAttempts
void AfterRegistration(void) override
FixedImageType::RegionType FixedImageRegionType
void AfterEachIteration(void) override
OptimizerBase< TElastix > Superclass2
virtual void SampleGradients(const ParametersType &mu0, double perturbationSigma, double &gg, double &ee)
void SetNumberOfWorkUnits(ThreadIdType numberOfThreads)
virtual void AutomaticParameterEstimation(void)
double m_MaximumStepLength
unsigned int ThreadIdType
ImageRandomCoordinateSamplerType::Pointer ImageRandomCoordinateSamplerPointer
itk::SmartPointer< const Self > ConstPointer
Superclass2::ITKBaseType ITKBaseType
ProgressCommand::Pointer ProgressCommandPointer
static itk::ITK_THREAD_RETURN_TYPE AdvanceOneStepThreaderCallback(void *arg)
SizeValueType m_OutsideIterations
void ResumeOptimization(void) override
virtual void AutomaticParameterEstimationOriginal(void)
ImageRandomSamplerType::ImageSampleContainerType ImageRadomSampleContainerType
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
itk::SmartPointer< Self > Pointer
void AfterEachResolution(void) override
bool m_OriginalButSigmoidToDefault
virtual void PrintSettingsVector(const SettingsVectorType &settings) const
SizeValueType m_NumberOfBandStructureSamples
itk::ImageRandomSamplerBase< FixedImageType > ImageRandomSamplerBaseType
DerivativeType m_MeanGradient
JacobianType::ValueType JacobianValueType
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
Superclass2::ElastixType ElastixType
virtual void AutomaticParameterEstimationUsingDisplacementDistribution(void)
AdaptiveStochasticVarianceReducedGradient(const Self &)
ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
elxClassNameMacro("AdaptiveStochasticVarianceReducedGradient")
bool m_AutomaticParameterEstimation
virtual void AddRandomPerturbation(ParametersType ¶meters, double sigma)
SizeValueType m_CurrentNumberOfSamplingAttempts
Superclass2::ConfigurationPointer ConfigurationPointer
virtual void CheckForAdvancedTransform(void)
SizeValueType m_MaxBandCovSize
Superclass1::ParametersType ParametersType
std::vector< SettingsType > SettingsVectorType
SizeValueType m_NumberOfSamplesForExactGradient
ImageSamplerBaseType::ImageSampleType ImageSampleType
itk::ComputeDisplacementDistribution< FixedImageType, TransformType > ComputeDisplacementDistributionType
SizeValueType m_NumberOfSpatialSamples
RegistrationType::ITKBaseType itkRegistrationType
void StartOptimization(void) override
TransformType::JacobianType JacobianType
double m_SigmoidScaleFactor
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
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.
Samples randomly some voxels of an image.
A class that defines an image sample, which is the coordinates of a point and its value.
This class is a base class for any image sampler.
Superclass::ParametersType ParametersType
Superclass::DerivativeType DerivativeType
ThreaderType::Pointer m_Threader
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
ParametersType * t_NewPosition