19 #include <itkNormalVariateGenerator.h>
20 #include <itkOnePlusOneEvolutionaryOptimizer.h>
41 generator->Initialize(12345);
42 OptimizerPointer->SetNormalVariateGenerator(generator);
43 OptimizerPointer->SetShrinkFactor(
m_Controls.m_ShrinkFactorOnePlusOneEvolutionary->text().toFloat());
44 OptimizerPointer->SetGrowthFactor(
m_Controls.m_GrowthFactorOnePlusOneEvolutionary->text().toFloat());
45 OptimizerPointer->SetEpsilon(
m_Controls.m_EpsilonOnePlusOneEvolutionary->text().toFloat());
46 OptimizerPointer->SetInitialRadius(
m_Controls.m_InitialRadiusOnePlusOneEvolutionary->text().toFloat());
47 OptimizerPointer->SetMaximumIteration(
m_Controls.m_IterationsOnePlusOneEvolutionary->text().toInt());
48 return OptimizerPointer.GetPointer();
53 itk::Array<double> optimizerValues;
54 optimizerValues.SetSize(6);
55 optimizerValues.fill(0);
57 optimizerValues[1] =
m_Controls.m_ShrinkFactorOnePlusOneEvolutionary->text().toFloat();
58 optimizerValues[2] =
m_Controls.m_GrowthFactorOnePlusOneEvolutionary->text().toFloat();
59 optimizerValues[3] =
m_Controls.m_EpsilonOnePlusOneEvolutionary->text().toFloat();
60 optimizerValues[4] =
m_Controls.m_InitialRadiusOnePlusOneEvolutionary->text().toFloat();
61 optimizerValues[5] =
m_Controls.m_IterationsOnePlusOneEvolutionary->text().toInt();
62 return optimizerValues;
68 m_Controls.m_ShrinkFactorOnePlusOneEvolutionary->setText(QString::number(optimizerValues[1]));
69 m_Controls.m_GrowthFactorOnePlusOneEvolutionary->setText(QString::number(optimizerValues[2]));
70 m_Controls.m_EpsilonOnePlusOneEvolutionary->setText(QString::number(optimizerValues[3]));
71 m_Controls.m_InitialRadiusOnePlusOneEvolutionary->setText(QString::number(optimizerValues[4]));
72 m_Controls.m_IterationsOnePlusOneEvolutionary->setText(QString::number(optimizerValues[5]));
82 return "OnePlusOneEvolutionary";
88 QValidator *validatorLineEditInput =
new QIntValidator(0, 20000000,
this);
89 m_Controls.m_EpsilonOnePlusOneEvolutionary->setValidator(validatorLineEditInput);
90 m_Controls.m_InitialRadiusOnePlusOneEvolutionary->setValidator(validatorLineEditInput);
91 m_Controls.m_IterationsOnePlusOneEvolutionary->setValidator(validatorLineEditInput);
92 QValidator *validatorLineEditInputFloat =
new QDoubleValidator(0, 20000000, 8,
this);
93 m_Controls.m_ShrinkFactorOnePlusOneEvolutionary->setValidator(validatorLineEditInputFloat);
94 m_Controls.m_GrowthFactorOnePlusOneEvolutionary->setValidator(validatorLineEditInputFloat);
95 m_Controls.m_EpsilonOnePlusOneEvolutionary->setValidator(validatorLineEditInputFloat);
96 m_Controls.m_InitialRadiusOnePlusOneEvolutionary->setValidator(validatorLineEditInputFloat);
97 m_Controls.m_IterationsOnePlusOneEvolutionary->setValidator(validatorLineEditInputFloat);
Ui::QmitkOnePlusOneEvolutionaryOptimizerControls m_Controls
itk::SmartPointer< Self > Pointer
virtual itk::Object::Pointer GetOptimizer() override
QmitkOnePlusOneEvolutionaryOptimizerView(QWidget *parent=nullptr, Qt::WindowFlags f=nullptr)
virtual itk::Array< double > GetOptimizerParameters() override
virtual void SetOptimizerParameters(itk::Array< double > metricValues) override
virtual void SetNumberOfTransformParameters(int transformParameters) override
virtual mitk::OptimizerParameters::OptimizerType GetOptimizerType() override
virtual QString GetName() override
Widget for rigid registration.
int m_NumberTransformParameters
virtual void SetupUI(QWidget *parent) override
OptimizerType
Unique integer value for every optimizer.
~QmitkOnePlusOneEvolutionaryOptimizerView()
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.