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
qSlicerSubjectHierarchySegmentsPlugin.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Csaba Pinter, PerkLab, Queen's University
16 and was supported through the Applied Cancer Research Unit program of Cancer Care
17 Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
18
19==============================================================================*/
20
21#ifndef __qSlicerSubjectHierarchySegmentsPlugin_h
22#define __qSlicerSubjectHierarchySegmentsPlugin_h
23
24// Subject Hierarchy includes
26
27#include "qSlicerSegmentationsSubjectHierarchyPluginsExport.h"
28
29class qSlicerSubjectHierarchySegmentsPluginPrivate;
30class vtkMRMLNode;
32
33class Q_SLICER_SEGMENTATIONS_PLUGINS_EXPORT qSlicerSubjectHierarchySegmentsPlugin : public qSlicerSubjectHierarchyAbstractPlugin
34{
35public:
36 Q_OBJECT
37
38public:
40 qSlicerSubjectHierarchySegmentsPlugin(QObject* parent = nullptr);
42
43public:
52 double canReparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)const override;
53
56 bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) override;
57
64 double canOwnSubjectHierarchyItem(vtkIdType itemID)const override;
65
68 Q_INVOKABLE const QString roleForPlugin()const override;
69
71 const QString helpText()const override;
72
75 QIcon icon(vtkIdType itemID) override;
76
78 QIcon visibilityIcon(int visible) override;
79
81 void editProperties(vtkIdType itemID) override;
82
84 QString tooltip(vtkIdType itemID)const override;
85
87 void setDisplayVisibility(vtkIdType itemID, int visible) override;
88
91 int getDisplayVisibility(vtkIdType itemID)const override;
92
101 void setDisplayColor(vtkIdType itemID, QColor color, QMap<int, QVariant> terminologyMetaData) override;
102
110 QColor getDisplayColor(vtkIdType itemID, QMap<int, QVariant> &terminologyMetaData)const override;
111
114
117 void showContextMenuActionsForItem(vtkIdType itemID) override;
118
122
125 void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override;
126
131 bool showItemInView(vtkIdType itemID, vtkMRMLAbstractViewNode* viewNode, vtkIdList* allItemsToShow) override;
132
133protected slots:
136
139
142
145
147 void setOpacityForCurrentItem(double opacity);
148
149protected:
150 QScopedPointer<qSlicerSubjectHierarchySegmentsPluginPrivate> d_ptr;
151
152private:
153 Q_DECLARE_PRIVATE(qSlicerSubjectHierarchySegmentsPlugin);
155};
156
157#endif
qSlicerSubjectHierarchyAbstractPlugin(QObject *parent=nullptr)
qSlicerSubjectHierarchySegmentsPlugin(QObject *parent=nullptr)
void showAllSegments()
Show all segments in segmentation.
double canReparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) const override
void setDisplayVisibility(vtkIdType itemID, int visible) override
Set display visibility of a owned subject hierarchy item.
QColor getDisplayColor(vtkIdType itemID, QMap< int, QVariant > &terminologyMetaData) const override
void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override
QString tooltip(vtkIdType itemID) const override
Generate tooltip for a owned subject hierarchy item.
void editProperties(vtkIdType itemID) override
Open module belonging to item and set inputs in opened module.
QList< QAction * > visibilityContextMenuActions() const override
void jumpSlices()
Jump to slices in slice views to show current segment.
QIcon icon(vtkIdType itemID) override
bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) override
void showContextMenuActionsForItem(vtkIdType itemID) override
void cloneSegment()
Clone the selected segment.
QList< QAction * > itemContextMenuActions() const override
Get item context menu item actions to add to tree view.
bool showItemInView(vtkIdType itemID, vtkMRMLAbstractViewNode *viewNode, vtkIdList *allItemsToShow) override
void showOnlyCurrentSegment()
Show only selected segment, hide all others in segmentation.
QScopedPointer< qSlicerSubjectHierarchySegmentsPluginPrivate > d_ptr
QIcon visibilityIcon(int visible) override
Get visibility icon for a visibility state.
void setDisplayColor(vtkIdType itemID, QColor color, QMap< int, QVariant > terminologyMetaData) override
int getDisplayVisibility(vtkIdType itemID) const override
const QString helpText() const override
Get help text for plugin to be added in subject hierarchy module widget help box.
void setOpacityForCurrentItem(double opacity)
Set opacity for current subject hierarchy item.
Q_INVOKABLE const QString roleForPlugin() const override
double canOwnSubjectHierarchyItem(vtkIdType itemID) 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 to represent a complete subject hierarchy tree.