a = np.zeros(500 * 500).reshape(500, 500).astype(np.uint8) ii = np.random.randint(0, 500, 1) jj = np.random.randint(0, 500, 1) a[ii, jj] = 1 a = vigra.filters.discDilation(a, radius=20) array[:] = a.reshape(shape).view(np.ndarray) * 255 op.Input.setDirty() do() cron.timeout.connect(do) ds = createDataSource(op.Output) layer = ColortableLayer(ds, jet()) mainwin = Viewer() mainwin.layerstack.append(layer) mainwin.dataShape = (1, h, w, 1, 1) print(mainwin.centralWidget()) BoxContr = BoxController(mainwin.editor, op.Output, boxListModel) BoxInt = BoxInterpreter(mainwin.editor.navInterpret, mainwin.editor.posModel, BoxContr, mainwin.centralWidget()) mainwin.editor.setNavigationInterpreter(BoxInt) # boxListModel.boxRemoved.connect(BoxContr.deleteItem) LV.show() mainwin.show() app.exec_()
do() cron.connect(cron, SIGNAL('timeout()'), do) ds = LazyflowSource( op.Output ) layer = ColortableLayer(ds,jet()) mainwin=Viewer() mainwin.layerstack.append(layer) mainwin.dataShape=(1,h,w,1,1) print mainwin.centralWidget() BoxContr=BoxController(mainwin.editor,op.Output,boxListModel) BoxInt=BoxInterpreter(mainwin.editor.navInterpret,mainwin.editor.posModel,BoxContr,mainwin.centralWidget()) mainwin.editor.setNavigationInterpreter(BoxInt) # boxListModel.boxRemoved.connect(BoxContr.deleteItem) LV.show() mainwin.show() app.exec_()