Slicer
5.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Main Page
Modules
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 Functions
a
e
f
i
m
o
p
r
s
w
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
v
Functions
+
Variables
a
c
d
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
Modules
Loadable
SubjectHierarchy
Widgets
Python
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
class
AbstractScriptedSubjectHierarchyPlugin
:
11
""" Abstract scripted subject hierarchy plugin for python scripted plugins
12
13
USAGE: Instantiate scripted subject hierarchy plugin adaptor class from
14
module (e.g. from setup function), and set python source:
15
16
from SubjectHierarchyPlugins import *
17
...
18
class [Module]Widget(ScriptedLoadableModuleWidget):
19
...
20
def setup(self):
21
...
22
scriptedPlugin = slicer.qSlicerSubjectHierarchyScriptedPlugin(None)
23
scriptedPlugin.setPythonSource(VolumeClipSubjectHierarchyPlugin.filePath)
24
...
25
26
Example can be found here: https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#subject-hierarchy-plugin-offering-view-context-menu-action
27
"""
28
29
def
__init__
(self, scriptedPlugin):
30
self.
scriptedPlugin
= scriptedPlugin
31
32
# Register plugin on initialization
33
self.
register
()
34
35
def
register
(self):
36
pluginHandlerSingleton = slicer.qSlicerSubjectHierarchyPluginHandler.instance()
37
pluginHandlerSingleton.registerPlugin(self.
scriptedPlugin
)
38
logging.debug(
'Scripted subject hierarchy plugin registered: '
+ self.
scriptedPlugin
.name)
Python.AbstractScriptedSubjectHierarchyPlugin.AbstractScriptedSubjectHierarchyPlugin
Definition:
AbstractScriptedSubjectHierarchyPlugin.py:10
Python.AbstractScriptedSubjectHierarchyPlugin.AbstractScriptedSubjectHierarchyPlugin.__init__
def __init__(self, scriptedPlugin)
Definition:
AbstractScriptedSubjectHierarchyPlugin.py:29
Python.AbstractScriptedSubjectHierarchyPlugin.AbstractScriptedSubjectHierarchyPlugin.scriptedPlugin
scriptedPlugin
Definition:
AbstractScriptedSubjectHierarchyPlugin.py:30
Python.AbstractScriptedSubjectHierarchyPlugin.AbstractScriptedSubjectHierarchyPlugin.register
def register(self)
Definition:
AbstractScriptedSubjectHierarchyPlugin.py:35
Generated on Thu Nov 24 2022 07:48:28 for Slicer by
1.8.14