We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0288986 commit 16f618dCopy full SHA for 16f618d
gui.py
@@ -53,7 +53,15 @@ def show_mni_slice(win, show_file=None):
53
"""setup example slice image. implemented but unused 20210415"""
54
if show_file is None:
55
show_file = os.path.dirname(os.path.abspath(__file__)) + '/slice_atlas.png'
56
- exslice_img = tkinter.PhotoImage(file=show_file)
+ try:
57
+ exslice_img = tkinter.PhotoImage(file=show_file)
58
+
59
+ except tkinter.TclError:
60
+ # pip install pillow
61
+ import PIL.Image
62
+ import PIL.ImageTk
63
+ exslice_img = PIL.ImageTk.PhotoImage(PIL.Image.open(show_file))
64
65
mni_img = tkinter.Label(win)
66
mni_img.image = exslice_img
67
mni_img.configure(image=exslice_img)
0 commit comments