Slicer  4.8
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;
36 class vtkMRMLViewNode;
39 
41 class Q_SLICER_MODULE_VOLUMERENDERING_WIDGETS_EXPORT qSlicerVolumeRenderingModuleWidget :
43 {
44  Q_OBJECT
45  QVTK_OBJECT
46 public:
47 
49  qSlicerVolumeRenderingModuleWidget(QWidget *parent=0);
51 
52  vtkMRMLScalarVolumeNode* mrmlVolumeNode()const;
53  vtkMRMLVolumeRenderingDisplayNode* mrmlDisplayNode()const;
54  vtkMRMLAnnotationROINode* mrmlROINode()const;
55  vtkMRMLVolumePropertyNode* mrmlVolumePropertyNode()const;
56 
57  void addRenderingMethodWidget(const QString& methodClassName,
59 
60  virtual bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString());
61  virtual double nodeEditable(vtkMRMLNode* node);
62 
63 public slots:
64 
66  void setMRMLVolumeNode(vtkMRMLNode* node);
67 
68  void setMRMLDisplayNode(vtkMRMLNode* node);
69 
70  void setMRMLROINode(vtkMRMLNode* node);
71 
72  void setMRMLVolumePropertyNode(vtkMRMLNode* node);
73 
74  void addVolumeIntoView(vtkMRMLNode* node);
75 
76  void fitROIToVolume();
77 
78  void applyPreset(vtkMRMLNode* volumePropertyNode);
79 
80 signals:
81  void currentVolumeNodeChanged(vtkMRMLNode* node);
82  void currentVolumeRenderingDisplayNodeChanged(vtkMRMLNode* node);
83 
84 protected slots:
85  void onCurrentMRMLVolumeNodeChanged(vtkMRMLNode* node);
86  void onVisibilityChanged(bool);
87  void onCropToggled(bool);
88 
89  void onCurrentMRMLDisplayNodeChanged(vtkMRMLNode* node);
90  void onCurrentMRMLROINodeChanged(vtkMRMLNode* node);
91  void onCurrentMRMLVolumePropertyNodeChanged(vtkMRMLNode* node);
92 
93  void onCurrentRenderingMethodChanged(int index);
94  void onCurrentMemorySizeChanged(int index);
95  void onCurrentQualityControlChanged(int index);
96  void onCurrentFramerateChanged(double fps);
97 
98  void startInteraction();
99  void endInteraction();
100  void interaction();
101 
102  void offsetPreset(double newPosition);
103  void resetOffset();
104  void updatePresetSliderRange();
105  void updateFromMRMLDisplayNode();
106  void updateFromMRMLDisplayROINode();
107 
108  void synchronizeScalarDisplayNode();
109  void setFollowVolumeDisplayNode(bool);
110  void setIgnoreVolumesThreshold(bool ignore);
111 
112  void onThresholdChanged(bool threshold);
113  void onROICropDisplayCheckBoxToggled(bool toggle);
114 
115 protected:
116  QScopedPointer<qSlicerVolumeRenderingModuleWidgetPrivate> d_ptr;
117 
118  virtual void setup();
119 
120 private:
121  Q_DECLARE_PRIVATE(qSlicerVolumeRenderingModuleWidget);
122  Q_DISABLE_COPY(qSlicerVolumeRenderingModuleWidget);
123 };
124 
125 #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 to represent a 3D view.
MRML node for representing a volume (image stack).
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
vtkMRMLVolumePropertyNode contains the transfer functions (scalar opacity, color and gradient opacity...