18#ifndef itkSimpleMultiResolutionImageRegistrationUI_h
19#define itkSimpleMultiResolutionImageRegistrationUI_h
29template <
typename TRegistrator>
60 std::cout <<
"--- Starting level " <<
m_Registrator->GetCurrentLevel() << std::endl;
73template <
typename TRegistration>
89 m_NumberOfIterations = iter;
95 m_LearningRates = rates;
103 this->Superclass::StartNewLevel();
105 if (!this->m_Registrator)
119 unsigned int level = this->m_Registrator->GetCurrentLevel();
120 if (m_NumberOfIterations.Size() >= level + 1)
122 optimizer->SetNumberOfIterations(m_NumberOfIterations[level]);
125 if (m_LearningRates.Size() >= level + 1)
127 optimizer->SetLearningRate(m_LearningRates[level]);
130 std::cout <<
" No. Iterations: " << optimizer->GetNumberOfIterations()
131 <<
" 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