00001 from ost import gui
00002 import sip
00003 from ost.img import *
00004 import ost.img.alg as alg
00005
00006 from PyQt4 import QtGui, QtCore
00007 from ost.gui.init_menubar import _InitMenuBar
00008
00009
00010 def Viewer(image,title=""):
00011 app=gui.GostyApp.Instance()
00012 viewer=app.CreateDataViewer(image)
00013 app.perspective.main_area.AddWidget(title, viewer)
00014 return viewer
00015
00016 def _InitPanels(app, panels):
00017 panels.AddWidgetToPool('ost.gui.PythonShell', 1)
00018 if not panels.Restore("img/ui/perspective/panels"):
00019 panels.AddWidget(gui.PanelPosition.BOTTOM_PANEL, app.py_shell)
00020
00021 def _InitIPLTNextGen():
00022 app=gui.GostyApp.Instance()
00023 app.SetAppTitle("IPLT - Iplt Next Generation")
00024 main_area=app.perspective.main_area
00025 _InitPanels(app, app.perspective.panels)
00026 _InitMenuBar(app.perspective.GetMenuBar())
00027 app.perspective.Restore()
00028
00029 _InitIPLTNextGen()