Skip to content

Commit

Permalink
Adjust position of orig image saving call
Browse files Browse the repository at this point in the history
  • Loading branch information
af-a committed Mar 28, 2022
1 parent b72d877 commit 2223227
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions FastSurferCNN/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,15 +471,15 @@ def fastsurfercnn(img_filename, save_as, conformed_img_filename, use_cuda, gpu_s
if not op.exists(op.join(sub_dir, 'orig')):
makedirs(op.join(sub_dir, 'orig'))

# Save input image to standard location
input_image = nib.load(options.iname)
save_image(np.asanyarray(input_image.dataobj), input_image.affine, input_image.header, op.join(sub_dir, 'orig', '001.mgz'))

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

# Save input image to standard location
input_image = nib.load(options.iname)
save_image(np.asanyarray(input_image.dataobj), input_image.affine, input_image.header, op.join(sub_dir, 'orig', '001.mgz'))

fastsurfercnn(options.iname, options.oname, options.conformed_name, use_cuda, small_gpu, logger, options)

else:
Expand Down

0 comments on commit 2223227

Please sign in to comment.