Slicer 5.9
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
42{
43 Q_OBJECT
44 QVTK_OBJECT
45public:
48
50 explicit qMRMLThreeDViewControllerWidget(QWidget* parent = nullptr);
52
54
57
60 void setViewLogic(vtkMRMLViewLogic* newViewLogic);
61
63 void setViewLabel(const QString& newViewLabel);
64
66 QString viewLabel() const;
67
69 Q_INVOKABLE vtkMRMLViewNode* mrmlThreeDViewNode() const;
70
71public slots:
72
73 void setMRMLScene(vtkMRMLScene* newScene) override;
74
75 void setThreeDView(qMRMLThreeDView* threeDView);
76
78 void setViewLink(bool linked);
79
80 void setOrthographicModeEnabled(bool enabled);
81
82 void lookFromAxis(const ctkAxesWidget::Axis& axis);
83 void pitchView();
84 void rollView();
85 void yawView();
86 void zoomIn();
87 void zoomOut();
88 void spinView(bool enabled);
89 void rockView(bool enabled);
90 void setAnimationMode(int newAnimationMode);
91
93 void set3DAxisVisible(bool visible);
94 void set3DAxisLabelVisible(bool visible);
95
98 void setUseDepthPeeling(bool use);
101 void setFPSVisible(bool visible);
102
105
108
111
113 void setBackgroundColor(const QColor& color, QColor color2 = QColor());
114
116 void setBoxColor(const QColor& color);
117
118 void setStereoType(int newStereoType);
121 void setRulerType(int type);
122 void setRulerColor(int color);
123
124 void setShadowsVisibility(bool visibility);
125 void setAmbientShadowsSizeScale(double value);
129
132
133protected slots:
137
138protected:
139 void setMRMLViewNode(vtkMRMLAbstractViewNode* viewNode) override;
140
141private:
142 Q_DECLARE_PRIVATE(qMRMLThreeDViewControllerWidget);
143 Q_DISABLE_COPY(qMRMLThreeDViewControllerWidget);
144};
145
146#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 setAmbientShadowsSizeScale(double value)
void setQuadBufferStereoSupportEnabled(bool value)
void setAmbientShadowsVolumeOpacityThresholdPercent(double opacityPercent)
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 setAmbientShadowsIntensityShift(double value)
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 setAmbientShadowsIntensityScale(double value)
void setThreeDView(qMRMLThreeDView *threeDView)
void setOrthographicModeEnabled(bool enabled)
void setBlackBackground()
Utility function to change the color of the background to black.
void setShadowsVisibility(bool visibility)
void setOrientationMarkerSize(int size)
void resetAmbientShadows()
Reset ambient shadows settings to default values.
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 ...
qMRMLViewControllerBar(QWidget *parent=nullptr)
Constructors.
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.