Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
30 class qMRMLThreeDViewPrivate;
31 class vtkMRMLScene;
32 class vtkMRMLViewNode;
33 class vtkCollection;
34 
39 class QMRML_WIDGETS_EXPORT qMRMLThreeDView : public ctkVTKRenderView
40 {
41  Q_OBJECT
42 public:
44  typedef ctkVTKRenderView Superclass;
45 
47  explicit qMRMLThreeDView(QWidget* parent = 0);
48  virtual ~qMRMLThreeDView();
49 
59  void addDisplayableManager(const QString& displayableManager);
60  Q_INVOKABLE void getDisplayableManagers(vtkCollection* displayableManagers);
61 
63  Q_INVOKABLE vtkMRMLViewNode* mrmlViewNode()const;
64 
66  //vtkInteractorObserver* interactorStyle()const;
67 
73  Q_INVOKABLE void rotateToViewAxis(unsigned int axisId);
74  Q_INVOKABLE void rotateToViewAxis(const std::string& axisLabel);
75  Q_INVOKABLE void resetCamera(bool resetRotation = true,
76  bool resetTranslation = true,
77  bool resetDistance = true);
78 
80  Q_INVOKABLE void setViewCursor(const QCursor &);
81 
83  Q_INVOKABLE void unsetViewCursor();
84 
85 public slots:
86 
90  void setMRMLScene(vtkMRMLScene* newScene);
91 
93  void setMRMLViewNode(vtkMRMLViewNode* newViewNode);
94 
96  void lookFromViewAxis(const ctkAxesWidget::Axis& axis);
97 
100  virtual void resetFocalPoint();
101 
102 protected:
103  QScopedPointer<qMRMLThreeDViewPrivate> d_ptr;
104 
105 private:
106  Q_DECLARE_PRIVATE(qMRMLThreeDView);
107  Q_DISABLE_COPY(qMRMLThreeDView);
108 };
109 
110 #endif
QScopedPointer< qMRMLThreeDViewPrivate > d_ptr
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
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.
ctkVTKRenderView Superclass
Superclass typedef.