Skip to content
Snippets Groups Projects
Commit 9f1eba08 authored by Evan Edmond's avatar Evan Edmond
Browse files

Merge branch 'patch-image' of https://git.fmrib.ox.ac.uk/edmond/fslpy into patch-image

parents 6b5ab232 5ecb1c3c
No related branches found
No related tags found
No related merge requests found
......@@ -1091,8 +1091,8 @@ class Image(Nifti):
nibImage = nib.load(image, **kwargs)
dataSource = image
saved = True
# The image parameter may be the name of an image file
if isinstance(image, Path):
# The image parameter may be a Path object pointing to an image file
elif isinstance(image, Path):
nibImage = nib.load(image, **kwargs)
dataSource = str(image)
saved = True
......@@ -1148,7 +1148,7 @@ class Image(Nifti):
# from disk, use the file name.
if isinstance(image, six.string_types):
name = removeExt(op.basename(image))
if isinstance(image, Path):
elif isinstance(image, Path):
name = image.name
# Or the image was created from a numpy array
......
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