Slicer
5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Toggle main menu visibility
Main Page
Related Pages
Classes
Class Index
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
Enumerations
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Related Symbols
a
e
f
i
m
o
p
r
s
w
Namespaces
Namespace List
Namespace Members
All
_
a
c
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
v
Functions
Variables
a
c
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
v
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
c
e
i
l
n
p
q
r
s
t
v
Variables
Typedefs
a
d
g
i
l
m
n
p
q
r
s
t
v
Enumerations
Enumerator
Macros
b
c
d
e
f
g
i
m
o
p
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
Modules
Loadable
Segmentations
EditorEffects
Python
SegmentEditorEffects
AbstractScriptedSegmentEditorPaintEffect.py
Go to the documentation of this file.
1
from
.AbstractScriptedSegmentEditorEffect
import
*
2
3
__all__ = [
"AbstractScriptedSegmentEditorPaintEffect"
]
4
5
6
class
AbstractScriptedSegmentEditorPaintEffect
(
AbstractScriptedSegmentEditorEffect
):
7
"""Abstract scripted segment editor Paint effects for effects implemented in python
8
9
Paint effects are a subtype of general effects that operate on a subregion of the segment
10
defined by brush strokes.
11
12
An example of paint effect is ``SmoothingEffect``.
13
14
To use the effect, follow these steps:
15
16
1. Instantiation and registration
17
18
Instantiate segment editor paint effect adaptor class from
19
module (e.g. from setup function), and set python source::
20
21
import qSlicerSegmentationsEditorEffectsPythonQt as effects
22
scriptedEffect = effects.qSlicerSegmentEditorScriptedPaintEffect(None)
23
scriptedEffect.setPythonSource(MyPaintEffect.filePath)
24
25
Registration is automatic
26
27
2. Call host C++ implementation using::
28
29
self.scriptedEffect.functionName()
30
31
2.a. Most frequently used methods are:
32
33
* Parameter get/set: ``parameter``, ``integerParameter``, ``doubleParameter``, ``setParameter``
34
* Add options widget: ``addOptionsWidget``
35
* Coordinate transforms: ``rasToXy``, ``xyzToRas``, ``xyToRas``, ``xyzToIjk``, ``xyToIjk``
36
* Convenience getters: ``renderWindow``, ``renderer``, ``viewNode``
37
* Geometry getters: ``imageToWorldMatrix`` (for volume node and for oriented image data with segmentation)
38
39
2.b. Always call API functions (the ones that are defined in the adaptor \
40
class ``qSlicerSegmentEditorScriptedPaintEffect``) using the adaptor accessor ``self.scriptedEffect``.
41
42
For example::
43
44
self.scriptedEffect.updateGUIFromMRML()
45
"""
46
47
def
__init__
(self, scriptedEffect):
48
AbstractScriptedSegmentEditorEffect.__init__(self, scriptedEffect)
47
def
__init__
(self, scriptedEffect):
…
6
class
AbstractScriptedSegmentEditorPaintEffect
(
AbstractScriptedSegmentEditorEffect
):
…
SegmentEditorEffects.AbstractScriptedSegmentEditorEffect.AbstractScriptedSegmentEditorEffect
Definition
AbstractScriptedSegmentEditorEffect.py:6
SegmentEditorEffects.AbstractScriptedSegmentEditorPaintEffect.AbstractScriptedSegmentEditorPaintEffect
Definition
AbstractScriptedSegmentEditorPaintEffect.py:6
SegmentEditorEffects.AbstractScriptedSegmentEditorPaintEffect.AbstractScriptedSegmentEditorPaintEffect.__init__
__init__(self, scriptedEffect)
Definition
AbstractScriptedSegmentEditorPaintEffect.py:47
Generated on Sat Apr 12 2025 02:08:30 for Slicer by
1.13.0