18 #ifndef itkSimpleMultiResolutionImageRegistrationUI_h
19 #define itkSimpleMultiResolutionImageRegistrationUI_h
29 template <
typename TRegistrator>
60 std::cout <<
"--- Starting level " <<
m_Registrator->GetCurrentLevel() << std::endl;
73 template <
typename TRegistration>
89 m_NumberOfIterations = iter;
95 m_LearningRates = rates;
103 this->Superclass::StartNewLevel();
105 if (!this->m_Registrator)
113 dynamic_cast<itk::GradientDescentOptimizer *>(this->m_Registrator->GetModifiableOptimizer());
119 const 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;