def pathOpen(option=0): if option is 0: userpath.set(tkFileDialog.askdirectory(parent=root)) cfg.userPath = userpath.get() elif option is 1: gtpath.set(tkFileDialog.askdirectory(parent=root)) if os.path.isfile(os.path.join(gtpath.get(), "data.mat")): cfg.gtPath = gtpath.get() cfg.loadGT() tempo.set(cfg.tempo) duration.set(cfg.duration) else: tkMessageBox.showinfo("ERROR", "Missing data file. Please choose a different folder.")
def option1_start(): if os.path.isfile(os.path.join(cfg.userPath, cfg.userFolder, "data.mat")): cfg.loadUserData() else: tkMessageBox.showinfo("ERROR", "No data.mat file found in user folder") return if os.path.isfile(os.path.join(cfg.gtPath, "data.mat")) and not skipGT.get(): cfg.loadGT() else: tkMessageBox.showinfo("ERROR", "No data.mat file found in GT folder") return # check if there is data first, so we dont have to run video processing again perf.wholeShebang(alone=skipGT.get()) showResults()