Slicer  5.2
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
[legend]
Collaboration diagram for AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin:
Collaboration graph
[legend]

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)
      scriptedPlugin.setPythonSource(AnnotationsSubjectHierarchyPlugin.filePath)

Definition at line 8 of file AnnotationsSubjectHierarchyPlugin.py.

Constructor & Destructor Documentation

◆ __init__()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.__init__ (   self,
  scriptedPlugin 
)

Definition at line 26 of file AnnotationsSubjectHierarchyPlugin.py.

Member Function Documentation

◆ canAddNodeToSubjectHierarchy()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.canAddNodeToSubjectHierarchy (   self,
  node,
  parentItemID 
)

Definition at line 30 of file AnnotationsSubjectHierarchyPlugin.py.

◆ canOwnSubjectHierarchyItem()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.canOwnSubjectHierarchyItem (   self,
  itemID 
)

Definition at line 36 of file AnnotationsSubjectHierarchyPlugin.py.

◆ editProperties()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.editProperties (   self,
  itemID 
)

Definition at line 85 of file AnnotationsSubjectHierarchyPlugin.py.

◆ getDisplayVisibility()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.getDisplayVisibility (   self,
  itemID 
)

Definition at line 125 of file AnnotationsSubjectHierarchyPlugin.py.

◆ helpText()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.helpText (   self)

Definition at line 49 of file AnnotationsSubjectHierarchyPlugin.py.

◆ icon()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.icon (   self,
  itemID 
)

Definition at line 62 of file AnnotationsSubjectHierarchyPlugin.py.

◆ itemContextMenuActions()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.itemContextMenuActions (   self)

Definition at line 89 of file AnnotationsSubjectHierarchyPlugin.py.

◆ roleForPlugin()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.roleForPlugin (   self)

Definition at line 46 of file AnnotationsSubjectHierarchyPlugin.py.

◆ sceneContextMenuActions()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.sceneContextMenuActions (   self)

Definition at line 92 of file AnnotationsSubjectHierarchyPlugin.py.

◆ setDisplayVisibility()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.setDisplayVisibility (   self,
  itemID,
  visible 
)

Definition at line 121 of file AnnotationsSubjectHierarchyPlugin.py.

◆ showContextMenuActionsForItem()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.showContextMenuActionsForItem (   self,
  itemID 
)

Definition at line 95 of file AnnotationsSubjectHierarchyPlugin.py.

◆ showViewContextMenuActionsForItem()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.showViewContextMenuActionsForItem (   self,
  itemID,
  eventData 
)

Definition at line 113 of file AnnotationsSubjectHierarchyPlugin.py.

◆ tooltip()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.tooltip (   self,
  itemID 
)

Definition at line 116 of file AnnotationsSubjectHierarchyPlugin.py.

◆ 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()
 pluginHandler.registerPlugin(scriptedPlugin)

Definition at line 98 of file AnnotationsSubjectHierarchyPlugin.py.

◆ visibilityIcon()

def AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.visibilityIcon (   self,
  visible 
)

Definition at line 81 of file AnnotationsSubjectHierarchyPlugin.py.

Member Data Documentation

◆ filePath

AnnotationsSubjectHierarchyPlugin.AnnotationsSubjectHierarchyPlugin.filePath = __file__
static

Definition at line 24 of file AnnotationsSubjectHierarchyPlugin.py.


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