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
qSlicerSubjectHierarchyVolumesPlugin.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
6 Queen's University, Kingston, ON, Canada. All Rights Reserved.
7
8 See COPYRIGHT.txt
9 or http://www.slicer.org/copyright/copyright.txt for details.
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16
17 This file was originally developed by Csaba Pinter, PerkLab, Queen's University
18 and was supported through the Applied Cancer Research Unit program of Cancer Care
19 Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
20
21==============================================================================*/
22
23#ifndef __qSlicerSubjectHierarchyVolumesPlugin_h
24#define __qSlicerSubjectHierarchyVolumesPlugin_h
25
26// SubjectHierarchy includes
28
29#include "qSlicerVolumesSubjectHierarchyPluginsExport.h"
30
31// Slicer includes
33
34// CTK includes
35#include <ctkVTKObject.h>
36
37class qSlicerSubjectHierarchyVolumesPluginPrivate;
39
40class Q_SLICER_VOLUMES_SUBJECT_HIERARCHY_PLUGINS_EXPORT qSlicerSubjectHierarchyVolumesPlugin : public qSlicerSubjectHierarchyAbstractPlugin
41{
42public:
43 Q_OBJECT
44 QVTK_OBJECT
45
46public:
48 qSlicerSubjectHierarchyVolumesPlugin(QObject* parent = nullptr);
50
51public:
52
56
60 void showViewContextMenuActionsForItem(vtkIdType itemID, QVariantMap eventData);
61
70 vtkMRMLNode* node,
71 vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID )const override;
72
79 double canOwnSubjectHierarchyItem(vtkIdType itemID)const override;
80
83 Q_INVOKABLE const QString roleForPlugin()const override;
84
87 QIcon icon(vtkIdType itemID) override;
88
90 QIcon visibilityIcon(int visible) override;
91
93 QString tooltip(vtkIdType itemID)const override;
94
96 void setDisplayVisibility(vtkIdType itemID, int visible) override;
97
100 int getDisplayVisibility(vtkIdType itemID)const override;
101
105
108 void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override;
109
111 bool showItemInView(vtkIdType itemID, vtkMRMLAbstractViewNode* viewNode, vtkIdList* allItemsToShow) override;
112
113public:
118
121
125 void collectShownVolumes( QSet<vtkIdType>& shownVolumeItemIDs,
127
128protected slots:
132
135
140 void onLayoutChanged(int layout);
141
146
150
155
157 void setVolumePreset(const QString& presetId);
158
161
162protected:
163 QScopedPointer<qSlicerSubjectHierarchyVolumesPluginPrivate> d_ptr;
164
165private:
166 Q_DECLARE_PRIVATE(qSlicerSubjectHierarchyVolumesPlugin);
168};
169
170#endif
qSlicerSubjectHierarchyAbstractPlugin(QObject *parent=nullptr)
void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override
void showVolumeInAllViews(vtkMRMLScalarVolumeNode *node, int layer=vtkMRMLApplicationLogic::BackgroundLayer)
int getDisplayVisibility(vtkIdType itemID) const override
double canAddNodeToSubjectHierarchy(vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID) const override
void collectShownVolumes(QSet< vtkIdType > &shownVolumeItemIDs, int layer=vtkMRMLApplicationLogic::BackgroundLayer|vtkMRMLApplicationLogic::ForegroundLayer|vtkMRMLApplicationLogic::LabelLayer) const
double canOwnSubjectHierarchyItem(vtkIdType itemID) const override
QScopedPointer< qSlicerSubjectHierarchyVolumesPluginPrivate > d_ptr
void showViewContextMenuActionsForItem(vtkIdType itemID, QVariantMap eventData)
QList< QAction * > visibilityContextMenuActions() const override
void showVolumeInForeground()
Show volume in the slice views as foreground.
void setDisplayVisibility(vtkIdType itemID, int visible) override
Set display visibility of a owned subject hierarchy item.
QIcon icon(vtkIdType itemID) override
void hideVolumeFromAllViews(vtkMRMLScalarVolumeNode *node)
Hide given volume from all layers of all slice views.
bool showItemInView(vtkIdType itemID, vtkMRMLAbstractViewNode *viewNode, vtkIdList *allItemsToShow) override
Show an item in a selected view.
void onLayoutChanged(int layout)
Variant of.
QIcon visibilityIcon(int visible) override
Get visibility icon for a visibility state.
void toggleVisibilityForCurrentItem(bool)
Toggle color legend option for current volume item in a slice view.
qSlicerSubjectHierarchyVolumesPlugin(QObject *parent=nullptr)
QString tooltip(vtkIdType itemID) const override
Generate tooltip for a owned subject hierarchy item.
QList< QAction * > viewContextMenuActions() const override
void setVolumePreset(const QString &presetId)
Set window/level by mapped menu signal.
Q_INVOKABLE const QString roleForPlugin() const override
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
Abstract Superclass for all specific types of MRML nodes.
MRML node for representing a volume (image stack).
QMap< QString, QVariant > QVariantMap