Fraxinus  18.10
An IGT application
cxVolumePropertiesWidget.cpp
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
13 
14 #include <QComboBox>
15 #include <QTabWidget>
16 #include <QVBoxLayout>
17 #include <QPushButton>
20 #include "cxImage.h"
22 #include "cxCroppingWidget.h"
23 #include "cxClippingWidget.h"
24 #include "cxShadingWidget.h"
25 #include "cxDataInterface.h"
26 #include "cxDataSelectWidget.h"
28 #include "cxVolumeInfoWidget.h"
29 #include "cxVolumeHelpers.h"
30 #include "cxTypeConversions.h"
31 #include "cxPatientModelService.h"
32 #include "cxVisServices.h"
34 
35 namespace cx
36 {
37 
41 
42 ActiveVolumeWidget::ActiveVolumeWidget(PatientModelServicePtr patientModelService, ViewServicePtr viewService, QWidget* parent) :
43  BaseWidget(parent, "active_volume_widget", "Active Volume")
44 {
45  this->setToolTip("The currently selected active volume");
46  QVBoxLayout* layout = new QVBoxLayout(this);
47  layout->setMargin(0);
48  layout->addWidget(new DataSelectWidget(viewService, patientModelService, this, StringPropertyActiveImage::New(patientModelService)));
49 }
50 
54 
56  TabbedWidget(parent, "volume_properties_widget", "Volume Properties")
57 {
58  this->setToolTip("Volume properties");
59  this->insertWidgetAtTop(new ActiveVolumeWidget(services->patient(), services->view(), this));
60 
61  bool connectToActiveImage = true;
62 
63  this->addTab(new VolumeInfoWidget(services->patient(), this), "Info");
64  this->addTab(new TransferFunctionWidget(services->patient(), this, connectToActiveImage), QString("Transfer Functions"));
65  this->addTab(new ShadingWidget(services->patient()->getActiveData(), this, connectToActiveImage), "Properties");
66  this->addTab(new CroppingWidget(services->patient(), services->view(), this), "Crop");
67  this->addTab(new SelectClippersForImageWidget(services, this), "Clip");
68 }
69 
70 }//namespace
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
ActiveVolumeWidget(PatientModelServicePtr patientModelService, ViewServicePtr viewService, QWidget *parent)
boost::shared_ptr< class ViewService > ViewServicePtr
void insertWidgetAtTop(QWidget *newWidget)
Widget that contains a select active image combobox.
VolumePropertiesWidget(VisServicesPtr services, QWidget *parent)
void addTab(BaseWidget *newTab, QString newTabName)
Interface for making widgets with a hierarchy of tabs.
static StringPropertyActiveImagePtr New(PatientModelServicePtr patientModelService)
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Widget for displaying various volume information.
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
Namespace for all CustusX production code.