Skip to content

Commit

Permalink
Start work on GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharon Christine Yates committed Aug 23, 2024
1 parent a94cf7d commit acab94c
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
Binary file added Logo_PyN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions PyNutilGUI.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import tkinter

from tkinter import *
from tkinter import ttk

from tkinter import *
from tkinter import ttk

#Basic GUI example
"""
root = Tk()
ttk.Button(root, text="Hello World").grid()
root.mainloop()
"""

root = Tk()
root.title("PyNutil")
#photo = tkinker.PhotoImage(file = 'Logo_PyN.png')
#root.wm_iconphoto(False, photo)

atlas = ["Reference Atlas", "Allen CCFv3", "WHS v3", "WHS v4"]
selected_atlas = StringVar(value=atlas[0])

directory = ["select","select1", "select2"]
selected_directory = StringVar(value=atlas[0])

colour = ["colour","black","red","blue","green"]
selected_colour = StringVar(value=colour[0])

#Creating a content frame"
mainframe = ttk.Frame(root, padding="12 12 12 12") # left top right bottom
mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
root.columnconfigure(0, weight=1) # column to expand if there is extra space
root.rowconfigure(0, weight=1) # row to expand if there is extra space

ttk.Label(mainframe, text="Reference atlas").grid(column=1, row=1, sticky=W)
ttk.Label(mainframe, text="Registration JSON").grid(column=1, row=2, sticky=W)
ttk.Label(mainframe, text="Segmentation folder").grid(column=1, row=3, sticky=W)
ttk.Label(mainframe, text="Object colour").grid(column=1, row=4, sticky=W)
ttk.Label(mainframe, text="Output directory").grid(column=1, row=5, sticky=W)

ttk.Button(mainframe, text="Help", command="buttonpressed").grid(column=2, row=1, sticky=W)
ttk.Button(mainframe, text="Help", command="buttonpressed").grid(column=2, row=2, sticky=W)
ttk.Button(mainframe, text="Help", command="buttonpressed").grid(column=2, row=3, sticky=W)
ttk.Button(mainframe, text="Help", command="buttonpressed").grid(column=2, row=4, sticky=W)
ttk.Button(mainframe, text="Help", command="buttonpressed").grid(column=2, row=5, sticky=W)

ttk.OptionMenu(mainframe, selected_atlas, *atlas).grid(column=3, row=1, sticky=W)
ttk.OptionMenu(mainframe, selected_directory, *directory).grid(column=3, row=2, sticky=W)
ttk.OptionMenu(mainframe, selected_directory, *directory).grid(column=3, row=3, sticky=W)
ttk.OptionMenu(mainframe, selected_colour, *colour).grid(column=3, row=4, sticky=W)
ttk.OptionMenu(mainframe, selected_directory, *directory).grid(column=3, row=5, sticky=W)

ttk.Button(mainframe, text="Browse...", command="buttonpressed").grid(column=4, row=1, sticky=W)
ttk.Button(mainframe, text="Browse...", command="buttonpressed").grid(column=4, row=2, sticky=W)
ttk.Button(mainframe, text="Browse...", command="buttonpressed").grid(column=4, row=3, sticky=W)
ttk.Button(mainframe, text="Select colour", command="buttonpressed").grid(column=4, row=4, sticky=W)
ttk.Button(mainframe, text="Browse...", command="buttonpressed").grid(column=4, row=5, sticky=W)



# sunken frame around mainframe
"""
mainframe['borderwidth'] = 2
mainframe['relief'] = 'sunken'
"""

#button.configure()

root.mainloop()
2 changes: 0 additions & 2 deletions outputs/Nutil_linear_flat/Nutil_linear_flat.nut
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ output_region_id = Yes
pattern_match = _sXXX
files =
nutil_version = v1.0.0
nutil_version = v1.0.0
nutil_version = v1.0.0

0 comments on commit acab94c

Please sign in to comment.