Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLSliceView.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 __qMRMLSliceView_h
22 #define __qMRMLSliceView_h
23 
24 // CTK includes
25 #include <ctkVTKSliceView.h>
26 
27 // MRML includes
28 #include "qMRMLWidgetsExport.h"
29 
30 class qMRMLSliceViewPrivate;
31 class vtkCollection;
32 class vtkMRMLScene;
33 class vtkMRMLSliceNode;
35 
40 class QMRML_WIDGETS_EXPORT qMRMLSliceView
41  : public ctkVTKSliceView
42 {
43  Q_OBJECT
44 public:
46  typedef ctkVTKSliceView Superclass;
47 
49  explicit qMRMLSliceView(QWidget* parent = 0);
50  virtual ~qMRMLSliceView();
51 
62  Q_INVOKABLE void addDisplayableManager(const QString& displayableManager);
65  Q_INVOKABLE void getDisplayableManagers(vtkCollection *displayableManagers);
66 
68  Q_INVOKABLE vtkMRMLSliceNode* mrmlSliceNode()const;
69 
71  Q_INVOKABLE vtkSliceViewInteractorStyle* sliceViewInteractorStyle()const;
72 
77  Q_INVOKABLE QList<double> convertDeviceToXYZ(const QList<int>&xy)const;
78 
82  Q_INVOKABLE QList<double> convertRASToXYZ(const QList<double>& ras)const;
83 
88  Q_INVOKABLE QList<double> convertXYZToRAS(const QList<double> &xyz)const;
89 
90 
91 public slots:
92 
96  void setMRMLScene(vtkMRMLScene* newScene);
97 
99  void setMRMLSliceNode(vtkMRMLSliceNode* newSliceNode);
100 
101 protected:
102  QScopedPointer<qMRMLSliceViewPrivate> d_ptr;
103 
104 private:
105  Q_DECLARE_PRIVATE(qMRMLSliceView);
106  Q_DISABLE_COPY(qMRMLSliceView);
107 };
108 
109 #endif
MRML node for storing a slice through RAS space.
2D view for slice nodes. For performance reasons, the view block refreshs when the scene is in batch ...
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
Provides customizable interaction routines.
QScopedPointer< qMRMLSliceViewPrivate > d_ptr
ctkVTKSliceView Superclass
Superclass typedef.