Пример #1
0
ColorWidget::ColorWidget(PatientModelServicePtr patientModelService, QWidget* parent) :
		BaseWidget(parent, "ColorWidget", "Color")
{
	this->setToolTip("Set 2D image properties");
	QVBoxLayout* layout = new QVBoxLayout(this);
	layout->setMargin(0);
	layout->addWidget(new TransferFunction2DColorWidget(patientModelService->getActiveData(), this), 0);
	layout->addStretch(1);
	layout->addWidget(new TransferFunctionPresetWidget(patientModelService, this, false), 0);
}
Пример #2
0
VolumeInfoWidget::VolumeInfoWidget(PatientModelServicePtr patientModelService, QWidget* parent) :
  InfoWidget(parent, "volume_info_widget", "Volume Info"),
  mPatientModelService(patientModelService),
  mActiveData(patientModelService->getActiveData())
{
	this->setToolTip("Display volume info");
	mActiveImageProxy = ActiveImageProxy::New(mActiveData);
	connect(mActiveImageProxy.get(), &ActiveImageProxy::activeImageChanged, this, &VolumeInfoWidget::updateSlot);

	this->addWidgets();

	this->updateSlot();
}
Пример #3
0
TransferFunctionWidget::TransferFunctionWidget(PatientModelServicePtr patientModelService, QWidget* parent, bool connectToActiveImage) :
  BaseWidget(parent, "TransferFunctionWidget", "Transfer Function")
{
	this->setToolTip("Set a new or predefined transfer function on a volume");
  QVBoxLayout* mLayout = new QVBoxLayout(this);

  TransferFunction3DWidget* transferFunctionWidget = new TransferFunction3DWidget(patientModelService->getActiveData(), this, connectToActiveImage);

  mLayout->setMargin(0);
  mLayout->addWidget(transferFunctionWidget);
  mLayout->addWidget(new TransferFunctionPresetWidget(patientModelService, this, true));

  this->setLayout(mLayout);
}