Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Member Functions
AbstractScriptedSegmentEditorLabelEffect.AbstractScriptedSegmentEditorLabelEffect Class Reference
Inheritance diagram for AbstractScriptedSegmentEditorLabelEffect.AbstractScriptedSegmentEditorLabelEffect:
Inheritance graph
[legend]
Collaboration diagram for AbstractScriptedSegmentEditorLabelEffect.AbstractScriptedSegmentEditorLabelEffect:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, scriptedEffect)
 
- Public Member Functions inherited from AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect
def __init__ (self, scriptedEffect)
 
def rasToXy (self, ras, viewWidget)
 
def register (self)
 
def setWidgetMinMaxStepFromImageSpacing (self, spinbox, imageData)
 
def xyToIjk (self, xy, viewWidget, image, parentTransformNode=None)
 
def xyToRas (self, xy, viewWidget)
 
def xyzToIjk (self, xyz, viewWidget, image, parentTransformNode=None)
 
def xyzToRas (self, xyz, viewWidget)
 

Additional Inherited Members

- Public Attributes inherited from AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect
 scriptedEffect
 

Detailed Description

Abstract scripted segment editor label effects for effects implemented in python

    USAGE:
    1. Instantiation and registration
      Instantiate segment editor label effect adaptor class from
      module (e.g. from setup function), and set python source:
      > import qSlicerSegmentationsEditorEffectsPythonQt as effects
      > scriptedEffect = effects.qSlicerSegmentEditorScriptedLabelEffect(None)
      > scriptedEffect.setPythonSource(MyLabelEffect.filePath)
      Registration is automatic

    2. Call host C++ implementation using
      > self.scriptedEffect.functionName()

    2.a. Most frequently used such methods are:
      Parameter get/set: parameter, integerParameter, doubleParameter, setParameter
      Add options widget: addOptionsWidget
      Coordinate transforms: rasToXy, xyzToRas, xyToRas, xyzToIjk, xyToIjk
      Convenience getters: renderWindow, renderer, viewNode
      Geometry getters: imageToWorldMatrix (for volume node and for oriented image data with segmentation)

    2.b. Always call API functions (the ones that are defined in the adaptor
      class qSlicerSegmentEditorScriptedLabelEffect) using the adaptor accessor:
      > self.scriptedEffect.updateGUIFromMRML()

    An example for a generic effect is the DrawEffect

Definition at line 13 of file AbstractScriptedSegmentEditorLabelEffect.py.

Constructor & Destructor Documentation

◆ __init__()

def AbstractScriptedSegmentEditorLabelEffect.AbstractScriptedSegmentEditorLabelEffect.__init__ (   self,
  scriptedEffect 
)

Definition at line 43 of file AbstractScriptedSegmentEditorLabelEffect.py.


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