Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
__init__.py
Go to the documentation of this file.
1from .AbstractScriptedSegmentEditorEffect import *
2from .AbstractScriptedSegmentEditorLabelEffect import *
3from .AbstractScriptedSegmentEditorPaintEffect import *
4from .AbstractScriptedSegmentEditorAutoCompleteEffect import *
5
6from .SegmentEditorDrawEffect import *
7from .SegmentEditorFillBetweenSlicesEffect import *
8from .SegmentEditorGrowFromSeedsEffect import *
9from .SegmentEditorHollowEffect import *
10from .SegmentEditorIslandsEffect import *
11from .SegmentEditorLevelTracingEffect import *
12from .SegmentEditorLogicalEffect import *
13from .SegmentEditorMarginEffect import *
14from .SegmentEditorMaskVolumeEffect import *
15from .SegmentEditorSmoothingEffect import *
16from .SegmentEditorThresholdEffect import *
17
18from SegmentEditorEffects import *
19
20import logging
21import importlib
22import traceback
23
24editorEffectNames = [
25 "SegmentEditorDrawEffect",
26 "SegmentEditorFillBetweenSlicesEffect",
27 "SegmentEditorGrowFromSeedsEffect",
28 "SegmentEditorHollowEffect",
29 "SegmentEditorIslandsEffect",
30 "SegmentEditorLevelTracingEffect",
31 "SegmentEditorLogicalEffect",
32 "SegmentEditorMarginEffect",
33 "SegmentEditorMaskVolumeEffect",
34 "SegmentEditorSmoothingEffect",
35 "SegmentEditorThresholdEffect",
36]
37
38
40 import SegmentEditorEffects
41 import traceback
42 import logging
43
44 effectsPath = SegmentEditorEffects.__path__[0].replace("\\", "/")
45
46 import qSlicerSegmentationsEditorEffectsPythonQt as qSlicerSegmentationsEditorEffects
47
48 for editorEffectName in SegmentEditorEffects.editorEffectNames:
49 try:
50 instance = qSlicerSegmentationsEditorEffects.qSlicerSegmentEditorScriptedEffect(None)
51 effectFilename = effectsPath + "/" + editorEffectName + ".py"
52 instance.setPythonSource(effectFilename)
53 instance.self().register()
54 except Exception as e:
55 logging.error("Error instantiating " + editorEffectName + ":\n" + traceback.format_exc())