diff --git a/scripts/GUI.py b/scripts/GUI.py index 458da5c4474ca47fdf16fc903fd94d540eabd053..a78a2c94770a846be52396aac62cb43d23c59966 100644 --- a/scripts/GUI.py +++ b/scripts/GUI.py @@ -41,7 +41,13 @@ def select_Image(event): label.configure(text="Image is selected. Press run to create scene.") def depthmap_creation(): - print("Upload Depth Map: ", check.get()) + print("Manually upload depth map: ", uploadDepthCheck.get()) + + if uploadDepthCheck == 0: + check.set(1) + else: + check.set(0) #temporary. TODO implement Mona's monodepth upload + def stanfordRoom_selection(): if checkStanford.get() == 1: @@ -87,6 +93,11 @@ def runProcess(): print(f"Attempting to run: {combined_bat}") print(f"With arguments: {file_path}, {str(check.get())}, {include_top_option}, {shift_image_option}") + if check == 1: + print("Autodepth map") + else: + print("Manual depth map") + p = subprocess.Popen( [combined_bat, file_path, str(check.get()), include_top_option, shift_image_option], stdout=sys.stdout) @@ -125,7 +136,13 @@ def threading(): window = tk.Tk() window.title("Immersive VR scene creator") + check = tk.IntVar() +check.set(1) #automatically generate depth map as default +# changed check vaiable: 0 = automatically upload depth map, 1 = manually upload depth map +# this behaviour is oppositte to previous check variable +uploadDepthCheck = tk.IntVar() + checkStanford = tk.IntVar() include_top = tk.IntVar() shift_image = tk.IntVar() @@ -152,7 +169,7 @@ run_button = tk.Button( bg="green", fg="white", ) -depth_check = tk.Checkbutton(window, text='Upload a depth map(360 MonoDepth)',variable=check, onvalue=1, offvalue=0, command=depthmap_creation) +depth_check = tk.Checkbutton(window, text='Upload a depth map(360 MonoDepth)',variable=uploadDepthCheck, onvalue=1, offvalue=0, command=depthmap_creation) stanford_check = tk.Checkbutton(window, text='Run for stanford2D3D dataset',variable=checkStanford, onvalue=1, offvalue=0,command=stanfordRoom_selection ) include_top_check = tk.Checkbutton(window, text='Include Top in Mesh', variable=include_top, onvalue=1, offvalue=0) shift_image_check = tk.Checkbutton(window, text='Shift input image', variable=shift_image, onvalue=1, offvalue=0, command=shift_image_selection)