Commit ba138ce1 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 a06cd037
......@@ -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