Slicer  4.8
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 public:
56 
58  explicit qMRMLSliceWidget(QWidget* parent = 0);
59  virtual ~qMRMLSliceWidget();
60 
62  Q_INVOKABLE qMRMLSliceControllerWidget* sliceController()const;
63 
66  Q_INVOKABLE vtkMRMLSliceNode* mrmlSliceNode()const;
67 
68  // \sa qMRMLSliceControllerWidget::sliceLogic()
69  Q_INVOKABLE vtkMRMLSliceLogic* sliceLogic()const;
70 
73  QString sliceOrientation()const;
74 
77  Q_INVOKABLE vtkAlgorithmOutput* imageDataConnection()const;
78 
80  Q_INVOKABLE vtkMRMLSliceCompositeNode* mrmlSliceCompositeNode()const;
81 
84  QString sliceViewName()const;
85 
88  void setSliceViewName(const QString& newSliceViewName);
89 
92  QString sliceViewLabel()const;
93 
96  void setSliceViewLabel(const QString& newSliceViewLabel);
97 
100  QColor sliceViewColor()const;
101 
104  void setSliceViewColor(const QColor& newSliceViewColor);
105 
110  Q_INVOKABLE vtkInteractorObserver* interactorStyle()const;
111 
113  vtkCornerAnnotation* overlayCornerAnnotation()const;
114 
116  void setSliceLogics(vtkCollection* logics);
117 
121  Q_INVOKABLE qMRMLSliceView* sliceView()const;
122 
123  //virtual bool eventFilter(QObject* object, QEvent* event);
124 public slots:
125 
126  void setMRMLScene(vtkMRMLScene * newScene);
127 
130  void setMRMLSliceNode(vtkMRMLSliceNode* newSliceNode);
131 
134  void setImageDataConnection(vtkAlgorithmOutput* newImageDataConnection);
135 
138  void setSliceOrientation(const QString& orienation);
139 
141  void fitSliceToBackground();
142 
143 signals:
145  void nodeAboutToBeEdited(vtkMRMLNode* node);
146 
147 protected:
148  virtual void showEvent(QShowEvent *);
149 
150  QScopedPointer<qMRMLSliceWidgetPrivate> d_ptr;
151 
157  qMRMLSliceWidget(qMRMLSliceWidgetPrivate* obj, QWidget* parent);
158 
159 private:
160  Q_DECLARE_PRIVATE(qMRMLSliceWidget);
161  Q_DISABLE_COPY(qMRMLSliceWidget);
162 };
163 
164 #endif
QScopedPointer< qMRMLSliceWidgetPrivate > d_ptr
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 ...
qMRMLWidget Superclass
Superclass typedef.
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
virtual void setMRMLScene(vtkMRMLScene *newScene)
Set the MRML scene associated with the widget.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
Slicer logic class for slice manipulation.