Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Member Functions | Static Public Attributes
AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin Class Reference
Inheritance diagram for AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin:
Inheritance graph
Collaboration diagram for AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin:
Collaboration graph

Public Member Functions

def __init__ (self, scriptedPlugin)
def canAddNodeToSubjectHierarchy (self, node, parentItemID)
def canOwnSubjectHierarchyItem (self, itemID)
def editProperties (self, itemID)
def getDisplayVisibility (self, itemID)
def helpText (self)
def icon (self, itemID)
def itemContextMenuActions (self)
def roleForPlugin (self)
def sceneContextMenuActions (self)
def setDisplayVisibility (self, itemID, visible)
def showContextMenuActionsForItem (self, itemID)
def showViewContextMenuActionsForItem (self, itemID, eventData)
def tooltip (self, itemID)
def viewContextMenuActions (self)
def visibilityIcon (self, visible)

Static Public Attributes

 filePath = __file__

Detailed Description

Scripted subject hierarchy plugin for the Annotations module.

    This is also an example for scripted plugins, so includes all possible methods.
    The methods that are not needed (i.e. the default implementation in
    qSlicerSubjectHierarchyAbstractPlugin is satisfactory) can simply be
    omitted in plugins created based on this one.

    The plugin registers itself on creation, but needs to be initialized from the
    module or application as follows:
      from SubjectHierarchyPlugins import AnnotationsSubjectHierarchyPlugin
      scriptedPlugin = slicer.qSlicerSubjectHierarchyScriptedPlugin(None)

Definition at line 5 of file

Constructor & Destructor Documentation

◆ __init__()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.__init__ (   self,

Definition at line 23 of file

Member Function Documentation

◆ canAddNodeToSubjectHierarchy()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.canAddNodeToSubjectHierarchy (   self,

Definition at line 27 of file

◆ canOwnSubjectHierarchyItem()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.canOwnSubjectHierarchyItem (   self,

Definition at line 33 of file

◆ editProperties()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.editProperties (   self,

Definition at line 82 of file

◆ getDisplayVisibility()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.getDisplayVisibility (   self,

Definition at line 122 of file

◆ helpText()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.helpText (   self)

Definition at line 46 of file

◆ icon()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.icon (   self,

Definition at line 59 of file

◆ itemContextMenuActions()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.itemContextMenuActions (   self)

Definition at line 86 of file

◆ roleForPlugin()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.roleForPlugin (   self)

Definition at line 43 of file

◆ sceneContextMenuActions()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.sceneContextMenuActions (   self)

Definition at line 89 of file

◆ setDisplayVisibility()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.setDisplayVisibility (   self,

Definition at line 118 of file

◆ showContextMenuActionsForItem()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.showContextMenuActionsForItem (   self,

Definition at line 92 of file

◆ showViewContextMenuActionsForItem()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.showViewContextMenuActionsForItem (   self,

Definition at line 110 of file

◆ tooltip()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.tooltip (   self,

Definition at line 113 of file

◆ viewContextMenuActions()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.viewContextMenuActions (   self)
Important note:
In order to use view menus in scripted plugins, it needs to be registered differently,
so that the Python API can be fully built by the time this function is called.

The following changes are necessary:
1. Remove or comment out the following line from constructor
     AbstractScriptedSubjectHierarchyPlugin.__init__(self, scriptedPlugin)
2. In addition to the initialization where the scripted plugin is instantialized and
   the source set, the plugin also needs to be registered manually:
     pluginHandler = slicer.qSlicerSubjectHierarchyPluginHandler.instance()

Definition at line 95 of file

◆ visibilityIcon()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.visibilityIcon (   self,

Definition at line 78 of file

Member Data Documentation

◆ filePath

AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.filePath = __file__

Definition at line 21 of file

The documentation for this class was generated from the following file: