34 #include <boost/bind.hpp>
35 #include <ctkPluginContext.h>
47 mVerticalLayout(new QVBoxLayout(this)),
50 this->setToolTip(
"Set image position directly");
52 mLabel =
new QLabel(
"Data matrix rMd");
56 connect(mMatrixWidget, SIGNAL(changed()),
this, SLOT(matrixWidgetChanged()));
61 connect(
mServices->registration().get(), SIGNAL(movingDataChanged(QString)),
this, SLOT(movingDataChanged()));
66 this->imageMatrixChanged();
67 this->movingDataChanged();
73 void ManualImageRegistrationWidget::movingDataChanged()
76 disconnect(
mConnectedMovingImage.get(), SIGNAL(transformChanged()),
this, SLOT(imageMatrixChanged()));
80 if (mConnectedMovingImage)
81 connect(mConnectedMovingImage.get(), SIGNAL(transformChanged()),
this, SLOT(imageMatrixChanged()));
83 mLabel->setText(this->getDescription());
85 mMatrixWidget->setEnabled(mConnectedMovingImage!=0);
86 this->imageMatrixChanged();
93 void ManualImageRegistrationWidget::matrixWidgetChanged()
95 if (!mConnectedMovingImage)
97 this->setMatrixFromWidget(mMatrixWidget->
getMatrix());
103 void ManualImageRegistrationWidget::imageMatrixChanged()
105 mMatrixWidget->blockSignals(
true);
106 if (mConnectedMovingImage)
107 mMatrixWidget->
setMatrix(this->getMatrixFromBackend());
109 mMatrixWidget->
setMatrix(Transform3D::Identity());
110 mMatrixWidget->blockSignals(
false);
boost::shared_ptr< class RegServices > RegServicesPtr