15 #ifndef __elxAdaptiveStochasticGradientDescent_h
16 #define __elxAdaptiveStochasticGradientDescent_h
24 #include "itkMersenneTwisterRandomVariateGenerator.h"
168 template <
class TElastix>
215 virtual void BeforeRegistration(
void );
216 virtual void BeforeEachResolution(
void );
217 virtual void AfterEachResolution(
void );
218 virtual void AfterEachIteration(
void );
219 virtual void AfterRegistration(
void );
224 virtual void StartOptimization(
void );
230 virtual void ResumeOptimization(
void );
233 virtual void MetricErrorResponse( ExceptionObject & err );
244 itkSetMacro( AutomaticParameterEstimation,
bool );
245 itkGetConstMacro( AutomaticParameterEstimation,
bool );
248 itkSetMacro( MaximumStepLength,
double );
249 itkGetConstMacro( MaximumStepLength,
double );
252 itkSetMacro( MaximumNumberOfSamplingAttempts,
unsigned long );
255 itkGetConstReferenceMacro( MaximumNumberOfSamplingAttempts,
unsigned long );
269 struct SettingsType {
double a, A, alpha, fmax, fmin, omega; };
295 itkStaticConstMacro( FixedImageDimension,
unsigned int, FixedImageType::ImageDimension );
296 itkStaticConstMacro( MovingImageDimension,
unsigned int, MovingImageType::ImageDimension );
300 itkGetStaticConstMacro(FixedImageDimension),
309 SettingsVectorType m_SettingsVector;
325 virtual void CheckForAdvancedTransform(
void );
334 virtual void AutomaticParameterEstimation(
void );
344 double perturbationSigma,
double & gg,
double & ee );
354 virtual void SampleFixedImageForJacobianTerms(
360 virtual void ComputeJacobianTerms(
double & TrC,
double & TrCC,
361 double & maxJJ,
double & maxJCJ );
366 virtual void GetScaledDerivativeWithExceptionHandling(
372 virtual void AddRandomPerturbation(
ParametersType & parameters,
double sigma );
377 void operator=(
const Self& );
397 #ifndef ITK_MANUAL_INSTANTIATION
398 #include "elxAdaptiveStochasticGradientDescent.hxx"
401 #endif // end #ifndef __elxAdaptiveStochasticGradientDescent_h
RegistrationType::ITKBaseType itkRegistrationType
AdaptiveStochasticGradientDescentOptimizer Superclass1
SmartPointer< Self > Pointer
itk::ImageRandomSamplerBase< FixedImageType > ImageRandomSamplerBaseType
Superclass::RegistrationPointer RegistrationPointer
double m_MaximumStepLength
Superclass1::StopConditionType StopConditionType
#define elxClassNameMacro(_name)
SmartPointer< Self > Pointer
unsigned int m_NumberOfJacobianMeasurements
unsigned long m_CurrentNumberOfSamplingAttempts
itk::ImageSamplerBase< FixedImageType > ImageSamplerBaseType
Superclass::ParametersType ParametersType
ImageGridSampler< FixedImageType > ImageGridSamplerType
A gradient descent optimizer with an adaptive gain.
Superclass2::ITKBaseType ITKBaseType
This class is the elastix base class for all Optimizers.
virtual ~AdaptiveStochasticGradientDescent()
Superclass::ParametersType ParametersType
ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
Superclass::ElastixType ElastixType
bool m_AutomaticParameterEstimation
Superclass::ConfigurationPointer ConfigurationPointer
Superclass1::ParametersType ParametersType
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
SmartPointer< Self > Pointer
ImageGridSamplerType::Pointer ImageGridSamplerPointer
unsigned int m_NumberOfGradientMeasurements
AdvancedTransform< CoordinateRepresentationType, itkGetStaticConstMacro(FixedImageDimension), itkGetStaticConstMacro(MovingImageDimension) > AdvancedTransformType
TransformType::JacobianType JacobianType
FixedImageType::IndexType FixedImageIndexType
Superclass::StopConditionType StopConditionType
Superclass::ElastixPointer ElastixPointer
JacobianType::ValueType JacobianValueType
This class is a base class for any image sampler.
Superclass::ConfigurationType ConfigurationType
Superclass::DerivativeType DerivativeType
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
FixedImageType::PointType FixedImagePointType
unsigned long m_MaximumNumberOfSamplingAttempts
itkRegistrationType::TransformType TransformType
ImageGridSamplerType::ImageSampleContainerType ImageSampleContainerType
FixedImageType::RegionType FixedImageRegionType
Superclass2::ElastixType ElastixType
unsigned long m_MaxBandCovSize
unsigned int m_NumberOfSamplesForExactGradient
SmartPointer< Self > Pointer
unsigned long m_NumberOfBandStructureSamples
This class implements a gradient descent optimizer with adaptive gain.
ImageSamplerBaseType::Pointer ImageSamplerBasePointer
ProgressCommand ProgressCommandType
OptimizerBase< TElastix > Superclass2
AdvancedTransformType::Pointer m_AdvancedTransform
bool m_AutomaticParameterEstimationDone
Superclass::CostFunctionType CostFunctionType
itk::SmartPointer< Self > Pointer
itk::Optimizer ITKBaseType
Samples an image by randomly composing a set of physical coordinates.
Superclass2::ConfigurationType ConfigurationType
JacobianType TransformJacobianType
Superclass2::ConfigurationPointer ConfigurationPointer
SmartPointer< Self > Pointer
SmartPointer< Self > Pointer
double m_SigmoidScaleFactor
RegistrationType::MovingImageType MovingImageType
RandomGeneratorType::Pointer m_RandomGenerator
TransformType::ScalarType CoordinateRepresentationType
ImageSampleContainerType::Pointer ImageSampleContainerPointer
Superclass2::ElastixPointer ElastixPointer
std::vector< SettingsType > SettingsVectorType
A specialized Command object for updating the progress of a filter.
This class is a base class for any image sampler that randomly picks samples.
Superclass::RegistrationType RegistrationType
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Superclass1::CostFunctionType CostFunctionType
unsigned long m_PreviousErrorAtIteration
Superclass1::CostFunctionPointer CostFunctionPointer
SmartPointer< const Self > ConstPointer
ProgressCommand::Pointer ProgressCommandPointer
ImageRandomCoordinateSamplerType::Pointer ImageRandomCoordinateSamplerPointer
Samples image voxels on a regular grid.
Superclass2::RegistrationType RegistrationType
itk::ImageRandomCoordinateSampler< FixedImageType > ImageRandomCoordinateSamplerType
RegistrationType::FixedImageType FixedImageType
AdaptiveStochasticGradientDescent Self
Superclass2::RegistrationPointer RegistrationPointer