Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLThreeDViewControllerWidget.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 __qMRMLThreeDViewControllerWidget_h
22 #define __qMRMLThreeDViewControllerWidget_h
23 
24 // CTK includes
25 #include <ctkAxesWidget.h>
26 #include <ctkVTKObject.h>
27 
28 // qMRMLWidget includes
29 #include "qMRMLViewControllerBar.h"
30 class qMRMLThreeDViewControllerWidgetPrivate;
31 class qMRMLThreeDView;
32 
33 // MRML includes
34 
35 // MRMLLogic includes
36 class vtkMRMLViewLogic;
37 class vtkMRMLViewNode;
38 
39 // VTK includes
40 
41 class QMRML_WIDGETS_EXPORT qMRMLThreeDViewControllerWidget
42  : public qMRMLViewControllerBar
43 {
44  Q_OBJECT
45  QVTK_OBJECT
46 public:
49 
51  explicit qMRMLThreeDViewControllerWidget(QWidget* parent = nullptr);
53 
54  void setQuadBufferStereoSupportEnabled(bool value);
55 
57  vtkMRMLViewLogic* viewLogic()const;
58 
61  void setViewLogic(vtkMRMLViewLogic* newViewLogic);
62 
64  void setViewLabel(const QString& newViewLabel);
65 
67  QString viewLabel()const;
68 
70  Q_INVOKABLE vtkMRMLViewNode* mrmlThreeDViewNode() const;
71 
72 public slots:
73 
74  void setMRMLScene(vtkMRMLScene* newScene) override;
75 
76  void setThreeDView(qMRMLThreeDView* threeDView);
77 
79  void setViewLink(bool linked);
80 
81  void setOrthographicModeEnabled(bool enabled);
82 
83  void lookFromAxis(const ctkAxesWidget::Axis& axis);
84  void pitchView();
85  void rollView();
86  void yawView();
87  void zoomIn();
88  void zoomOut();
89  void spinView(bool enabled);
90  void rockView(bool enabled);
91  void setAnimationMode(int newAnimationMode);
92 
93  void resetFocalPoint();
94  void set3DAxisVisible(bool visible);
95  void set3DAxisLabelVisible(bool visible);
96 
99  void setUseDepthPeeling(bool use);
102  void setFPSVisible(bool visible);
103 
105  void setLightBlueBackground();
106 
108  void setBlackBackground();
109 
111  void setWhiteBackground();
112 
114  void setBackgroundColor(const QColor& color,
115  QColor color2 = QColor());
116 
118  void setBoxColor(const QColor& color);
119 
120  void setStereoType(int newStereoType);
121  void setOrientationMarkerType(int type);
122  void setOrientationMarkerSize(int size);
123  void setRulerType(int type);
124  void setRulerColor(int color);
125 
126 protected slots:
127  void updateWidgetFromMRMLViewLogic();
128  void updateWidgetFromMRMLView() override;
129  void updateViewFromMRMLCamera();
130 
131 protected:
132  void setMRMLViewNode(vtkMRMLAbstractViewNode* viewNode) override;
133 
134 private:
135  Q_DECLARE_PRIVATE(qMRMLThreeDViewControllerWidget);
136  Q_DISABLE_COPY(qMRMLThreeDViewControllerWidget);
137 };
138 
139 #endif
virtual void updateWidgetFromMRMLView()
virtual void setMRMLViewNode(vtkMRMLAbstractViewNode *viewNode)
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D...
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
qMRMLViewControllerBar Superclass
Superclass typedef.
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.
virtual void setMRMLScene(vtkMRMLScene *newScene)
Set the MRML scene associated with the widget.
Q_INVOKABLE QLabel * viewLabel()
Label that displays the view&#39;s name.