|
|
@ -27,6 +27,7 @@ from .workflows import ( |
|
|
|
|
|
|
|
|
|
|
|
PARAMETERS_FILE = "mia-gui-parameters.json" |
|
|
|
PARAMETERS_FILE = "mia-gui-parameters.json" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MtorImageAnalysis(QWidget): |
|
|
|
class MtorImageAnalysis(QWidget): |
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
super().__init__() |
|
|
|
super().__init__() |
|
|
@ -89,14 +90,14 @@ class MtorImageAnalysis(QWidget): |
|
|
|
self.btn_exit.clicked.connect(QApplication.instance().quit) |
|
|
|
self.btn_exit.clicked.connect(QApplication.instance().quit) |
|
|
|
|
|
|
|
|
|
|
|
self.fields_map = { |
|
|
|
self.fields_map = { |
|
|
|
'folder': (self.dir_selected, str), |
|
|
|
"folder": (self.dir_selected, str), |
|
|
|
'top': (self.roi_top_input, int), |
|
|
|
"top": (self.roi_top_input, int), |
|
|
|
'right': (self.roi_right_input, int), |
|
|
|
"right": (self.roi_right_input, int), |
|
|
|
'bottom': (self.roi_bottom_input, int), |
|
|
|
"bottom": (self.roi_bottom_input, int), |
|
|
|
'left': (self.roi_left_input, int), |
|
|
|
"left": (self.roi_left_input, int), |
|
|
|
'cut_pad_x': (self.pad_x_input, int), |
|
|
|
"cut_pad_x": (self.pad_x_input, int), |
|
|
|
'cut_pad_y': (self.pad_y_input, int), |
|
|
|
"cut_pad_y": (self.pad_y_input, int), |
|
|
|
'boost': (self.cc_boost_input, int), |
|
|
|
"boost": (self.cc_boost_input, int), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# Layout |
|
|
|
# Layout |
|
|
@ -203,7 +204,9 @@ class MtorImageAnalysis(QWidget): |
|
|
|
parameter_path = Path(parameters["folder"]) / PARAMETERS_FILE |
|
|
|
parameter_path = Path(parameters["folder"]) / PARAMETERS_FILE |
|
|
|
try: |
|
|
|
try: |
|
|
|
with parameter_path.open("w") as fh: |
|
|
|
with parameter_path.open("w") as fh: |
|
|
|
tmp = {k: v for k, v in parameters.items() if k != "folder"} |
|
|
|
tmp = { |
|
|
|
|
|
|
|
k: v for k, v in parameters.items() if k != "folder" |
|
|
|
|
|
|
|
} |
|
|
|
print(tmp) |
|
|
|
print(tmp) |
|
|
|
json.dump(tmp, fh) |
|
|
|
json.dump(tmp, fh) |
|
|
|
except Exception: |
|
|
|
except Exception: |
|
|
|