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
qMRMLVolumeInfoWidget.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 Julien Finet, Kitware Inc.
17 and was partially funded by NIH grant 3P41RR013218-12S1
18
19==============================================================================*/
20
21#ifndef __qMRMLVolumeInfoWidget_h
22#define __qMRMLVolumeInfoWidget_h
23
24
25// Qt includes
26#include <QListWidget>
27
28// CTK includes
29#include <ctkVTKObject.h>
30
31// qMRML includes
32#include "qMRMLWidget.h"
33#include "qMRMLWidgetsExport.h"
34
35class qMRMLVolumeInfoWidgetPrivate;
36class vtkMRMLNode;
38
39class QMRML_WIDGETS_EXPORT qMRMLVolumeInfoWidget : public qMRMLWidget
40{
41 Q_OBJECT
42 QVTK_OBJECT
44public:
46
47 qMRMLVolumeInfoWidget(QWidget *parent=nullptr);
49
51 // Depends on the dimension, spacing and origin of the volume
52 bool isCentered()const;
53
54 // Disabled by default
55 bool isDataTypeEditable()const;
56
57public slots:
62 void setDataTypeEditable(bool enable);
63
64 void setImageSpacing(double*);
65 void setImageOrigin(double*);
66 void center();
67 void setScanOrder(int);
69 void setScalarType(int);
70 void setWindowLevelFromPreset(QListWidgetItem*);
71
72protected slots:
74
75protected:
76 QScopedPointer<qMRMLVolumeInfoWidgetPrivate> d_ptr;
77
78private:
79 Q_DECLARE_PRIVATE(qMRMLVolumeInfoWidget);
80 Q_DISABLE_COPY(qMRMLVolumeInfoWidget);
81};
82
83#endif
bool isCentered() const
void setVolumeNode(vtkMRMLVolumeNode *node)
Set the volume node to display.
void setDataTypeEditable(bool enable)
void setNumberOfScalars(int)
bool isDataTypeEditable() const
qMRMLVolumeInfoWidget(QWidget *parent=nullptr)
void setImageOrigin(double *)
~qMRMLVolumeInfoWidget() override
void setImageSpacing(double *)
void setWindowLevelFromPreset(QListWidgetItem *)
vtkMRMLVolumeNode * volumeNode() const
void setVolumeNode(vtkMRMLNode *node)
Utility function to be connected with generic signals.
QScopedPointer< qMRMLVolumeInfoWidgetPrivate > d_ptr
qMRMLWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Abstract Superclass for all specific types of MRML nodes.
MRML node for representing a volume (image stack).