Slicer  4.10
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 = NULL);
43 
44 public:
53  virtual double canReparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)const;
54 
57  virtual bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID);
58 
65  virtual double canOwnSubjectHierarchyItem(vtkIdType itemID)const;
66 
69  Q_INVOKABLE virtual const QString roleForPlugin()const;
70 
72  virtual const QString helpText()const;
73 
76  virtual QIcon icon(vtkIdType itemID);
77 
79  virtual QIcon visibilityIcon(int visible);
80 
82  virtual void editProperties(vtkIdType itemID);
83 
85  virtual QString tooltip(vtkIdType itemID)const;
86 
88  virtual void setDisplayVisibility(vtkIdType itemID, int visible);
89 
92  virtual int getDisplayVisibility(vtkIdType itemID)const;
93 
101  virtual void setDisplayColor(vtkIdType itemID, QColor color, QMap<int, QVariant> terminologyMetaData);
102 
109  virtual QColor getDisplayColor(vtkIdType itemID, QMap<int, QVariant> &terminologyMetaData)const;
110 
114 
117  virtual void showVisibilityContextMenuActionsForItem(vtkIdType itemID);
118 
119 protected slots:
121  void showOnlyCurrentSegment();
122 
124  void showAllSegments();
125 
127  void jumpSlices();
128 
129 protected:
130  QScopedPointer<qSlicerSubjectHierarchySegmentsPluginPrivate> d_ptr;
131 
132 private:
133  Q_DECLARE_PRIVATE(qSlicerSubjectHierarchySegmentsPlugin);
135 };
136 
137 #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.
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.
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)
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:138
virtual Q_INVOKABLE void showVisibilityContextMenuActionsForItem(vtkIdType itemID)
virtual Q_INVOKABLE double canOwnSubjectHierarchyItem(vtkIdType itemID) const
virtual bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)