Skip to content

Commit

Permalink
Add check for existence of conformed_name directory
Browse files Browse the repository at this point in the history
  • Loading branch information
af-a committed Mar 14, 2022
1 parent 2715cad commit 9ec50d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FastSurferCNN/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,11 @@ def fastsurfercnn(img_filename, save_as, use_cuda, gpu_small, logger, args):
if not op.exists(op.join(sub_dir, 'orig')):
makedirs(op.join(sub_dir, 'orig'))

# Check if conformed image directory exists and create it otherwise
sub_dir, out = op.split(args.conformed_name)
if not op.exists(sub_dir):
makedirs(sub_dir)

# Save input image to standard location (will change once save_image functionality is integrated)
input_image = nib.load(options.iname)
if not options.iname.endswith('mgz'):
Expand Down

0 comments on commit 9ec50d8

Please sign in to comment.