def para_changed(self, key):
     ParaDialog.para_changed(self, key)
     if key == 'f':
         frameworks = dc4b.listFrameworks()
         framework = self.para[key]
         models = dc4b.listModels(framework)
         self.para = {'f': framework, 'm': models[0]}
         self.view = [('lab', 'lab','Select the framework and the model'),
                      (list, 'f', frameworks, str, 'Framework',  ''),
                      (list,'m', models, str, 'Model',  '')
                      ]
         for child in self.GetChildren():
             child.Destroy()
         self.tus = []
         self.initView()
         self.Layout()
    def para_changed(self, key):
        ParaDialog.para_changed(self, key)
        if key == 'f':
            subprocess.check_output(
                [self.python, self.pathAPI + 'listFrameworks.py'])
            data = json.load(open('data.json'))
            frameworks = data['frameworks']
            framework = self.para[key]
            subprocess.check_output(
                [self.python, self.pathAPI + 'listModels.py', '-f', framework])

            data = json.load(open('data.json'))
            models = data['models']
            self.para = {'f': framework, 'm': models[0]}
            self.view = [('lab', 'Select the framework and the model'),
                         (list, frameworks, str, 'Framework', 'f', ''),
                         (list, models, str, 'Model', 'm', '')]
            for child in self.GetChildren():
                child.Destroy()
            self.tus = []
            self.initView()
            self.Layout()
예제 #3
0
 def init_view(self, items, para, hist, lim):
     self.histcvs = HistCanvas(self)
     self.histcvs.set_hist(hist)
     self.lim = lim
     self.add_ctrl('hist', self.histcvs)
     ParaDialog.init_view(self, items, para, True)
예제 #4
0
 def __init__(self, parent, title, lim):
     ParaDialog.__init__(self, parent, title)
     self.lim = lim
예제 #5
0
 def init_view(self, items, para, hist, arange):
     self.range = arange
     self.histcvs = HistCanvas(self)
     self.histcvs.set_hist(hist)
     self.add_ctrl('hist', self.histcvs)
     ParaDialog.init_view(self, items, para, True)
예제 #6
0
파일: curve_plg.py 프로젝트: zhuzhs/imagepy
 def init_view(self, items, para, hist):
     self.curvep = CurvePanel(self)
     self.curvep.set_hist(hist)
     self.add_ctrl('curve', self.curvep)
     ParaDialog.init_view(self, items, para, True)
 def initView(self):
     ParaDialog.init_view(self, self.view, self.para)
 def __init__(self, parent, title,view, para):
     ParaDialog.__init__(self, parent, title)
     self.para = para
     self.view = view
 def __init__(self, parent, title, pathApi, python, view, para):
     ParaDialog.__init__(self, parent, title)
     self.para = para
     self.view = view
     self.pathAPI = pathApi
     self.python = python