Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 02f83aa3 authored by MOEBEL Emmanuel's avatar MOEBEL Emmanuel
Browse files

gui_target: corrected bug "AttributeError: 'str' object has no attribute...

gui_target: corrected bug "AttributeError: 'str' object has no attribute 'shape'" that happened with shape strategy
parent 1fa0e96f
No related branches found
No related tags found
No related merge requests found
...@@ -108,9 +108,13 @@ class TargetGenerationWindow(QtWidgets.QMainWindow, Ui_MainWindow): ...@@ -108,9 +108,13 @@ class TargetGenerationWindow(QtWidgets.QMainWindow, Ui_MainWindow):
vol_initial = np.zeros((dim_z, dim_y, dim_x)) vol_initial = np.zeros((dim_z, dim_y, dim_x))
if strategy == 'Shapes': if strategy == 'Shapes':
target = tbuild.generate_with_shapes(objl, vol_initial, param_list) mask_list = []
for fname in param_list: # load masks
mask = cm.read_array(fname)
mask_list.append(mask)
target = tbuild.generate_with_shapes(objl, vol_initial, mask_list)
else: else:
param_list = list(map(int, param_list)) # convert the radius list from str to int param_list = list(map(int, param_list)) # convert the radius list from str to int
target = tbuild.generate_with_spheres(objl, vol_initial, param_list) target = tbuild.generate_with_spheres(objl, vol_initial, param_list)
tbuild.display('Saving target ...') tbuild.display('Saving target ...')
......
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