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
ba138ce1
Commit
ba138ce1
authored
Feb 04, 2020
by
Paul McCarthy
🚵
Browse files
BF: only load bids metadata if image is in bids dir, *and* has a bids filename.
parent
a06cd037
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/data/image.py
View file @
ba138ce1
...
...
@@ -1540,7 +1540,8 @@ def loadMetadata(image):
basename
=
op
.
basename
(
removeExt
(
filename
))
dirname
=
op
.
dirname
(
filename
)
if
fslbids
.
inBIDSDir
(
image
.
dataSource
):
if
fslbids
.
isBIDSFile
(
image
.
dataSource
)
and
\
fslbids
.
inBIDSDir
(
image
.
dataSource
):
return
fslbids
.
loadMetadata
(
image
.
dataSource
)
jsonfile
=
op
.
join
(
dirname
,
'{}.json'
.
format
(
basename
))
...
...
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