Slicer  4.10
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 // SlicerQt includes
29 #include "qSlicerVolumeRenderingModuleWidgetsExport.h"
30 
32 class qSlicerVolumeRenderingModuleWidgetPrivate;
34 class vtkMRMLNode;
35 class vtkMRMLVolumeNode;
36 class vtkMRMLViewNode;
39 
41 class Q_SLICER_MODULE_VOLUMERENDERING_WIDGETS_EXPORT qSlicerVolumeRenderingModuleWidget :
43 {
44  Q_OBJECT
45  QVTK_OBJECT
46 
47 public:
49  qSlicerVolumeRenderingModuleWidget(QWidget *parent=0);
51 
52  Q_INVOKABLE vtkMRMLVolumeNode* mrmlVolumeNode()const;
53  Q_INVOKABLE vtkMRMLAnnotationROINode* mrmlROINode()const;
54  Q_INVOKABLE vtkMRMLVolumePropertyNode* mrmlVolumePropertyNode()const;
55  Q_INVOKABLE vtkMRMLVolumeRenderingDisplayNode* mrmlDisplayNode()const;
56 
57  void addRenderingMethodWidget(const QString& methodClassName, qSlicerVolumeRenderingPropertiesWidget* widget);
58 
59  virtual bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString());
60  virtual double nodeEditable(vtkMRMLNode* node);
61 
62 public slots:
63  void setMRMLVolumeNode(vtkMRMLNode* node);
64  void setMRMLROINode(vtkMRMLNode* node);
65  void setMRMLVolumePropertyNode(vtkMRMLNode* node);
66 
67  void fitROIToVolume();
68 
69 protected slots:
70  void onCurrentMRMLVolumeNodeChanged(vtkMRMLNode* node);
71  void onVisibilityChanged(bool);
72  void onCropToggled(bool);
73 
74  void onCurrentMRMLROINodeChanged(vtkMRMLNode* node);
75  void onCurrentMRMLVolumePropertyNodeChanged(vtkMRMLNode* node);
76 
77  void onCurrentRenderingMethodChanged(int index);
78  void onCurrentMemorySizeChanged();
79  void onCurrentQualityControlChanged(int index);
80  void onCurrentFramerateChanged(double fps);
81 
82  void updateWidgetFromMRML();
83  void updateWidgetFromROINode();
84 
85  void synchronizeScalarDisplayNode();
86  void setFollowVolumeDisplayNode(bool);
87  void setIgnoreVolumesThreshold(bool ignore);
88 
89  void onThresholdChanged(bool threshold);
90  void onROICropDisplayCheckBoxToggled(bool toggle);
91  void onChartsExtentChanged();
92  void onEffectiveRangeModified();
93 
94 protected:
95  virtual void setup();
96 
97 protected:
98  QScopedPointer<qSlicerVolumeRenderingModuleWidgetPrivate> d_ptr;
99 
100 private:
101  Q_DECLARE_PRIVATE(qSlicerVolumeRenderingModuleWidget);
102  Q_DISABLE_COPY(qSlicerVolumeRenderingModuleWidget);
103 };
104 
105 #endif
virtual Q_INVOKABLE bool setEditedNode(vtkMRMLNode *node, QString role=QString(), QString context=QString())
Node editing.
virtual Q_INVOKABLE double nodeEditable(vtkMRMLNode *node)
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:138
vtkMRMLVolumePropertyNode contains the transfer functions (scalar opacity, color and gradient opacity...