예제 #1
0
PatientLandMarksWidget::PatientLandMarksWidget(RegServicesPtr services,
	QWidget* parent, QString objectName, QString windowTitle) :
	LandmarkRegistrationWidget(services, parent, objectName, windowTitle),
	mToolSampleButton(new QPushButton("Sample Tool", this))
{
	mLandmarkListener->useI2IRegistration(false);

	connect(services->patient().get(), &PatientModelService::rMprChanged, this, &PatientLandMarksWidget::setModified);

	//buttons
	mToolSampleButton->setDisabled(true);
	connect(mToolSampleButton, SIGNAL(clicked()), this, SLOT(toolSampleButtonClickedSlot()));

	mRemoveLandmarkButton = new QPushButton("Clear", this);
	mRemoveLandmarkButton->setToolTip("Clear selected landmark");
	connect(mRemoveLandmarkButton, &QPushButton::clicked, this, &PatientLandMarksWidget::removeLandmarkButtonClickedSlot);

	//toolmanager
	mActiveToolProxy = ActiveToolProxy::New(services->tracking());
	connect(mActiveToolProxy.get(), SIGNAL(toolVisible(bool)), this, SLOT(updateToolSampleButton()));
	connect(mActiveToolProxy.get(), SIGNAL(activeToolChanged(const QString&)), this, SLOT(updateToolSampleButton()));

	connect(settings(), &Settings::valueChangedFor, this, &PatientLandMarksWidget::globalConfigurationFileChangedSlot);

	//layout
	mVerticalLayout->addWidget(mLandmarkTableWidget);
	mVerticalLayout->addWidget(mToolSampleButton);
	mVerticalLayout->addWidget(mAvarageAccuracyLabel);
	mVerticalLayout->addWidget(mRemoveLandmarkButton);

	this->updateToolSampleButton();
}
ManualPatientRegistrationWidget::ManualPatientRegistrationWidget(RegServicesPtr services, QWidget* parent, QString objectName) :
				BaseWidget(parent, objectName, "Manual Patient Registration"),
				mVerticalLayout(new QVBoxLayout(this)),
				mServices(services)
{
	this->setToolTip("Set patient registration directly");
	mVerticalLayout->setMargin(0);
	mLabel = new QLabel("Patient Registration matrix rMpr");
	mVerticalLayout->addWidget(mLabel);
	mMatrixWidget = new Transform3DWidget(this);
	mVerticalLayout->addWidget(mMatrixWidget);
	connect(mMatrixWidget, SIGNAL(changed()), this, SLOT(matrixWidgetChanged()));
	connect(services->patient().get(), SIGNAL(rMprChanged()), this, SLOT(patientMatrixChanged()));
	mMatrixWidget->setEditable(true);

	mVerticalLayout->addStretch();

}
ManualImage2ImageRegistrationWidget::ManualImage2ImageRegistrationWidget(RegServicesPtr services, QWidget *parent, QString objectName) :
	ManualImageRegistrationWidget(services, parent, objectName, "Manual Image to Image Registration")
{
	StringPropertyBasePtr fixedImage(new StringPropertyRegistrationFixedImage(services->registration(), services->patient()));
	StringPropertyBasePtr movingImage(new StringPropertyRegistrationMovingImage(services->registration(), services->patient()));

	LabeledComboBoxWidget* fixed = new LabeledComboBoxWidget(this, fixedImage);
	LabeledComboBoxWidget* moving = new LabeledComboBoxWidget(this, movingImage);

    mAvarageAccuracyLabel = new QLabel(QString(" "), this);

	mVerticalLayout->insertWidget(0, fixed);
	mVerticalLayout->insertWidget(1, moving);
    mVerticalLayout->insertWidget(2, mAvarageAccuracyLabel);
}