18 #ifndef itkSimpleMultiResolutionImageRegistrationUI_h 19 #define itkSimpleMultiResolutionImageRegistrationUI_h 29 template <
typename TRegistrator>
43 iterationCommand->SetCallbackFunction(
this,
57 std::cout <<
"--- Starting level " <<
m_Registrator->GetCurrentLevel()
72 template <
typename TRegistration>
87 m_NumberOfIterations = iter;
92 m_LearningRates = rates;
99 this->Superclass::StartNewLevel();
107 if ( !optimizer )
return;
110 if ( m_NumberOfIterations.Size() >= level + 1 )
112 optimizer->SetNumberOfIterations( m_NumberOfIterations[level] );
115 if ( m_LearningRates.Size() >= level + 1 )
117 optimizer->SetLearningRate( m_LearningRates[level] );
120 std::cout <<
" No. Iterations: " 121 << optimizer->GetNumberOfIterations()
122 <<
" Learning rate: " 123 << optimizer->GetLearningRate()
SimpleMultiResolutionImageRegistrationUI2(TRegistration *ptr)
virtual ~SimpleMultiResolutionImageRegistrationUI2()
void SetNumberOfIterations(itk::Array< unsigned int > &iter)
Implement a gradient descent optimizer.
virtual void StartNewLevel()
void SetLearningRates(itk::Array< double > &rates)
TRegistrator::Pointer m_Registrator
itk::Array< double > m_LearningRates
SimpleMultiResolutionImageRegistrationUI(TRegistrator *ptr)
itk::Array< unsigned int > m_NumberOfIterations
virtual void StartNewLevel()
SimpleMultiResolutionImageRegistrationUI< TRegistration > Superclass
virtual ~SimpleMultiResolutionImageRegistrationUI()