Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
List of all members | Public Member Functions | Public Attributes
AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect Class Reference
Inheritance diagram for AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect:
Inheritance graph
[legend]

Public Member Functions

 __init__ (self, scriptedEffect)
 
 rasToXy (self, ras, viewWidget)
 
 register (self)
 
 setWidgetMinMaxStepFromImageSpacing (self, spinbox, imageData)
 
 xyToIjk (self, xy, viewWidget, image, parentTransformNode=None)
 
 xyToRas (self, xy, viewWidget)
 
 xyzToIjk (self, xyz, viewWidget, image, parentTransformNode=None)
 
 xyzToRas (self, xyz, viewWidget)
 

Public Attributes

 scriptedEffect
 

Detailed Description

 Abstract scripted segment editor effects for effects implemented in python

    USAGE:
    1. Instantiation and registration
      Instantiate segment editor effect adaptor class from
      module (e.g. from setup function), and set python source:
      > import qSlicerSegmentationsEditorEffectsPythonQt as effects
      > scriptedEffect = effects.qSlicerSegmentEditorScriptedEffect(None)
      > scriptedEffect.setPythonSource(MyEffect.filePath)
      > scriptedEffect.self().register()
      If effect name is added to slicer.modules.segmenteditorscriptedeffectnames
      list then the above instantiation and registration steps are not necessary,
      as the SegmentEditor module do all these.

    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

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

    3. To prevent deactivation of an effect by clicking place fiducial toolbar button,
       override interactionNodeModified(self, interactionNode)

    An example for a generic effect is the ThresholdEffect

Definition at line 10 of file AbstractScriptedSegmentEditorEffect.py.

Constructor & Destructor Documentation

◆ __init__()

AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.__init__ ( self,
scriptedEffect )

Member Function Documentation

◆ rasToXy()

AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.rasToXy ( self,
ras,
viewWidget )

Definition at line 55 of file AbstractScriptedSegmentEditorEffect.py.

◆ register()

AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.register ( self)

Definition at line 48 of file AbstractScriptedSegmentEditorEffect.py.

◆ setWidgetMinMaxStepFromImageSpacing()

AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.setWidgetMinMaxStepFromImageSpacing ( self,
spinbox,
imageData )

Definition at line 80 of file AbstractScriptedSegmentEditorEffect.py.

◆ xyToIjk()

AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.xyToIjk ( self,
xy,
viewWidget,
image,
parentTransformNode = None )

Definition at line 75 of file AbstractScriptedSegmentEditorEffect.py.

◆ xyToRas()

AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.xyToRas ( self,
xy,
viewWidget )

Definition at line 65 of file AbstractScriptedSegmentEditorEffect.py.

◆ xyzToIjk()

AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.xyzToIjk ( self,
xyz,
viewWidget,
image,
parentTransformNode = None )

Definition at line 70 of file AbstractScriptedSegmentEditorEffect.py.

◆ xyzToRas()

AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.xyzToRas ( self,
xyz,
viewWidget )

Definition at line 60 of file AbstractScriptedSegmentEditorEffect.py.

Member Data Documentation

◆ scriptedEffect

AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.scriptedEffect

Definition at line 46 of file AbstractScriptedSegmentEditorEffect.py.


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