![]() |
Slicer 5.6
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
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 | |
Abstract scripted segment editor effects for effects implemented in python. An example of generic effect is ``ThresholdEffect``. To use the effect, follow these steps: 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 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``. For example:: self.scriptedEffect.updateGUIFromMRML() 3. To prevent deactivation of an effect by clicking place fiducial toolbar button, \ override ``interactionNodeModified(self, interactionNode)``
Definition at line 6 of file AbstractScriptedSegmentEditorEffect.py.
SegmentEditorEffects.AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.__init__ | ( | self, | |
scriptedEffect ) |
Reimplemented in SegmentEditorEffects.AbstractScriptedSegmentEditorAutoCompleteEffect.AbstractScriptedSegmentEditorAutoCompleteEffect, SegmentEditorEffects.AbstractScriptedSegmentEditorLabelEffect.AbstractScriptedSegmentEditorLabelEffect, SegmentEditorEffects.AbstractScriptedSegmentEditorPaintEffect.AbstractScriptedSegmentEditorPaintEffect, SegmentEditorEffects.SegmentEditorDrawEffect.SegmentEditorDrawEffect, SegmentEditorEffects.SegmentEditorFillBetweenSlicesEffect.SegmentEditorFillBetweenSlicesEffect, SegmentEditorEffects.SegmentEditorGrowFromSeedsEffect.SegmentEditorGrowFromSeedsEffect, SegmentEditorEffects.SegmentEditorHollowEffect.SegmentEditorHollowEffect, SegmentEditorEffects.SegmentEditorIslandsEffect.SegmentEditorIslandsEffect, SegmentEditorEffects.SegmentEditorLevelTracingEffect.SegmentEditorLevelTracingEffect, SegmentEditorEffects.SegmentEditorLogicalEffect.SegmentEditorLogicalEffect, SegmentEditorEffects.SegmentEditorMarginEffect.SegmentEditorMarginEffect, SegmentEditorEffects.SegmentEditorMaskVolumeEffect.SegmentEditorMaskVolumeEffect, SegmentEditorEffects.SegmentEditorSmoothingEffect.SegmentEditorSmoothingEffect, and SegmentEditorEffects.SegmentEditorThresholdEffect.SegmentEditorThresholdEffect.
Definition at line 49 of file AbstractScriptedSegmentEditorEffect.py.
SegmentEditorEffects.AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.rasToXy | ( | self, | |
ras, | |||
viewWidget ) |
Definition at line 59 of file AbstractScriptedSegmentEditorEffect.py.
SegmentEditorEffects.AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.register | ( | self | ) |
Definition at line 52 of file AbstractScriptedSegmentEditorEffect.py.
SegmentEditorEffects.AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.setWidgetMinMaxStepFromImageSpacing | ( | self, | |
spinbox, | |||
imageData ) |
Definition at line 84 of file AbstractScriptedSegmentEditorEffect.py.
SegmentEditorEffects.AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.xyToIjk | ( | self, | |
xy, | |||
viewWidget, | |||
image, | |||
parentTransformNode = None ) |
Definition at line 79 of file AbstractScriptedSegmentEditorEffect.py.
SegmentEditorEffects.AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.xyToRas | ( | self, | |
xy, | |||
viewWidget ) |
Definition at line 69 of file AbstractScriptedSegmentEditorEffect.py.
SegmentEditorEffects.AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.xyzToIjk | ( | self, | |
xyz, | |||
viewWidget, | |||
image, | |||
parentTransformNode = None ) |
Definition at line 74 of file AbstractScriptedSegmentEditorEffect.py.
SegmentEditorEffects.AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.xyzToRas | ( | self, | |
xyz, | |||
viewWidget ) |
Definition at line 64 of file AbstractScriptedSegmentEditorEffect.py.
SegmentEditorEffects.AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect.scriptedEffect |
Definition at line 50 of file AbstractScriptedSegmentEditorEffect.py.