Skip to content

Commit 685a1fb

Browse files
authored
Merge pull request #3610 from mauriliogenovese/origin/fix/dcm2niix_duplicate_output
[FIX] Deduplicate dcm2niix output
2 parents edf7a4a + 45e8076 commit 685a1fb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nipype/interfaces/dcm2nii.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,11 @@ def _parse_files(self, filenames):
486486
mvecs.append(fl)
487487
elif fl.endswith(".json") or fl.endswith(".txt"):
488488
bids.append(fl)
489+
490+
# in siemens mosaic conversion nipype misread dcm2niix output and generate a duplicate list of results
491+
# next line remove duplicates from output files array
492+
outfiles = list(dict.fromkeys(outfiles))
493+
489494
self.output_files = outfiles
490495
self.bvecs = bvecs
491496
self.mvecs = mvecs

0 commit comments

Comments
 (0)