Slicer 5.9
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
32class Q_SLICER_QTMODULES_REFORMAT_EXPORT qSlicerReformatModuleWidget : public qSlicerAbstractModuleWidget
33{
34 Q_OBJECT
35
36public:
38 qSlicerReformatModuleWidget(QWidget* parent = nullptr);
40
52
54 void setSliceNormal(double x, double y, double z);
55
56 bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString()) override;
57
58protected:
59 void setup() override;
60
61public slots:
64 void setWorldPosition(double* newWorldPosition);
65
68 void setSliceOffsetValue(double offset);
69
72
77 void setSliceNormal(double* normal);
78
81
84
87
90
93
96
99
102
105
106protected slots:
108 void onMRMLSliceNodeModified(vtkObject* caller);
109
112
114 void onSliceVisibilityChanged(bool visible);
117
119
121 void onSliceOrientationChanged(const QString& orientation);
122 void onSliderRotationChanged(double rotationX);
123
124protected:
125 QScopedPointer<qSlicerReformatModuleWidgetPrivate> d_ptr;
126
127private:
128 Q_DECLARE_PRIVATE(qSlicerReformatModuleWidget);
129 Q_DISABLE_COPY(qSlicerReformatModuleWidget);
130};
131
132#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.