Skip to content
Snippets Groups Projects
Commit fed82173 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Fix bug correct_and_project() when model is None

parent 159738ea
No related branches found
No related tags found
No related merge requests found
...@@ -89,8 +89,10 @@ def correct_and_project(filename, path, model, proj, fmt): ...@@ -89,8 +89,10 @@ def correct_and_project(filename, path, model, proj, fmt):
imps = bioformats.import_image(filename, split_c=True) imps = bioformats.import_image(filename, split_c=True)
if model is not None: if model is not None:
log.debug("Applying shading correction on [%s]...", filename) log.debug("Applying shading correction on [%s]...", filename)
imps = apply_model(imps, model) imp = apply_model(imps, model)
bioformats.export_using_orig_name(imps, path, filename, "", fmt, True) bioformats.export_using_orig_name(imp, path, filename, "", fmt, True)
# imps needs to be updated with the new (=merged) stack:
imps = [imp]
if proj == 'None': if proj == 'None':
projs = [] projs = []
...@@ -98,10 +100,10 @@ def correct_and_project(filename, path, model, proj, fmt): ...@@ -98,10 +100,10 @@ def correct_and_project(filename, path, model, proj, fmt):
projs = ['Average', 'Maximum'] projs = ['Average', 'Maximum']
else: else:
projs = [proj] projs = [proj]
projections.create_and_save(imps, projs, path, filename, fmt) for imp in imps:
projections.create_and_save(imp, projs, path, filename, fmt)
imp.close()
# imps.show()
imps.close()
log.debug("Done processing [%s].", os.path.basename(filename)) log.debug("Done processing [%s].", os.path.basename(filename))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment