Slicer 5.7
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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// VTK includes
25class vtkAlgorithmOutput;
26class vtkCollection;
27class vtkCornerAnnotation;
28class vtkInteractorObserver;
29
30// CTK includes
31#include <ctkPimpl.h>
32#include <vtkVersion.h>
33
34// qMRMLWidget includes
36#include "qMRMLWidgetsExport.h"
39class qMRMLSliceView;
40class qMRMLSliceWidgetPrivate;
41
42// MRML includes
43class vtkMRMLNode;
44class vtkMRMLScene;
48
49class QMRML_WIDGETS_EXPORT qMRMLSliceWidget : public qMRMLAbstractViewWidget
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 Q_PROPERTY(Qt::Orientation sliceOffsetSliderOrientation READ sliceOffsetSliderOrientation WRITE setSliceOffsetSliderOrientation)
57
58public:
61
63 explicit qMRMLSliceWidget(QWidget* parent = nullptr);
64 ~qMRMLSliceWidget() override;
65
67 Q_INVOKABLE qMRMLSliceControllerWidget* sliceController()const;
68 Q_INVOKABLE qMRMLViewControllerBar* controllerWidget() const override;
69
71 Q_INVOKABLE qMRMLSliceVerticalControllerWidget* sliceVerticalController()const;
72
75 Q_INVOKABLE vtkMRMLSliceNode* mrmlSliceNode()const;
76 Q_INVOKABLE vtkMRMLAbstractViewNode* mrmlAbstractViewNode()const override;
77
79 Q_INVOKABLE vtkMRMLSliceLogic* sliceLogic()const;
80 Q_INVOKABLE vtkMRMLAbstractLogic* logic()const override;
81
84 Q_INVOKABLE QString sliceOrientation()const;
85
88 Q_INVOKABLE vtkAlgorithmOutput* imageDataConnection()const;
89
91 Q_INVOKABLE vtkMRMLSliceCompositeNode* mrmlSliceCompositeNode()const;
92
95 QString sliceViewName()const;
96
99 void setSliceViewName(const QString& newSliceViewName);
100
103 QString sliceViewLabel()const;
104
107 void setSliceViewLabel(const QString& newSliceViewLabel);
108
111 QColor sliceViewColor()const;
112
115 void setSliceViewColor(const QColor& newSliceViewColor);
116
121 Q_INVOKABLE vtkInteractorObserver* interactorStyle()const;
122
124 Q_INVOKABLE vtkCornerAnnotation* overlayCornerAnnotation()const;
125
127 Q_INVOKABLE void setSliceLogics(vtkCollection* logics);
128
132 Q_INVOKABLE qMRMLSliceView* sliceView()const;
133 Q_INVOKABLE QWidget* viewWidget()const override;
134
137 Qt::Orientation sliceOffsetSliderOrientation() const;
138
139public slots:
140 void setMRMLScene(vtkMRMLScene * newScene) override;
141
144 void setMRMLSliceNode(vtkMRMLSliceNode* newSliceNode);
145 void setMRMLAbstractViewNode(vtkMRMLAbstractViewNode* newSliceNode) override;
146
149 void setImageDataConnection(vtkAlgorithmOutput* newImageDataConnection);
150
153 void setSliceOrientation(const QString& orientation);
154
156 void fitSliceToBackground();
157
160 void setSliceOffsetSliderOrientation(Qt::Orientation orientation);
161
162signals:
164 void nodeAboutToBeEdited(vtkMRMLNode* node);
165
166protected:
167 void showEvent(QShowEvent *) override;
168
169 QScopedPointer<qMRMLSliceWidgetPrivate> d_ptr;
170
176 qMRMLSliceWidget(qMRMLSliceWidgetPrivate* obj, QWidget* parent);
177
178private:
179 Q_DECLARE_PRIVATE(qMRMLSliceWidget);
180 Q_DISABLE_COPY(qMRMLSliceWidget);
181};
182
183#endif
2D view for slice nodes. For performance reasons, the view block refreshes when the scene is in batch...
Superclass for MRML logic classes.
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.
MRML node for storing a slice through RAS space.
Slicer logic class for slice manipulation.
MRML node for storing a slice through RAS space.