18#ifndef itkSimpleMultiResolutionImageRegistrationUI_h
19#define itkSimpleMultiResolutionImageRegistrationUI_h
29template <
typename TRegistrator>
61 std::cout <<
"--- Starting level " <<
m_Registrator->GetCurrentLevel() << std::endl;
74template <
typename TRegistration>
90 m_NumberOfIterations = iter;
96 m_LearningRates = rates;
104 this->Superclass::StartNewLevel();
106 if (!this->m_Registrator)
120 unsigned int level = this->m_Registrator->GetCurrentLevel();
121 if (m_NumberOfIterations.Size() >= level + 1)
123 optimizer->SetNumberOfIterations(m_NumberOfIterations[level]);
126 if (m_LearningRates.Size() >= level + 1)
128 optimizer->SetLearningRate(m_LearningRates[level]);
131 std::cout <<
" No. Iterations: " << optimizer->GetNumberOfIterations()
132 <<
" Learning rate: " << optimizer->GetLearningRate() << std::endl;
void SetLearningRates(itk::Array< double > &rates)
void StartNewLevel() override
SimpleMultiResolutionImageRegistrationUI2(TRegistration *ptr)
~SimpleMultiResolutionImageRegistrationUI2() override=default
void SetNumberOfIterations(itk::Array< unsigned int > &iter)
SimpleMultiResolutionImageRegistrationUI(TRegistrator *ptr)
TRegistrator::Pointer m_Registrator
virtual void StartNewLevel()
virtual ~SimpleMultiResolutionImageRegistrationUI()
Implement a gradient descent optimizer.
Templated n-dimensional image class.
Base class for multi-resolution image registration methods.
SmartPointer< Self > Pointer