Skip to content

Commit 217bdfb

Browse files
authored
Merge pull request #169 from UNFmontreal/BF_when_name_w_dots
Fix if dot in dcm files names
2 parents 58b0f6d + 1d541fe commit 217bdfb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dcm2bids/dcm2bids.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ def move(self, acquisition, intendedForList):
139139
for srcFile in glob(acquisition.srcRoot + ".*"):
140140

141141
ext = Path(srcFile).suffixes
142+
ext = [curr_ext for curr_ext in ext if curr_ext in ['.nii','.gz',
143+
'.json']]
144+
142145
dstFile = (self.bidsDir / acquisition.dstRoot).with_suffix("".join(ext))
143146

144147
dstFile.parent.mkdir(parents = True, exist_ok = True)

0 commit comments

Comments
 (0)