Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qMRMLSliceVerticalControllerWidget.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 Davide Punzo, punzodavide@hotmail.it,
17 and development was supported by CI3.
18
19==============================================================================*/
20
21#ifndef __qMRMLSliceVerticalControllerWidget_h
22#define __qMRMLSliceVerticalControllerWidget_h
23
24// qMRMLWidget includes
25#include "qMRMLWidget.h"
26#include "qMRMLWidgetsExport.h"
27#include <vtkVersion.h>
28
29// CTK includes
30#include <ctkVTKObject.h>
31
32class qMRMLSliceVerticalControllerWidgetPrivate;
34class vtkMRMLScene;
37
46class QMRML_WIDGETS_EXPORT qMRMLSliceVerticalControllerWidget : public qMRMLWidget
47{
48 Q_OBJECT
49 QVTK_OBJECT
51public:
54
56 qMRMLSliceVerticalControllerWidget(QWidget* parent = nullptr);
58
61 Q_INVOKABLE vtkMRMLSliceNode* mrmlSliceNode()const;
62
64 Q_INVOKABLE void setSliceOffsetRange(double min, double max);
65
67 void setSliceOffsetResolution(double resolution);
68
71
74
76 Q_INVOKABLE void setSliceLogic(vtkMRMLSliceLogic * newSliceLogic);
77
80
83
84public slots:
85
86 void setMRMLScene(vtkMRMLScene* newScene) override;
87
90
92 void setShowSliceOffsetSlider(bool show);
93
95 void setSliceOffsetValue(double offset);
96
98 void trackSliceOffsetValue(double offset);
99
100protected slots:
102
103signals:
105
106protected:
107 QScopedPointer<qMRMLSliceVerticalControllerWidgetPrivate> d_ptr;
108
109private:
110 Q_DECLARE_PRIVATE(qMRMLSliceVerticalControllerWidget);
112};
113
114#endif
bool showSliceOffsetSlider() const
Get the slice offset slider visibility.
void setMRMLSliceNode(vtkMRMLSliceNode *newSliceNode)
Set a new SliceNode.
Q_INVOKABLE vtkMRMLSliceNode * mrmlSliceNode() const
void setShowSliceOffsetSlider(bool show)
Set slice offset slider visibility.
void setSliceOffsetResolution(double resolution)
Set slice offset resolution (increment)
Q_INVOKABLE qMRMLSliderWidget * sliceVerticalOffsetSlider()
Get the slice slider widget (shown in the controller bar).
double sliceOffsetResolution()
Get slice offset resolution (increment)
void trackSliceOffsetValue(double offset)
Set slice offset. Used when events will come is rapid succession.
Q_INVOKABLE void setSliceOffsetRange(double min, double max)
Set slice offset range.
qMRMLSliceVerticalControllerWidget(QWidget *parent=nullptr)
Constructors.
void setMRMLScene(vtkMRMLScene *newScene) override
Q_INVOKABLE void setSliceLogic(vtkMRMLSliceLogic *newSliceLogic)
Set newSliceLogic.
QScopedPointer< qMRMLSliceVerticalControllerWidgetPrivate > d_ptr
Q_INVOKABLE vtkMRMLSliceLogic * sliceLogic()
Get SliceLogic.
void setSliceOffsetValue(double offset)
Set slice offset. Used to set a single value.
Extend the ctkSliderWidget to integrate units support.
qMRMLWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
A set of MRML Nodes that supports serialization and undo/redo.
Slicer logic class for slice manipulation.
MRML node for storing a slice through RAS space.