Commit cf4f1fd1 authored by Sean Fitzgibbon's avatar Sean Fitzgibbon
Browse files

Fixed bug where output directory was not created

parent 08b157e8
......@@ -50,6 +50,10 @@ def register_chart_to_slide(chart, slide, slide_res, out, config=None):
global OUTDIR
OUTDIR = out
# create output dir
if not op.exists(out):
os.makedirs(out)
# load chart
contour, cells = neurolucida.read(chart)
......@@ -82,9 +86,6 @@ def register_chart_to_slide(chart, slide, slide_res, out, config=None):
f'Rotation:\t{opt.rotation}\nTranslation:\t{opt.translation}\nScale:\t\t{list(opt.scale)}\nShear:\t\t{opt.shear}')
# save opt transform
if not op.exists(out):
os.makedirs(out)
np.savetxt(f'{out}/chart-to-image.xfm', opt.params)
# apply opt-xfm to contours and cells and save
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment