def viewer(self):
#Based on PythonQwt https://pypi.python.org/pypi/guiqwt
from guiqwt.plot import ImageDialog
from guiqwt.builder import make
def create_window():
win = ImageDialog(edit=True, toolbar=True, wintitle=self.name,
options=dict(show_contrast=True,show_xsection=True, show_ysection=True, xlabel='stage res.= %s mm x' %(self.resolution), xunit='mm', ylabel="y",yunit='mm',zlabel='Distance',zunit='mm',
show_itemlist=True))
win.resize(800, 600)
return win
import guidata
_app = guidata.qapplication()
# --
win = create_window()
image2 = make.image(a.array, title="Data",xdata=[0,self.array.shape[1]*self.resolution],ydata=[0,self.array.shape[0]*self.resolution],interpolation="nearest")
plot = win.get_plot()
plot.add_item(image2, z=1)
win.exec_()