Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
33class Q_SLICER_QTMODULES_REFORMAT_EXPORT
35{
36 Q_OBJECT
37
38public:
40 qSlicerReformatModuleWidget(QWidget *parent=nullptr);
42
43 enum OriginReferenceType {ONPLANE, INVOLUME};
44 enum AxesReferenceType {axisX=0, axisY, axisZ};
45
47 void setSliceNormal(double x, double y, double z);
48
49 bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString()) override;
50
51protected:
52 void setup() override;
53
54public slots:
57 void setWorldPosition(double* newWorldPosition);
58
61 void setSliceOffsetValue(double offset);
62
65
70 void setSliceNormal(double* normal);
71
74
77
80
83
86
89
92
95
98
99protected slots:
101 void onMRMLSliceNodeModified(vtkObject* caller);
102
105
107 void onSliceVisibilityChanged(bool visible);
110
112
114 void onSliceOrientationChanged(const QString& orientation);
115 void onSliderRotationChanged(double rotationX);
116
117protected:
118 QScopedPointer<qSlicerReformatModuleWidgetPrivate> d_ptr;
119
120private:
121 Q_DECLARE_PRIVATE(qSlicerReformatModuleWidget);
122 Q_DISABLE_COPY(qSlicerReformatModuleWidget);
123};
124
125#endif
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.