Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qMRMLThreeDView.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 Jean-Christophe Fillion-Robin, Kitware Inc.
17 and was partially funded by NIH grant 3P41RR013218-12S1
18
19==============================================================================*/
20
21#ifndef __qMRMLThreeDView_h
22#define __qMRMLThreeDView_h
23
24// CTK includes
25#include <ctkPimpl.h>
26#include <ctkVTKRenderView.h>
27
28#include "qMRMLWidgetsExport.h"
29
30class QDropEvent;
31class qMRMLThreeDViewPrivate;
34class vtkMRMLScene;
36class vtkMRMLViewNode;
37class vtkCollection;
38class vtkSSAOPass;
39
44class QMRML_WIDGETS_EXPORT qMRMLThreeDView : public ctkVTKRenderView
45{
46 Q_OBJECT
63
64public:
66 typedef ctkVTKRenderView Superclass;
67
69 explicit qMRMLThreeDView(QWidget* parent = nullptr);
70 ~qMRMLThreeDView() override;
71
73 void setInteractor(vtkRenderWindowInteractor* interactor) override;
74
77
87 void addDisplayableManager(const QString& displayableManager);
88 Q_INVOKABLE void getDisplayableManagers(vtkCollection* displayableManagers);
89
92
94 Q_INVOKABLE vtkMRMLViewNode* mrmlViewNode()const;
95
101 Q_INVOKABLE void rotateToViewAxis(unsigned int axisId);
102 Q_INVOKABLE void rotateToViewAxis(const std::string& axisLabel);
103 Q_INVOKABLE void resetCamera(bool resetRotation = true,
104 bool resetTranslation = true,
105 bool resetDistance = true);
106
109
111 Q_INVOKABLE void setViewCursor(const QCursor &);
112
114 Q_INVOKABLE void unsetViewCursor();
115
117 Q_INVOKABLE void setDefaultViewCursor(const QCursor &cursor);
118
119 void dragEnterEvent(QDragEnterEvent* event) override;
120 void dropEvent(QDropEvent* event) override;
121
122 bool shadowsVisibility()const;
127
130 Q_INVOKABLE vtkSSAOPass* ssaoPass()const;
131
132public slots:
133
137 void setMRMLScene(vtkMRMLScene* newScene);
138
141
143 void lookFromViewAxis(const ctkAxesWidget::Axis& axis)
144 {
145 qWarning("This function is deprecated. Use lookFromAxis(const ctkAxesWidget::Axis& axis) instead.");
146 this->lookFromAxis(axis);
147 };
148
151 virtual void resetFocalPoint();
152
158
159private:
160 Q_DECLARE_PRIVATE(qMRMLThreeDView);
161 Q_DISABLE_COPY(qMRMLThreeDView);
162};
163
164#endif
Q_INVOKABLE void getDisplayableManagers(vtkCollection *displayableManagers)
Q_INVOKABLE void unsetViewCursor()
Restore default cursor in the view area.
qMRMLThreeDView(QWidget *parent=nullptr)
Constructors.
Q_INVOKABLE vtkMRMLViewNode * mrmlViewNode() const
Get the 3D View node observed by view.
void setAmbientShadowsSizeScale(double)
void setMRMLScene(vtkMRMLScene *newScene)
void addDisplayableManager(const QString &displayableManager)
virtual void resetFocalPoint()
void lookFromViewAxis(const ctkAxesWidget::Axis &axis)
void setMRMLViewNode(vtkMRMLViewNode *newViewNode)
Set the current viewNode to observe.
void setInteractor(vtkRenderWindowInteractor *interactor) override
Sets the interactor of the view.
Q_INVOKABLE void rotateToViewAxis(unsigned int axisId)
Q_INVOKABLE vtkMRMLCameraNode * cameraNode()
Returns camera node of the 3D view.
void setAmbientShadowsVolumeOpacityThreshold(double)
Q_INVOKABLE void resetCamera(bool resetRotation=true, bool resetTranslation=true, bool resetDistance=true)
void setAmbientShadowsIntensityScale(double)
ctkVTKRenderView Superclass
Superclass typedef.
Q_INVOKABLE vtkMRMLThreeDViewInteractorStyle * interactorObserver() const
Returns the interactor observer of the view.
void setShadowsVisibility(bool)
Q_INVOKABLE void setDefaultViewCursor(const QCursor &cursor)
Set default cursor in the view area.
double ambientShadowsSizeScale
void dropEvent(QDropEvent *event) override
double ambientShadowsVolumeOpacityThreshold
Volume rendering opacity above this value will cast shadows.
Q_INVOKABLE vtkSSAOPass * ssaoPass() const
Q_INVOKABLE void setViewCursor(const QCursor &)
Set cursor in the view area.
double ambientShadowsIntensityScale
void setAmbientShadowsIntensityShift(double)
void dragEnterEvent(QDragEnterEvent *event) override
double ambientShadowsIntensityShift
Q_INVOKABLE vtkMRMLAbstractDisplayableManager * displayableManagerByClassName(const char *className)
Return a DisplayableManager given its class name.
Superclass for displayable manager classes.
MRML node to represent camera node.
A set of MRML Nodes that supports serialization and undo/redo.
Interactive manipulation of the camera.
MRML node to represent a 3D view.