36 #include <QPushButton>
38 #include <QVBoxLayout>
50 mPatientOrientationButton(new QPushButton(
"Patient Orientation")),
51 mInvertButton(new QCheckBox(
"Back face"))
53 QVBoxLayout* layout =
new QVBoxLayout(
this);
55 layout->addWidget(mInvertButton);
56 layout->addWidget(mPatientOrientationButton);
59 this->setToolTip(
"Set patient orientation using the navigation tool");
60 mPatientOrientationButton->setToolTip(this->toolTip());
61 connect(mPatientOrientationButton, SIGNAL(clicked()),
this, SLOT(setPatientOrientationSlot()));
66 connect(mActiveToolProxy.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(enableToolSampleButtonSlot()));
67 connect(mActiveToolProxy.get(), SIGNAL(activeToolChanged(
const QString&)),
this, SLOT(enableToolSampleButtonSlot()));
68 this->enableToolSampleButtonSlot();
74 void PatientOrientationWidget::globalConfigurationFileChangedSlot(QString key)
76 if (key ==
"giveManualToolPhysicalProperties")
77 this->enableToolSampleButtonSlot();
80 Transform3D PatientOrientationWidget::get_tMtm()
const
84 if (mInvertButton->isChecked())
96 void PatientOrientationWidget::setPatientOrientationSlot()
99 mServices->registration()->applyPatientOrientation(this->get_tMtm(), prMt);
102 void PatientOrientationWidget::enableToolSampleButtonSlot()
105 bool enabled = tool &&
106 tool->getVisible() &&
109 mPatientOrientationButton->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