36 #include <QPushButton>
38 #include <QVBoxLayout>
49 RegistrationBaseWidget(services, parent,
"FastOrientationRegistrationWidget",
"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);
63 connect(mActiveToolProxy.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(enableToolSampleButtonSlot()));
64 connect(mActiveToolProxy.get(), SIGNAL(activeToolChanged(
const QString&)),
this, SLOT(enableToolSampleButtonSlot()));
65 this->enableToolSampleButtonSlot();
75 "<h3>Fast orientation registration.</h3>"
76 "<p><b>Prerequisite:</b> Correctly oriented DICOM axes.</p>"
77 "<p>Fast and approximate method for orienting the data to the patient.</p>"
79 "Align the Polaris tool so that the tools tip points towards the patients feet and the "
80 "markers face the same way as the patients nose. Click the Get Orientation button."
83 "<b>Tip:</b> If the patient is orientated with the nose down towards the table, try using <i>back face</i>."
88 void FastOrientationRegistrationWidget::globalConfigurationFileChangedSlot(QString key)
90 if (key ==
"giveManualToolPhysicalProperties")
91 this->enableToolSampleButtonSlot();
96 connect(mSetOrientationButton, SIGNAL(clicked()),
this, SLOT(setOrientationSlot()));
101 disconnect(mSetOrientationButton, SIGNAL(clicked()),
this, SLOT(setOrientationSlot()));
104 void FastOrientationRegistrationWidget::setOrientationSlot()
110 Transform3D FastOrientationRegistrationWidget::get_tMtm()
const
114 if (mInvertButton->isChecked())
126 void FastOrientationRegistrationWidget::enableToolSampleButtonSlot()
129 bool enabled =
false;
131 tool->getVisible() &&
134 mSetOrientationButton->setEnabled(enabled);
Transform3D createTransformRotateY(const double angle)
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.
TrackingServicePtr trackingService
Transform3D createTransformRotateZ(const double angle)
RegistrationServicePtr registrationService
boost::shared_ptr< class Tool > ToolPtr