Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
e6f95d46
Commit
e6f95d46
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: don't use get_data
parent
d8231fe2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/wrappers/wrapperutils.py
+4
-3
4 additions, 3 deletions
fsl/wrappers/wrapperutils.py
with
4 additions
and
3 deletions
fsl/wrappers/wrapperutils.py
+
4
−
3
View file @
e6f95d46
...
@@ -952,16 +952,17 @@ def fileOrImage(*args, **kwargs):
...
@@ -952,16 +952,17 @@ def fileOrImage(*args, **kwargs):
# create an independent in-memory
# create an independent in-memory
# copy of the image file
# 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,
# if any arguments were fsl images,
# that takes precedence.
# that takes precedence.
if
fslimage
.
Image
in
intypes
:
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,
# but if all inputs were file names,
# nibabel takes precedence
# nibabel takes precedence
elif
nib
.
nifti1
.
Nifti1Image
in
intypes
or
len
(
intypes
)
==
0
:
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
# this function should not be called
# under any other circumstances
# under any other circumstances
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment