Skip to content
Snippets Groups Projects
Commit 7a9a641e authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Use image number instead of image index in the progress dialog.

parent 147414f8
No related branches found
No related tags found
1 merge request!2Next development step
......@@ -680,10 +680,6 @@ class MainController:
for proc in self.widget.proc_view.get_enabled_procs():
filter_dict[proc] = self.widget.filter_widget.methods[proc].get_parameters()
progress_dialog = self.get_progress_dialog("Process multiple images.",
"Abort processing",
parameters['stop'])
process_args = [filter_dict, only_preprocess, only_peaks,
peak_dict, fit_params, peak_list]
log.debug(f"Start batch processor with parameters: {process_args}")
......@@ -699,12 +695,15 @@ class MainController:
ts = time()
time_info = ""
progress_dialog = self.get_progress_dialog("Process multiple images.",
"Abort processing",
counter)
for i in range(counter):
progress_dialog.setValue(i_img)
progress_dialog.setValue(i)
if i > 1 and (i % 5) == 0:
time_info = f"{(time() - ts)/i:0.2f} sec/image"
progress_dialog.setLabelText(f"Processing image {i}. {time_info}")
progress_dialog.setLabelText(f"Processing image {i_img} ({i}/{counter}). {time_info}")
i_img, out = processor.out_queue.get(timeout=20)
if progress_dialog.wasCanceled():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment