15 #include <QPushButton>
17 #include <QVBoxLayout>
28 RegistrationBaseWidget(services, parent,
"org_custusx_registration_method_fast_landmark_image_to_patient_orientation_widget",
"Fast Orientation Registration"),
29 mSetOrientationButton(new QPushButton(
"Define Orientation")),
30 mInvertButton(new QCheckBox(
"Back face"))
32 QVBoxLayout* layout =
new QVBoxLayout(
this);
33 layout->addWidget(mInvertButton);
34 layout->addWidget(mSetOrientationButton);
37 mSetOrientationButton->setToolTip(
"Orient the data to the patient using a tracked tool.");
42 connect(mActiveToolProxy.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(enableToolSampleButtonSlot()));
43 connect(mActiveToolProxy.get(), SIGNAL(activeToolChanged(
const QString&)),
this, SLOT(enableToolSampleButtonSlot()));
44 this->enableToolSampleButtonSlot();
51 void FastOrientationRegistrationWidget::globalConfigurationFileChangedSlot(QString key)
53 if (key ==
"giveManualToolPhysicalProperties")
54 this->enableToolSampleButtonSlot();
59 connect(mSetOrientationButton, SIGNAL(clicked()),
this, SLOT(setOrientationSlot()));
64 disconnect(mSetOrientationButton, SIGNAL(clicked()),
this, SLOT(setOrientationSlot()));
67 void FastOrientationRegistrationWidget::setOrientationSlot()
70 mServices->registration()->doFastRegistration_Orientation(this->get_tMtm(), prMt);
73 Transform3D FastOrientationRegistrationWidget::get_tMtm()
const
77 if (mInvertButton->isChecked())
89 void FastOrientationRegistrationWidget::enableToolSampleButtonSlot()
92 bool enabled = tool &&
96 mSetOrientationButton->setEnabled(enabled);