Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLThreeDWidget.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Kitware Inc.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Julien Finet, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qMRMLThreeDWidget_h
22 #define __qMRMLThreeDWidget_h
23 
24 // Qt includes
25 #include <QWidget>
26 class QResizeEvent;
27 
28 // qMRMLWidget includes
29 #include "qMRMLWidget.h"
31 class qMRMLThreeDView;
32 class qMRMLThreeDWidgetPrivate;
33 
34 // MRML includes
35 class vtkMRMLScene;
36 class vtkMRMLViewNode;
37 
38 // MRMLLogic includes
39 class vtkMRMLViewLogic;
40 
41 // VTK includes
42 class vtkCollection;
43 
44 class QMRML_WIDGETS_EXPORT qMRMLThreeDWidget : public qMRMLWidget
45 {
46  Q_OBJECT
47  Q_PROPERTY(QString viewLabel READ viewLabel WRITE setViewLabel)
48  Q_PROPERTY(QColor viewColor READ viewColor WRITE setViewColor)
49 
50 public:
53 
55  explicit qMRMLThreeDWidget(QWidget* parent = nullptr);
56  ~qMRMLThreeDWidget() override;
57 
59  Q_INVOKABLE qMRMLThreeDViewControllerWidget* threeDController()const;
60 
62  Q_INVOKABLE vtkMRMLViewNode* mrmlViewNode()const;
63 
65  Q_INVOKABLE vtkMRMLViewLogic* viewLogic()const;
66 
70  Q_INVOKABLE qMRMLThreeDView* threeDView()const;
71 
73  Q_INVOKABLE void addDisplayableManager(const QString& displayableManager);
74  Q_INVOKABLE void getDisplayableManagers(vtkCollection* displayableManagers);
75 
78  QString viewLabel()const;
79 
82  void setViewLabel(const QString& newViewLabel);
83 
85  Q_INVOKABLE void setQuadBufferStereoSupportEnabled(bool value);
86 
89  QColor viewColor()const;
90 
93  void setViewColor(const QColor& newViewColor);
94 
95 public slots:
96  void setMRMLScene(vtkMRMLScene* newScene) override;
97 
99  void setMRMLViewNode(vtkMRMLViewNode* newViewNode);
100 
101 protected:
102  QScopedPointer<qMRMLThreeDWidgetPrivate> d_ptr;
103 
104 private:
105  Q_DECLARE_PRIVATE(qMRMLThreeDWidget);
106  Q_DISABLE_COPY(qMRMLThreeDWidget);
107 };
108 
109 #endif
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
Base class for any widget that requires a MRML Scene.
Definition: qMRMLWidget.h:35
Slicer logic class for view manipulation.
3D view for view nodes. For performance reasons, the view block refreshes when the scene is in batch ...
MRML node to represent a 3D view.