19 #include <itkRegularStepGradientDescentOptimizer.h>
39 OptimizerPointer->SetMaximize(
m_Controls.m_Maximize->isChecked());
40 OptimizerPointer->SetGradientMagnitudeTolerance(
41 m_Controls.m_GradientMagnitudeToleranceRegularStepGradientDescent->text().toFloat());
42 OptimizerPointer->SetMinimumStepLength(
m_Controls.m_MinimumStepLengthRegularStepGradientDescent->text().toFloat());
43 OptimizerPointer->SetMaximumStepLength(
m_Controls.m_MaximumStepLengthRegularStepGradientDescent->text().toFloat());
44 OptimizerPointer->SetRelaxationFactor(
m_Controls.m_RelaxationFactorRegularStepGradientDescent->text().toFloat());
45 OptimizerPointer->SetNumberOfIterations(
m_Controls.m_IterationsRegularStepGradientDescent->text().toInt());
46 return OptimizerPointer.GetPointer();
51 itk::Array<double> optimizerValues;
52 optimizerValues.SetSize(6);
53 optimizerValues.fill(0);
54 optimizerValues[0] =
m_Controls.m_Maximize->isChecked();
55 optimizerValues[1] =
m_Controls.m_GradientMagnitudeToleranceRegularStepGradientDescent->text().toFloat();
56 optimizerValues[2] =
m_Controls.m_MinimumStepLengthRegularStepGradientDescent->text().toFloat();
57 optimizerValues[3] =
m_Controls.m_MaximumStepLengthRegularStepGradientDescent->text().toFloat();
58 optimizerValues[4] =
m_Controls.m_RelaxationFactorRegularStepGradientDescent->text().toFloat();
59 optimizerValues[5] =
m_Controls.m_IterationsRegularStepGradientDescent->text().toInt();
60 return optimizerValues;
65 m_Controls.m_Maximize->setChecked(optimizerValues[0]);
66 m_Controls.m_GradientMagnitudeToleranceRegularStepGradientDescent->setText(QString::number(optimizerValues[1]));
67 m_Controls.m_MinimumStepLengthRegularStepGradientDescent->setText(QString::number(optimizerValues[2]));
68 m_Controls.m_MaximumStepLengthRegularStepGradientDescent->setText(QString::number(optimizerValues[3]));
69 m_Controls.m_RelaxationFactorRegularStepGradientDescent->setText(QString::number(optimizerValues[4]));
70 m_Controls.m_IterationsRegularStepGradientDescent->setText(QString::number(optimizerValues[5]));
80 return "RegularStepGradientDescent";
86 QValidator *validatorLineEditInput =
new QIntValidator(0, 20000000,
this);
87 m_Controls.m_IterationsRegularStepGradientDescent->setValidator(validatorLineEditInput);
88 QValidator *validatorLineEditInputFloat =
new QDoubleValidator(0, 20000000, 8,
this);
89 m_Controls.m_GradientMagnitudeToleranceRegularStepGradientDescent->setValidator(validatorLineEditInputFloat);
90 m_Controls.m_MinimumStepLengthRegularStepGradientDescent->setValidator(validatorLineEditInputFloat);
91 m_Controls.m_MaximumStepLengthRegularStepGradientDescent->setValidator(validatorLineEditInputFloat);
92 QValidator *validatorLineEditInputFloat0to1 =
new QDoubleValidator(0.000001, 0.999999, 8,
this);
93 m_Controls.m_RelaxationFactorRegularStepGradientDescent->setValidator(validatorLineEditInputFloat0to1);
~QmitkRegularStepGradientDescentOptimizerView()
QmitkRegularStepGradientDescentOptimizerView(QWidget *parent=nullptr, Qt::WindowFlags f=nullptr)
int m_NumberTransformParameters
itk::SmartPointer< Self > Pointer
virtual QString GetName() override
Ui::QmitkRegularStepGradientDescentOptimizerControls m_Controls
virtual mitk::OptimizerParameters::OptimizerType GetOptimizerType() override
virtual void SetOptimizerParameters(itk::Array< double > metricValues) override
Widget for rigid registration.
virtual itk::Array< double > GetOptimizerParameters() override
virtual void SetupUI(QWidget *parent) override
virtual void SetNumberOfTransformParameters(int transformParameters) override
virtual itk::Object::Pointer GetOptimizer() override
OptimizerType
Unique integer value for every optimizer.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.