From 1d541fe91278dcff5b3aa57d94812b1a3aefca20 Mon Sep 17 00:00:00 2001 From: arnaudbore Date: Wed, 1 Jun 2022 15:48:10 -0400 Subject: [PATCH] fix if dot in dcm files names --- dcm2bids/dcm2bids.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dcm2bids/dcm2bids.py b/dcm2bids/dcm2bids.py index 2d828b87..a4e5ab6f 100644 --- a/dcm2bids/dcm2bids.py +++ b/dcm2bids/dcm2bids.py @@ -139,6 +139,9 @@ def move(self, acquisition, intendedForList): for srcFile in glob(acquisition.srcRoot + ".*"): ext = Path(srcFile).suffixes + ext = [curr_ext for curr_ext in ext if curr_ext in ['.nii','.gz', + '.json']] + dstFile = (self.bidsDir / acquisition.dstRoot).with_suffix("".join(ext)) dstFile.parent.mkdir(parents = True, exist_ok = True)