Slicer  4.8
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 
79 public slots:
80 
84  void setMRMLScene(vtkMRMLScene* newScene);
85 
87  void setMRMLViewNode(vtkMRMLViewNode* newViewNode);
88 
90  void lookFromViewAxis(const ctkAxesWidget::Axis& axis);
91 
94  virtual void resetFocalPoint();
95 
96 protected:
97  QScopedPointer<qMRMLThreeDViewPrivate> d_ptr;
98 
99 private:
100  Q_DECLARE_PRIVATE(qMRMLThreeDView);
101  Q_DISABLE_COPY(qMRMLThreeDView);
102 };
103 
104 #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.