MCPcopy
hub / github.com/yosinski/deep-visualization-toolbox / __init__

Method __init__

live_vis.py:47–80  ·  view source on GitHub ↗
(self, settings)

Source from the content-addressed store, hash-verified

45 '''Runs the demo'''
46
47 def __init__(self, settings):
48 self.settings = settings
49 self.bindings = bindings
50
51 self.app_classes = OrderedDict()
52 self.apps = OrderedDict()
53
54 for module_path, app_name in settings.installed_apps:
55 module = importlib.import_module(module_path)
56 print 'got module', module
57 app_class = getattr(module, app_name)
58 print 'got app', app_class
59 self.app_classes[app_name] = app_class
60
61 for app_name, app_class in self.app_classes.iteritems():
62 app = app_class(settings, self.bindings)
63 self.apps[app_name] = app
64 self.help_mode = False
65 self.window_name = 'Deep Visualization Toolbox'
66 self.quit = False
67 self.debug_level = 0
68
69 self.debug_pane_defaults = {
70 'face': getattr(cv2, self.settings.help_face),
71 'fsize': self.settings.help_fsize,
72 'clr': pane_debug_clr,
73 'thick': self.settings.help_thick
74 }
75 self.help_pane_defaults = {
76 'face': getattr(cv2, self.settings.help_face),
77 'fsize': self.settings.help_fsize,
78 'clr': to_255(self.settings.help_clr),
79 'thick': self.settings.help_thick
80 }
81
82
83 def init_window(self):

Callers

nothing calls this directly

Calls 1

to_255Function · 0.90

Tested by

no test coverage detected