Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
41class Q_SLICER_VOLUMES_SUBJECT_HIERARCHY_PLUGINS_EXPORT qSlicerSubjectHierarchyVolumesPlugin : public qSlicerSubjectHierarchyAbstractPlugin
42{
43public:
44 Q_OBJECT
45 QVTK_OBJECT
46
47public:
49 qSlicerSubjectHierarchyVolumesPlugin(QObject* parent = nullptr);
51
52public:
53
56 QList<QAction*> viewContextMenuActions()const override;
57
61 void showViewContextMenuActionsForItem(vtkIdType itemID, QVariantMap eventData);
62
71 vtkMRMLNode* node,
72 vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID )const override;
73
80 double canOwnSubjectHierarchyItem(vtkIdType itemID)const override;
81
84 Q_INVOKABLE const QString roleForPlugin()const override;
85
88 QIcon icon(vtkIdType itemID) override;
89
91 QIcon visibilityIcon(int visible) override;
92
94 QString tooltip(vtkIdType itemID)const override;
95
97 void setDisplayVisibility(vtkIdType itemID, int visible) override;
98
101 int getDisplayVisibility(vtkIdType itemID)const override;
102
105 QList<QAction*> visibilityContextMenuActions() const override;
106
109 void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override;
110
112 bool showItemInView(vtkIdType itemID, vtkMRMLAbstractViewNode* viewNode, vtkIdList* allItemsToShow) override;
113
114public:
119
122
126 void collectShownVolumes( QSet<vtkIdType>& shownVolumeItemIDs,
128
129protected slots:
133
136
141 void onLayoutChanged(int layout);
142
147
151
156
158 void setVolumePreset(const QString& presetId);
159
162
163protected:
164 QScopedPointer<qSlicerSubjectHierarchyVolumesPluginPrivate> d_ptr;
165
166private:
167 Q_DECLARE_PRIVATE(qSlicerSubjectHierarchyVolumesPlugin);
169};
170
171#endif
Abstract plugin for handling Subject Hierarchy items.
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).