Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerVolumeRenderingModuleWidget.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Brigham and Women's Hospital (BWH) All Rights Reserved.
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 Alex Yarmakovich, Isomics Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerVolumeRenderingModuleWidget_h
22 #define __qSlicerVolumeRenderingModuleWidget_h
23 
24 // CTK includes
25 #include <ctkVTKObject.h>
26 
27 // Slicer includes
29 #include "qSlicerVolumeRenderingModuleWidgetsExport.h"
30 
32 class qSlicerVolumeRenderingModuleWidgetPrivate;
34 class vtkMRMLNode;
36 class vtkMRMLViewNode;
37 class vtkMRMLVolumeNode;
40 
42 class Q_SLICER_MODULE_VOLUMERENDERING_WIDGETS_EXPORT qSlicerVolumeRenderingModuleWidget :
44 {
45  Q_OBJECT
46  QVTK_OBJECT
47 
48 public:
50  qSlicerVolumeRenderingModuleWidget(QWidget *parent=nullptr);
52 
53  Q_INVOKABLE vtkMRMLVolumeNode* mrmlVolumeNode()const;
54  Q_INVOKABLE vtkMRMLAnnotationROINode* mrmlROINode()const;
55  Q_INVOKABLE vtkMRMLMarkupsROINode* mrmlMarkupsROINode()const;
56  Q_INVOKABLE vtkMRMLVolumePropertyNode* mrmlVolumePropertyNode()const;
57  Q_INVOKABLE vtkMRMLVolumeRenderingDisplayNode* mrmlDisplayNode()const;
58 
59  void addRenderingMethodWidget(const QString& methodClassName, qSlicerVolumeRenderingPropertiesWidget* widget);
60 
61  bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString()) override;
62  double nodeEditable(vtkMRMLNode* node) override;
63 
64 public slots:
65  void setMRMLVolumeNode(vtkMRMLNode* node);
66  void setMRMLROINode(vtkMRMLNode* node);
67  void setMRMLVolumePropertyNode(vtkMRMLNode* node);
68 
69  void fitROIToVolume();
70 
71 protected slots:
72  void onCurrentMRMLVolumeNodeChanged(vtkMRMLNode* node);
73  void onVisibilityChanged(bool);
74  void onCropToggled(bool);
75 
76  void onCurrentMRMLROINodeChanged(vtkMRMLNode* node);
77  void onCurrentMRMLVolumePropertyNodeChanged(vtkMRMLNode* node);
78 
79  void onCurrentRenderingMethodChanged(int index);
80  void onCurrentMemorySizeChanged();
81  void onCurrentQualityControlChanged(int index);
82  void onCurrentFramerateChanged(double fps);
83  void onAutoReleaseGraphicsResourcesCheckBoxToggled(bool autoRelease);
84 
85  void updateWidgetFromMRML();
86  void updateWidgetFromROINode();
87 
88  void synchronizeScalarDisplayNode();
89  void setFollowVolumeDisplayNode(bool);
90  void setIgnoreVolumesThreshold(bool ignore);
91 
92  void onThresholdChanged(bool threshold);
93  void onROICropDisplayCheckBoxToggled(bool toggle);
94  void onChartsExtentChanged();
95  void onEffectiveRangeModified();
96 
97 protected:
98  void setup() override;
99 
100 protected:
101  QScopedPointer<qSlicerVolumeRenderingModuleWidgetPrivate> d_ptr;
102 
103 private:
104  Q_DECLARE_PRIVATE(qSlicerVolumeRenderingModuleWidget);
105  Q_DISABLE_COPY(qSlicerVolumeRenderingModuleWidget);
106 };
107 
108 #endif
MRML node to represent an ROI markup.
Q_INVOKABLE bool setEditedNode(vtkMRMLNode *node, QString role=QString(), QString context=QString()) override
Node editing.
QScopedPointer< qSlicerVolumeRenderingModuleWidgetPrivate > d_ptr
MRML node for representing a volume (image stack).
MRML node to represent a 3D view.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
Q_INVOKABLE double nodeEditable(vtkMRMLNode *node) override
vtkMRMLVolumePropertyNode contains the transfer functions (scalar opacity, color and gradient opacity...