Slicer 5.6
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
30class qMRMLThreeDViewControllerWidgetPrivate;
31class qMRMLThreeDView;
32
33// MRML includes
34
35// MRMLLogic includes
37class vtkMRMLViewNode;
38
39// VTK includes
40
41class QMRML_WIDGETS_EXPORT qMRMLThreeDViewControllerWidget
43{
44 Q_OBJECT
45 QVTK_OBJECT
46public:
49
51 explicit qMRMLThreeDViewControllerWidget(QWidget* parent = nullptr);
53
55
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
72public 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
94 void set3DAxisVisible(bool visible);
95 void set3DAxisLabelVisible(bool visible);
96
99 void setUseDepthPeeling(bool use);
102 void setFPSVisible(bool visible);
103
106
109
112
114 void setBackgroundColor(const QColor& color,
115 QColor color2 = QColor());
116
118 void setBoxColor(const QColor& color);
119
120 void setStereoType(int newStereoType);
123 void setRulerType(int type);
124 void setRulerColor(int color);
125
126protected slots:
130
131protected:
132 void setMRMLViewNode(vtkMRMLAbstractViewNode* viewNode) override;
133
134private:
135 Q_DECLARE_PRIVATE(qMRMLThreeDViewControllerWidget);
136 Q_DISABLE_COPY(qMRMLThreeDViewControllerWidget);
137};
138
139#endif
vtkMRMLViewLogic * viewLogic() const
Get ViewLogic.
void setBoxColor(const QColor &color)
Utility function to change color of the box.
QString viewLabel() const
Get the label for the view (abbreviation for the view name)
void set3DAxisVisible(bool visible)
Q_INVOKABLE vtkMRMLViewNode * mrmlThreeDViewNode() const
Get 3D view node associated with this ThreeDViewController.
void setMRMLViewNode(vtkMRMLAbstractViewNode *viewNode) override
void setViewLogic(vtkMRMLViewLogic *newViewLogic)
void setQuadBufferStereoSupportEnabled(bool value)
void setViewLabel(const QString &newViewLabel)
Set the label for the table view (abbreviation for the view name)
void setStereoType(int newStereoType)
void setLightBlueBackground()
Utility function to change the color of the background to blue.
void updateWidgetFromMRMLView() override
void setAnimationMode(int newAnimationMode)
void setViewLink(bool linked)
Link/Unlink the view controls and the cameras across all views.
void lookFromAxis(const ctkAxesWidget::Axis &axis)
void setFPSVisible(bool visible)
void setThreeDView(qMRMLThreeDView *threeDView)
void setOrthographicModeEnabled(bool enabled)
void setBlackBackground()
Utility function to change the color of the background to black.
void setOrientationMarkerSize(int size)
qMRMLThreeDViewControllerWidget(QWidget *parent=nullptr)
Constructors.
void setOrientationMarkerType(int type)
void setBackgroundColor(const QColor &color, QColor color2=QColor())
If the second color is not set, the first color is used.
void set3DAxisLabelVisible(bool visible)
void setMRMLScene(vtkMRMLScene *newScene) override
qMRMLViewControllerBar Superclass
Superclass typedef.
void setWhiteBackground()
Utility function to change the color of the background to white.
3D view for view nodes. For performance reasons, the view block refreshes when the scene is in batch ...
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.
Slicer logic class for view manipulation.
MRML node to represent a 3D view.