Skip to content
Snippets Groups Projects
Commit f5f631e2 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

BF: only load bids metadata if image is in bids dir, *and* has a bids filename.

parent e26fd9a1
No related branches found
No related tags found
No related merge requests found
...@@ -1540,7 +1540,8 @@ def loadMetadata(image): ...@@ -1540,7 +1540,8 @@ def loadMetadata(image):
basename = op.basename(removeExt(filename)) basename = op.basename(removeExt(filename))
dirname = op.dirname(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) return fslbids.loadMetadata(image.dataSource)
jsonfile = op.join(dirname, '{}.json'.format(basename)) jsonfile = op.join(dirname, '{}.json'.format(basename))
......
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