36 #include <QPushButton>
38 #include <QVBoxLayout>
49 RegistrationBaseWidget(services, parent,
"org_custusx_registration_method_fast_landmark_image_to_patient_orientation_widget",
"Fast Orientation Registration"),
50 mSetOrientationButton(new QPushButton(
"Define Orientation")),
51 mInvertButton(new QCheckBox(
"Back face"))
53 QVBoxLayout* layout =
new QVBoxLayout(
this);
54 layout->addWidget(mInvertButton);
55 layout->addWidget(mSetOrientationButton);
58 mSetOrientationButton->setToolTip(
"Orient the data to the patient using a tracked tool.");
63 connect(mActiveToolProxy.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(enableToolSampleButtonSlot()));
64 connect(mActiveToolProxy.get(), SIGNAL(activeToolChanged(
const QString&)),
this, SLOT(enableToolSampleButtonSlot()));
65 this->enableToolSampleButtonSlot();
72 void FastOrientationRegistrationWidget::globalConfigurationFileChangedSlot(QString key)
74 if (key ==
"giveManualToolPhysicalProperties")
75 this->enableToolSampleButtonSlot();
80 connect(mSetOrientationButton, SIGNAL(clicked()),
this, SLOT(setOrientationSlot()));
85 disconnect(mSetOrientationButton, SIGNAL(clicked()),
this, SLOT(setOrientationSlot()));
88 void FastOrientationRegistrationWidget::setOrientationSlot()
91 mServices->registration()->doFastRegistration_Orientation(this->get_tMtm(), prMt);
94 Transform3D FastOrientationRegistrationWidget::get_tMtm()
const
98 if (mInvertButton->isChecked())
110 void FastOrientationRegistrationWidget::enableToolSampleButtonSlot()
113 bool enabled = tool &&
114 tool->getVisible() &&
117 mSetOrientationButton->setEnabled(enabled);
Transform3D createTransformRotateY(const double angle)
boost::shared_ptr< class RegServices > RegServicesPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
void valueChangedFor(QString key)
Settings * settings()
Shortcut for accessing the settings instance.
Transform3D createTransformRotateZ(const double angle)
boost::shared_ptr< class Tool > ToolPtr