18 #ifndef itkSimpleMultiResolutionImageRegistrationUI_h
19 #define itkSimpleMultiResolutionImageRegistrationUI_h
29 template <
typename TRegistrator>
61 std::cout <<
"--- Starting level " <<
m_Registrator->GetCurrentLevel() << std::endl;
74 template <
typename TRegistration>
90 m_NumberOfIterations = iter;
96 m_LearningRates = rates;
104 this->Superclass::StartNewLevel();
106 if (!this->m_Registrator)
114 dynamic_cast<itk::GradientDescentOptimizer *>(this->m_Registrator->GetModifiableOptimizer());
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;