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
e6f95d46
Commit
e6f95d46
authored
Dec 12, 2019
by
Paul McCarthy
🚵
Browse files
MNT: don't use get_data
parent
d8231fe2
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/wrappers/wrapperutils.py
View file @
e6f95d46
...
...
@@ -952,16 +952,17 @@ def fileOrImage(*args, **kwargs):
# create an independent in-memory
# copy of the image file
img
=
nib
.
load
(
path
,
mmap
=
False
)
img
=
nib
.
load
(
path
,
mmap
=
False
)
data
=
np
.
asanyarray
(
img
.
dataobj
)
# if any arguments were fsl images,
# that takes precedence.
if
fslimage
.
Image
in
intypes
:
return
fslimage
.
Image
(
img
.
get_
data
()
,
header
=
img
.
header
)
return
fslimage
.
Image
(
data
,
header
=
img
.
header
)
# but if all inputs were file names,
# nibabel takes precedence
elif
nib
.
nifti1
.
Nifti1Image
in
intypes
or
len
(
intypes
)
==
0
:
return
nib
.
nifti1
.
Nifti1Image
(
img
.
get_
data
()
,
None
,
img
.
header
)
return
nib
.
nifti1
.
Nifti1Image
(
data
,
None
,
img
.
header
)
# this function should not be called
# under any other circumstances
...
...
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