Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLSliceWidget.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 __qMRMLSliceWidget_h
22 #define __qMRMLSliceWidget_h
23 
24 // CTK includes
25 #include <ctkPimpl.h>
26 #include <vtkVersion.h>
27 
28 // qMRMLWidget includes
29 #include "qMRMLWidget.h"
30 
31 #include "qMRMLWidgetsExport.h"
32 
33 class qMRMLSliceView;
34 class qMRMLSliceWidgetPrivate;
36 class vtkCollection;
37 class vtkMRMLScene;
38 class vtkMRMLNode;
39 class vtkMRMLSliceLogic;
40 class vtkMRMLSliceNode;
42 
43 class vtkAlgorithmOutput;
44 class vtkImageData;
45 class vtkInteractorObserver;
46 class vtkCornerAnnotation;
47 class vtkCollection;
48 
49 class QMRML_WIDGETS_EXPORT qMRMLSliceWidget : public qMRMLWidget
50 {
51  Q_OBJECT
52  Q_PROPERTY(QString sliceOrientation READ sliceOrientation WRITE setSliceOrientation)
53  Q_PROPERTY(QString sliceViewName READ sliceViewName WRITE setSliceViewName)
54  Q_PROPERTY(QString sliceViewLabel READ sliceViewLabel WRITE setSliceViewLabel)
55  Q_PROPERTY(QColor sliceViewColor READ sliceViewColor WRITE setSliceViewColor)
56 
57 public:
60 
62  explicit qMRMLSliceWidget(QWidget* parent = 0);
63  virtual ~qMRMLSliceWidget();
64 
66  Q_INVOKABLE qMRMLSliceControllerWidget* sliceController()const;
67 
70  Q_INVOKABLE vtkMRMLSliceNode* mrmlSliceNode()const;
71 
73  Q_INVOKABLE vtkMRMLSliceLogic* sliceLogic()const;
74 
77  Q_INVOKABLE QString sliceOrientation()const;
78 
81  Q_INVOKABLE vtkAlgorithmOutput* imageDataConnection()const;
82 
84  Q_INVOKABLE vtkMRMLSliceCompositeNode* mrmlSliceCompositeNode()const;
85 
88  QString sliceViewName()const;
89 
92  void setSliceViewName(const QString& newSliceViewName);
93 
96  QString sliceViewLabel()const;
97 
100  void setSliceViewLabel(const QString& newSliceViewLabel);
101 
104  QColor sliceViewColor()const;
105 
108  void setSliceViewColor(const QColor& newSliceViewColor);
109 
114  Q_INVOKABLE vtkInteractorObserver* interactorStyle()const;
115 
117  Q_INVOKABLE vtkCornerAnnotation* overlayCornerAnnotation()const;
118 
120  Q_INVOKABLE void setSliceLogics(vtkCollection* logics);
121 
125  Q_INVOKABLE qMRMLSliceView* sliceView()const;
126 
127 public slots:
128  void setMRMLScene(vtkMRMLScene * newScene);
129 
132  void setMRMLSliceNode(vtkMRMLSliceNode* newSliceNode);
133 
136  void setImageDataConnection(vtkAlgorithmOutput* newImageDataConnection);
137 
140  void setSliceOrientation(const QString& orientation);
141 
143  void fitSliceToBackground();
144 
145 signals:
147  void nodeAboutToBeEdited(vtkMRMLNode* node);
148 
149 protected:
150  virtual void showEvent(QShowEvent *);
151 
152  QScopedPointer<qMRMLSliceWidgetPrivate> d_ptr;
153 
159  qMRMLSliceWidget(qMRMLSliceWidgetPrivate* obj, QWidget* parent);
160 
161 private:
162  Q_DECLARE_PRIVATE(qMRMLSliceWidget);
163  Q_DISABLE_COPY(qMRMLSliceWidget);
164 };
165 
166 #endif
MRML node for storing a slice through RAS space.
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
Base class for any widget that requires a MRML Scene.
Definition: qMRMLWidget.h:35
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
Slicer logic class for slice manipulation.