Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
29 class qSlicerSubjectHierarchySegmentsPluginPrivate;
30 class vtkMRMLNode;
32 
34 class Q_SLICER_SEGMENTATIONS_PLUGINS_EXPORT qSlicerSubjectHierarchySegmentsPlugin : public qSlicerSubjectHierarchyAbstractPlugin
35 {
36 public:
37  Q_OBJECT
38 
39 public:
41  qSlicerSubjectHierarchySegmentsPlugin(QObject* parent = nullptr);
43 
44 public:
53  double canReparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)const override;
54 
57  bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) override;
58 
65  double canOwnSubjectHierarchyItem(vtkIdType itemID)const override;
66 
69  Q_INVOKABLE const QString roleForPlugin()const override;
70 
72  const QString helpText()const override;
73 
76  QIcon icon(vtkIdType itemID) override;
77 
79  QIcon visibilityIcon(int visible) override;
80 
82  void editProperties(vtkIdType itemID) override;
83 
85  QString tooltip(vtkIdType itemID)const override;
86 
88  void setDisplayVisibility(vtkIdType itemID, int visible) override;
89 
92  int getDisplayVisibility(vtkIdType itemID)const override;
93 
101  void setDisplayColor(vtkIdType itemID, QColor color, QMap<int, QVariant> terminologyMetaData) override;
102 
109  QColor getDisplayColor(vtkIdType itemID, QMap<int, QVariant> &terminologyMetaData)const override;
110 
112  QList<QAction*> itemContextMenuActions()const override;
113 
116  void showContextMenuActionsForItem(vtkIdType itemID) override;
117 
121 
124  void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override;
125 
130  bool showItemInView(vtkIdType itemID, vtkMRMLAbstractViewNode* viewNode, vtkIdList* allItemsToShow) override;
131 
132 protected slots:
134  void showOnlyCurrentSegment();
135 
137  void showAllSegments();
138 
140  void jumpSlices();
141 
143  void cloneSegment();
144 
145 protected:
146  QScopedPointer<qSlicerSubjectHierarchySegmentsPluginPrivate> d_ptr;
147 
148 private:
149  Q_DECLARE_PRIVATE(qSlicerSubjectHierarchySegmentsPlugin);
151 };
152 
153 #endif
virtual Q_INVOKABLE void setDisplayVisibility(vtkIdType itemID, int visible)
Set display visibility of an owned subject hierarchy item.
virtual QIcon icon(vtkIdType itemID)
virtual Q_INVOKABLE const QString roleForPlugin() const
virtual Q_INVOKABLE QString tooltip(vtkIdType itemID) const
Generate tooltip for a owned subject hierarchy item.
virtual bool showItemInView(vtkIdType itemID, vtkMRMLAbstractViewNode *viewNode, vtkIdList *allItemsToShow)
Abstract plugin for handling Subject Hierarchy items.
MRML node to represent a complete subject hierarchy tree.
virtual Q_INVOKABLE void editProperties(vtkIdType itemID)
Open module belonging to item and set inputs in opened module.
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D...
virtual double canReparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) const
virtual Q_INVOKABLE QColor getDisplayColor(vtkIdType itemID, QMap< int, QVariant > &terminologyMetaData) const
virtual Q_INVOKABLE int getDisplayVisibility(vtkIdType itemID) const
virtual Q_INVOKABLE void setDisplayColor(vtkIdType itemID, QColor color, QMap< int, QVariant > terminologyMetaData)
virtual Q_INVOKABLE void showContextMenuActionsForItem(vtkIdType itemID)
QScopedPointer< qSlicerSubjectHierarchySegmentsPluginPrivate > d_ptr
virtual Q_INVOKABLE QIcon visibilityIcon(int visible)
Get visibility icon for a visibility state.
virtual Q_INVOKABLE QList< QAction * > visibilityContextMenuActions() const
virtual const QString helpText() const
Get help text for plugin to be added in subject hierarchy module widget help box. ...
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
virtual Q_INVOKABLE void showVisibilityContextMenuActionsForItem(vtkIdType itemID)
virtual Q_INVOKABLE double canOwnSubjectHierarchyItem(vtkIdType itemID) const
virtual bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)
virtual Q_INVOKABLE QList< QAction * > itemContextMenuActions() const