19 #include <itkGradientDescentOptimizer.h>
39 OptimizerPointer->SetLearningRate(
m_Controls.m_LearningRateGradientDescent->text().toFloat());
40 OptimizerPointer->SetNumberOfIterations(
m_Controls.m_IterationsGradientDescent->text().toInt());
41 return OptimizerPointer.GetPointer();
46 itk::Array<double> optimizerValues;
47 optimizerValues.SetSize(3);
48 optimizerValues.fill(0);
50 optimizerValues[1] =
m_Controls.m_LearningRateGradientDescent->text().toFloat();
51 optimizerValues[2] =
m_Controls.m_IterationsGradientDescent->text().toInt();
52 return optimizerValues;
58 m_Controls.m_LearningRateGradientDescent->setText(QString::number(optimizerValues[1]));
59 m_Controls.m_IterationsGradientDescent->setText(QString::number(optimizerValues[2]));
69 return "GradientDescent";
75 QValidator *validatorLineEditInput =
new QIntValidator(0, 20000000,
this);
76 m_Controls.m_IterationsGradientDescent->setValidator(validatorLineEditInput);
77 QValidator *validatorLineEditInputFloat =
new QDoubleValidator(0, 20000000, 8,
this);
78 m_Controls.m_LearningRateGradientDescent->setValidator(validatorLineEditInputFloat);
Ui::QmitkGradientDescentOptimizerControls m_Controls
~QmitkGradientDescentOptimizerView()
itk::SmartPointer< Self > Pointer
virtual mitk::OptimizerParameters::OptimizerType GetOptimizerType() override
virtual void SetupUI(QWidget *parent) override
virtual QString GetName() override
virtual itk::Array< double > GetOptimizerParameters() override
virtual void SetNumberOfTransformParameters(int transformParameters) override
int m_NumberTransformParameters
virtual void SetOptimizerParameters(itk::Array< double > metricValues) override
virtual itk::Object::Pointer GetOptimizer() override
Widget for rigid registration.
QmitkGradientDescentOptimizerView(QWidget *parent=nullptr, Qt::WindowFlags f=nullptr)
OptimizerType
Unique integer value for every optimizer.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.