Slicer  4.10
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 class vtkMRMLViewNode;
35 
36 // MRMLLogic includes
37 class vtkMRMLViewLogic;
38 
39 // VTK includes
40 class vtkCollection;
41 
42 class QMRML_WIDGETS_EXPORT qMRMLThreeDViewControllerWidget
43  : public qMRMLViewControllerBar
44 {
45  Q_OBJECT
46  QVTK_OBJECT
47 public:
50 
52  explicit qMRMLThreeDViewControllerWidget(QWidget* parent = 0);
54 
57  void setViewLabel(const QString& newViewLabel);
58 
60  QString viewLabel()const;
61 
63  void setViewColor(const QColor& newViewColor);
64 
66  QColor viewColor()const;
67 
68  void setQuadBufferStereoSupportEnabled(bool value);
69 
71  vtkMRMLViewLogic* viewLogic()const;
72 
75  void setViewLogic(vtkMRMLViewLogic* newViewLogic);
76 
80  void setViewLogics(vtkCollection* logics);
81 
82 public slots:
83 
84  virtual void setMRMLScene(vtkMRMLScene* newScene);
85 
86  void setThreeDView(qMRMLThreeDView* threeDView);
87  void setMRMLViewNode(vtkMRMLViewNode* viewNode);
88 
90  void setViewLink(bool linked);
91 
92  void setOrthographicModeEnabled(bool enabled);
93 
94  void lookFromAxis(const ctkAxesWidget::Axis& axis);
95  void pitchView();
96  void rollView();
97  void yawView();
98  void zoomIn();
99  void zoomOut();
100  void spinView(bool enabled);
101  void rockView(bool enabled);
102  void setAnimationMode(int newAnimationMode);
103 
104  void resetFocalPoint();
105  void set3DAxisVisible(bool visible);
106  void set3DAxisLabelVisible(bool visible);
107 
110  void setUseDepthPeeling(bool use);
113  void setFPSVisible(bool visible);
114 
116  void setLightBlueBackground();
117 
119  void setBlackBackground();
120 
122  void setWhiteBackground();
123 
125  void setBackgroundColor(const QColor& color,
126  QColor color2 = QColor());
127 
128  void setStereoType(int newStereoType);
129  void setOrientationMarkerType(int type);
130  void setOrientationMarkerSize(int size);
131  void setRulerType(int type);
132 
133 protected slots:
134  void updateWidgetFromMRMLView();
135  void updateViewFromMRMLCamera();
136 
137 private:
138  Q_DECLARE_PRIVATE(qMRMLThreeDViewControllerWidget);
139  Q_DISABLE_COPY(qMRMLThreeDViewControllerWidget);
140 };
141 
142 #endif
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
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.
Q_INVOKABLE QLabel * viewLabel()
Label that displays the view&#39;s name.