Slicer  5.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSubjectHierarchyMarkupsPlugin.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 __qSlicerSubjectHierarchyMarkupsPlugin_h
24 #define __qSlicerSubjectHierarchyMarkupsPlugin_h
25 
26 // SubjectHierarchy includes
28 
29 #include "qSlicerMarkupsSubjectHierarchyPluginsExport.h"
30 
31 class qSlicerSubjectHierarchyMarkupsPluginPrivate;
32 
34 class Q_SLICER_MARKUPS_SUBJECT_HIERARCHY_PLUGINS_EXPORT qSlicerSubjectHierarchyMarkupsPlugin : public qSlicerSubjectHierarchyAbstractPlugin
35 {
36 public:
37  Q_OBJECT
38 
39 public:
41  qSlicerSubjectHierarchyMarkupsPlugin(QObject* parent = nullptr);
43 
44 public:
53  vtkMRMLNode* node,
54  vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID )const override;
55 
62  double canOwnSubjectHierarchyItem(vtkIdType itemID)const override;
63 
66  Q_INVOKABLE const QString roleForPlugin()const override;
67 
70  QIcon icon(vtkIdType itemID) override;
71 
73  QIcon visibilityIcon(int visible) override;
74 
82  void setDisplayColor(vtkIdType itemID, QColor color, QMap<int, QVariant> terminologyMetaData) override;
83 
90  QColor getDisplayColor(vtkIdType itemID, QMap<int, QVariant> &terminologyMetaData)const override;
91 
92  void showContextMenuActionsForItem(vtkIdType itemID) override;
93 
97 
101  void showViewContextMenuActionsForItem(vtkIdType itemID, QVariantMap eventData) override;
102 
106 
109  void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override;
110 
111  void editProperties(vtkIdType itemID) override;
112 
113 protected slots:
115  void renamePoint();
117  void refocusCamera();
119  void deletePoint();
121  void requestDeleteNode();
124  void removeNodesToBeDeleted();
126  void toggleSelectPoint();
128  void jumpToPreviousPoint();
130  void jumpToNextPoint();
132  void jumpToClosestPoint();
134  void editNodeTerminology();
136  void toggleHandleInteractive();
138  void toggleCurrentItemHandleInteractive();
140  void toggleCurrentItemHandleTypeVisibility();
142  void toggleHandleTypeVisibility();
143 
144 protected:
145  QScopedPointer<qSlicerSubjectHierarchyMarkupsPluginPrivate> d_ptr;
146 
147 private:
148  Q_DECLARE_PRIVATE(qSlicerSubjectHierarchyMarkupsPlugin);
149  Q_DISABLE_COPY(qSlicerSubjectHierarchyMarkupsPlugin);
150 };
151 
152 #endif
virtual QIcon icon(vtkIdType itemID)
virtual Q_INVOKABLE const QString roleForPlugin() const
virtual double canAddNodeToSubjectHierarchy(vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID) const
qSlicerSubjectHierarchyAbstractPlugin Superclass
Abstract plugin for handling Subject Hierarchy items.
virtual Q_INVOKABLE void editProperties(vtkIdType itemID)
Open module belonging to item and set inputs in opened module.
QScopedPointer< qSlicerSubjectHierarchyMarkupsPluginPrivate > d_ptr
virtual Q_INVOKABLE QColor getDisplayColor(vtkIdType itemID, QMap< int, QVariant > &terminologyMetaData) const
virtual Q_INVOKABLE void setDisplayColor(vtkIdType itemID, QColor color, QMap< int, QVariant > terminologyMetaData)
virtual Q_INVOKABLE void showContextMenuActionsForItem(vtkIdType itemID)
virtual Q_INVOKABLE void showViewContextMenuActionsForItem(vtkIdType itemID, QVariantMap eventData)
virtual Q_INVOKABLE QIcon visibilityIcon(int visible)
Get visibility icon for a visibility state.
virtual Q_INVOKABLE QList< QAction * > viewContextMenuActions() const
virtual Q_INVOKABLE QList< QAction * > visibilityContextMenuActions() const
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