19 #include <itkLBFGSOptimizer.h>
38 OptimizerPointer->SetMaximize(
m_Controls.m_Maximize->isChecked());
39 OptimizerPointer->SetGradientConvergenceTolerance(
m_Controls.m_GradientMagnitudeToleranceLBFGS->text().toFloat());
40 OptimizerPointer->SetLineSearchAccuracy(
m_Controls.m_LineSearchAccuracyLBFGS->text().toFloat());
41 OptimizerPointer->SetDefaultStepLength(
m_Controls.m_DefaultStepLengthLBFGS->text().toFloat());
42 OptimizerPointer->SetMaximumNumberOfFunctionEvaluations(
m_Controls.m_MaximumEvaluationsLBFGS->text().toInt());
43 OptimizerPointer->SetTrace(
m_Controls.m_TraceOnLBFGS->isChecked());
44 return OptimizerPointer.GetPointer();
49 itk::Array<double> optimizerValues;
50 optimizerValues.SetSize(6);
51 optimizerValues.fill(0);
52 optimizerValues[0] =
m_Controls.m_Maximize->isChecked();
53 optimizerValues[1] =
m_Controls.m_GradientMagnitudeToleranceLBFGS->text().toFloat();
54 optimizerValues[2] =
m_Controls.m_LineSearchAccuracyLBFGS->text().toFloat();
55 optimizerValues[3] =
m_Controls.m_DefaultStepLengthLBFGS->text().toFloat();
56 optimizerValues[4] =
m_Controls.m_MaximumEvaluationsLBFGS->text().toInt();
57 optimizerValues[5] =
m_Controls.m_TraceOnLBFGS->isChecked();
58 return optimizerValues;
63 m_Controls.m_Maximize->setChecked(optimizerValues[0]);
64 m_Controls.m_GradientMagnitudeToleranceLBFGS->setText(QString::number(optimizerValues[1]));
65 m_Controls.m_LineSearchAccuracyLBFGS->setText(QString::number(optimizerValues[2]));
66 m_Controls.m_DefaultStepLengthLBFGS->setText(QString::number(optimizerValues[3]));
67 m_Controls.m_MaximumEvaluationsLBFGS->setText(QString::number(optimizerValues[4]));
68 m_Controls.m_TraceOnLBFGS->setChecked(optimizerValues[5]);
84 QValidator *validatorLineEditInput =
new QIntValidator(0, 20000000,
this);
85 m_Controls.m_MaximumEvaluationsLBFGS->setValidator(validatorLineEditInput);
86 QValidator *validatorLineEditInputFloat =
new QDoubleValidator(0, 20000000, 8,
this);
87 m_Controls.m_GradientMagnitudeToleranceLBFGS->setValidator(validatorLineEditInputFloat);
88 m_Controls.m_LineSearchAccuracyLBFGS->setValidator(validatorLineEditInputFloat);
89 m_Controls.m_DefaultStepLengthLBFGS->setValidator(validatorLineEditInputFloat);
~QmitkLBFGSOptimizerView()
itk::SmartPointer< Self > Pointer
virtual itk::Object::Pointer GetOptimizer() override
int m_NumberTransformParameters
Ui::QmitkLBFGSOptimizerControls m_Controls
virtual void SetOptimizerParameters(itk::Array< double > metricValues) override
virtual void SetupUI(QWidget *parent) override
virtual QString GetName() override
QmitkLBFGSOptimizerView(QWidget *parent=nullptr, Qt::WindowFlags f=nullptr)
virtual itk::Array< double > GetOptimizerParameters() override
Widget for rigid registration.
virtual void SetNumberOfTransformParameters(int transformParameters) override
virtual mitk::OptimizerParameters::OptimizerType GetOptimizerType() 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.