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
SubjectHierarchy
Widgets
Python
SubjectHierarchyPlugins
AbstractScriptedSubjectHierarchyPlugin.py
Go to the documentation of this file.
1
import
logging
2
3
import
slicer
4
5
6
#
7
# Abstract class of python scripted subject hierarchy plugins
8
#
9
10
11
class
AbstractScriptedSubjectHierarchyPlugin
:
12
"""Abstract scripted subject hierarchy plugin for python scripted plugins
13
14
USAGE: Instantiate scripted subject hierarchy plugin adaptor class from
15
module (e.g. from setup function), and set python source:
16
17
from SubjectHierarchyPlugins import *
18
...
19
class [Module]Widget(ScriptedLoadableModuleWidget):
20
...
21
def setup(self):
22
...
23
scriptedPlugin = slicer.qSlicerSubjectHierarchyScriptedPlugin(None)
24
scriptedPlugin.setPythonSource(VolumeClipSubjectHierarchyPlugin.filePath)
25
...
26
27
Example can be found here:
28
https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#subject-hierarchy-plugin-offering-view-context-menu-action
29
"""
30
31
def
__init__
(self, scriptedPlugin):
32
self.
scriptedPlugin
= scriptedPlugin
33
34
# Register plugin on initialization
35
self.
register
()
36
31
def
__init__
(self, scriptedPlugin):
…
37
def
register
(self):
38
pluginHandlerSingleton = slicer.qSlicerSubjectHierarchyPluginHandler.instance()
39
pluginHandlerSingleton.registerPlugin(self.
scriptedPlugin
)
40
logging.debug(
"Scripted subject hierarchy plugin registered: "
+ self.
scriptedPlugin
.name)
37
def
register
(self):
…
11
class
AbstractScriptedSubjectHierarchyPlugin
:
…
SubjectHierarchyPlugins.AbstractScriptedSubjectHierarchyPlugin.AbstractScriptedSubjectHierarchyPlugin
Definition
AbstractScriptedSubjectHierarchyPlugin.py:11
SubjectHierarchyPlugins.AbstractScriptedSubjectHierarchyPlugin.AbstractScriptedSubjectHierarchyPlugin.__init__
__init__(self, scriptedPlugin)
Definition
AbstractScriptedSubjectHierarchyPlugin.py:31
SubjectHierarchyPlugins.AbstractScriptedSubjectHierarchyPlugin.AbstractScriptedSubjectHierarchyPlugin.register
register(self)
Definition
AbstractScriptedSubjectHierarchyPlugin.py:37
SubjectHierarchyPlugins.AbstractScriptedSubjectHierarchyPlugin.AbstractScriptedSubjectHierarchyPlugin.scriptedPlugin
scriptedPlugin
Definition
AbstractScriptedSubjectHierarchyPlugin.py:32
Generated on Sat Apr 12 2025 02:08:30 for Slicer by
1.13.0