Slicer  4.10
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 
33 // Due to some reason the Python wrapping of this class fails, therefore
34 // put everything between BTX/ETX to exclude from wrapping.
35 // TODO investigate why the wrapping fails:
36 // https://www.assembla.com/spaces/slicerrt/tickets/210-python-wrapping-error-when-starting-up-slicer-with-slicerrt
37 //BTX
38 
40 class Q_SLICER_MARKUPS_SUBJECT_HIERARCHY_PLUGINS_EXPORT qSlicerSubjectHierarchyMarkupsPlugin : public qSlicerSubjectHierarchyAbstractPlugin
41 {
42 public:
43  Q_OBJECT
44 
45 public:
47  qSlicerSubjectHierarchyMarkupsPlugin(QObject* parent = NULL);
49 
50 public:
58  virtual double canAddNodeToSubjectHierarchy(
59  vtkMRMLNode* node,
60  vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID )const;
61 
68  virtual double canOwnSubjectHierarchyItem(vtkIdType itemID)const;
69 
72  Q_INVOKABLE virtual const QString roleForPlugin()const;
73 
76  virtual QIcon icon(vtkIdType itemID);
77 
79  virtual QIcon visibilityIcon(int visible);
80 
88  virtual void setDisplayColor(vtkIdType itemID, QColor color, QMap<int, QVariant> terminologyMetaData);
89 
96  virtual QColor getDisplayColor(vtkIdType itemID, QMap<int, QVariant> &terminologyMetaData)const;
97 
98 protected:
99  QScopedPointer<qSlicerSubjectHierarchyMarkupsPluginPrivate> d_ptr;
100 
101 private:
102  Q_DECLARE_PRIVATE(qSlicerSubjectHierarchyMarkupsPlugin);
103  Q_DISABLE_COPY(qSlicerSubjectHierarchyMarkupsPlugin);
104 };
105 
106 //ETX
107 
108 #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.
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 QIcon visibilityIcon(int visible)
Get visibility icon for a visibility state.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
virtual Q_INVOKABLE double canOwnSubjectHierarchyItem(vtkIdType itemID) const