Commit f5f631e2 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

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

parent e26fd9a1
......@@ -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))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment