Slicer  4.11
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 
63 public slots:
64 
65  void setMRMLScene(vtkMRMLScene* newScene) override;
66 
67  void setThreeDView(qMRMLThreeDView* threeDView);
68 
70  void setViewLink(bool linked);
71 
72  void setOrthographicModeEnabled(bool enabled);
73 
74  void lookFromAxis(const ctkAxesWidget::Axis& axis);
75  void pitchView();
76  void rollView();
77  void yawView();
78  void zoomIn();
79  void zoomOut();
80  void spinView(bool enabled);
81  void rockView(bool enabled);
82  void setAnimationMode(int newAnimationMode);
83 
84  void resetFocalPoint();
85  void set3DAxisVisible(bool visible);
86  void set3DAxisLabelVisible(bool visible);
87 
90  void setUseDepthPeeling(bool use);
93  void setFPSVisible(bool visible);
94 
96  void setLightBlueBackground();
97 
99  void setBlackBackground();
100 
102  void setWhiteBackground();
103 
105  void setBackgroundColor(const QColor& color,
106  QColor color2 = QColor());
107 
108  void setStereoType(int newStereoType);
109  void setOrientationMarkerType(int type);
110  void setOrientationMarkerSize(int size);
111  void setRulerType(int type);
112  void setRulerColor(int color);
113 
114 protected slots:
115  void updateWidgetFromMRMLViewLogic();
116  void updateWidgetFromMRMLView();
117  void updateViewFromMRMLCamera();
118 
119 protected:
120  void setMRMLViewNode(vtkMRMLViewNode* viewNode);
121 
122 private:
123  Q_DECLARE_PRIVATE(qMRMLThreeDViewControllerWidget);
124  Q_DISABLE_COPY(qMRMLThreeDViewControllerWidget);
125 };
126 
127 #endif
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:61
qMRMLViewControllerBar Superclass
Superclass typedef.
Slicer logic class for view manipulation.
3D view for view nodes. For performance reasons, the view block refreshs when the scene is in batch p...
MRML node to represent a 3D view.
virtual void setMRMLScene(vtkMRMLScene *newScene)
Set the MRML scene associated with the widget.