Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christoph Arthofer
fslpy
Commits
9f1eba08
Commit
9f1eba08
authored
Mar 31, 2021
by
Evan Edmond
Browse files
Merge branch 'patch-image' of
https://git.fmrib.ox.ac.uk/edmond/fslpy
into patch-image
parents
6b5ab232
5ecb1c3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/data/image.py
View file @
9f1eba08
...
...
@@ -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
el
if
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
):
el
if
isinstance
(
image
,
Path
):
name
=
image
.
name
# Or the image was created from a numpy array
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment