def display(img,app,title="EMAN2 image"): if len(img)==1 : img=img[0] w=EMImageWidget(data=img,old=None,app=app) w.setWindowTitle(title) try: if file_exists(title): w.set_file_name(title) except: pass app.show_specific(w) try: w.optimally_resize() except: pass return w
def display(img, app, title="EMAN2 image"): if len(img) == 1: img = img[0] w = EMImageWidget(data=img, old=None, app=app) w.setWindowTitle(title) try: if file_exists(title): w.set_file_name(title) except: pass app.show_specific(w) try: w.optimally_resize() except: pass return w