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
qSlicerReformatModuleWidget.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 Michael Jeulin-Lagarrigue, Kitware Inc.
17 and was partially funded by NIH grant 3P41RR013218-12S1
18
19==============================================================================*/
20
21#ifndef __qSlicerReformatModuleWidget_h
22#define __qSlicerReformatModuleWidget_h
23
24// Slicer includes
26
27#include "qSlicerReformatModuleExport.h"
28
29class qSlicerReformatModuleWidgetPrivate;
30class vtkMRMLNode;
31
32class Q_SLICER_QTMODULES_REFORMAT_EXPORT
34{
35 Q_OBJECT
36
37public:
39 qSlicerReformatModuleWidget(QWidget *parent=nullptr);
41
44
46 void setSliceNormal(double x, double y, double z);
47
48 bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString()) override;
49
50protected:
51 void setup() override;
52
53public slots:
56 void setWorldPosition(double* newWorldPosition);
57
60 void setSliceOffsetValue(double offset);
61
64
69 void setSliceNormal(double* normal);
70
73
76
79
82
85
88
91
94
97
98protected slots:
100 void onMRMLSliceNodeModified(vtkObject* caller);
101
104
106 void onSliceVisibilityChanged(bool visible);
109
111
113 void onSliceOrientationChanged(const QString& orientation);
114 void onSliderRotationChanged(double rotationX);
115
116protected:
117 QScopedPointer<qSlicerReformatModuleWidgetPrivate> d_ptr;
118
119private:
120 Q_DECLARE_PRIVATE(qSlicerReformatModuleWidget);
121 Q_DISABLE_COPY(qSlicerReformatModuleWidget);
122};
123
124#endif
qSlicerAbstractModuleWidget(QWidget *parent=nullptr)
void onSliceVisibilityChanged(bool visible)
void setNormalToCamera()
Set slice normal to the camera.
void onSliceNormalToAxisChanged(AxesReferenceType axis)
void setSliceNormal(double *normal)
void rotateCounterClockwise()
Rotate the image slice by 90 degrees in counterclockwise direction.
void setNormalToAxisIS()
Set the normal to a z axis.
void rotateClockwise()
Rotate the image slice by 90 degrees in clockwise direction.
void onSliderRotationChanged(double rotationX)
void flipHorizontal()
Flip the image slice horizontally.
qSlicerAbstractModuleWidget Superclass
void setSliceNormal(double x, double y, double z)
Utility function that sets the normal of the slice plane.
void setNormalToAxisPA()
Set the normal to a y axis.
void onReformatWidgetVisibilityChanged(bool visible)
void onLockReformatWidgetToCamera(bool lock)
bool setEditedNode(vtkMRMLNode *node, QString role=QString(), QString context=QString()) override
Node editing.
qSlicerReformatModuleWidget(QWidget *parent=nullptr)
void setNormalToAxisLR()
Set the normal to a x axis.
void onMRMLSliceNodeModified(vtkObject *caller)
Triggered upon MRML transform node updates.
QScopedPointer< qSlicerReformatModuleWidgetPrivate > d_ptr
void rotateToVolumePlane()
Align slice axes with the displayed volume axes.
void flipVertical()
Flip the image slice vertically.
void onNodeSelected(vtkMRMLNode *node)
void setSliceOffsetValue(double offset)
void onTrackSliceOffsetValueChanged(double offset)
Set slice offset. Used when events will come is rapid succession.
void onSliceOrientationChanged(const QString &orientation)
void centerSliceNode()
Recenter the active node given its coordinates reference.
~qSlicerReformatModuleWidget() override
void onOriginCoordinateReferenceButtonPressed(int reference)
void setWorldPosition(double *newWorldPosition)
Abstract Superclass for all specific types of MRML nodes.