Skip to content

Commit ef13221

Browse files
authored
Merge pull request #3554 from pvelasco/issue-3553_add_mvecs_to_Dcm2niix
Issue 3553 add mvecs to dcm2niix
2 parents 40199f1 + 42f3efd commit ef13221

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.zenodo.json

+5
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,11 @@
849849
"name": "Pannetier, Nicolas",
850850
"orcid": "0000-0002-0744-5155"
851851
},
852+
{
853+
"affiliation": "Flywheel.io, Minneapolis, MN, USA.",
854+
"name": "Velasco, Pablo",
855+
"orcid": "0000-0002-5749-6049"
856+
},
852857
{
853858
"affiliation": "Max Planck Institute for Human Cognitive and Brain Sciences",
854859
"name": "Numssen, Ole",

nipype/interfaces/dcm2nii.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ class Dcm2niixInputSpec(CommandLineInputSpec):
380380
class Dcm2niixOutputSpec(TraitedSpec):
381381
converted_files = OutputMultiPath(File(exists=True))
382382
bvecs = OutputMultiPath(File(exists=True))
383+
mvecs = OutputMultiPath(File(exists=True))
383384
bvals = OutputMultiPath(File(exists=True))
384385
bids = OutputMultiPath(File(exists=True))
385386

@@ -459,8 +460,8 @@ def _parse_stdout(self, stdout):
459460
return filenames
460461

461462
def _parse_files(self, filenames):
462-
outfiles, bvals, bvecs, bids = [], [], [], []
463-
outtypes = [".bval", ".bvec", ".json", ".txt"]
463+
outfiles, bvals, bvecs, mvecs, bids = [], [], [], [], []
464+
outtypes = [".bval", ".bvec", ".mvec", ".json", ".txt"]
464465
if self.inputs.to_nrrd:
465466
outtypes += [".nrrd", ".nhdr", ".raw.gz"]
466467
else:
@@ -480,10 +481,13 @@ def _parse_files(self, filenames):
480481
bvals.append(fl)
481482
elif fl.endswith(".bvec"):
482483
bvecs.append(fl)
484+
elif fl.endswith(".mvec"):
485+
mvecs.append(fl)
483486
elif fl.endswith(".json") or fl.endswith(".txt"):
484487
bids.append(fl)
485488
self.output_files = outfiles
486489
self.bvecs = bvecs
490+
self.mvecs = mvecs
487491
self.bvals = bvals
488492
self.bids = bids
489493

@@ -492,6 +496,7 @@ def _list_outputs(self):
492496
outputs["converted_files"] = self.output_files
493497
outputs["bvecs"] = self.bvecs
494498
outputs["bvals"] = self.bvals
499+
outputs["mvecs"] = self.mvecs
495500
outputs["bids"] = self.bids
496501
return outputs
497502

nipype/interfaces/tests/test_auto_Dcm2niix.py

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def test_Dcm2niix_outputs():
9595
bvals=dict(),
9696
bvecs=dict(),
9797
converted_files=dict(),
98+
mvecs=dict(),
9899
)
99100
outputs = Dcm2niix.output_spec()
100101

0 commit comments

Comments
 (0)