@@ -119,7 +119,8 @@ class Dcm2nii(CommandLine):
119
119
>>> converter.inputs.gzip_output = True
120
120
>>> converter.inputs.output_dir = '.'
121
121
>>> converter.cmdline # doctest: +ELLIPSIS
122
- 'dcm2nii -a y -c y -b config.ini -v y -d y -e y -g y -i n -n y -o . -p y -x n -f n functional_1.dcm'"""
122
+ 'dcm2nii -a y -c y -b config.ini -v y -d y -e y -g y -i n -n y -o . -p y -x n -f n functional_1.dcm'
123
+ """
123
124
124
125
input_spec = Dcm2niiInputSpec
125
126
output_spec = Dcm2niiOutputSpec
@@ -374,6 +375,7 @@ class Dcm2niixInputSpec(CommandLineInputSpec):
374
375
class Dcm2niixOutputSpec (TraitedSpec ):
375
376
converted_files = OutputMultiPath (File (exists = True ))
376
377
bvecs = OutputMultiPath (File (exists = True ))
378
+ mvecs = OutputMultiPath (File (exists = True ))
377
379
bvals = OutputMultiPath (File (exists = True ))
378
380
bids = OutputMultiPath (File (exists = True ))
379
381
@@ -456,8 +458,8 @@ def _parse_stdout(self, stdout):
456
458
return filenames
457
459
458
460
def _parse_files (self , filenames ):
459
- outfiles , bvals , bvecs , bids = [], [], [], []
460
- outtypes = [".bval" , ".bvec" , ".json" , ".txt" ]
461
+ outfiles , bvals , bvecs , mvecs , bids = [], [], [], [], []
462
+ outtypes = [".bval" , ".bvec" , ".mvec" , ". json" , ".txt" ]
461
463
if self .inputs .to_nrrd :
462
464
outtypes += [".nrrd" , ".nhdr" , ".raw.gz" ]
463
465
else :
@@ -477,10 +479,13 @@ def _parse_files(self, filenames):
477
479
bvals .append (fl )
478
480
elif fl .endswith (".bvec" ):
479
481
bvecs .append (fl )
482
+ elif fl .endswith (".mvec" ):
483
+ mvecs .append (fl )
480
484
elif fl .endswith (".json" ) or fl .endswith (".txt" ):
481
485
bids .append (fl )
482
486
self .output_files = outfiles
483
487
self .bvecs = bvecs
488
+ self .mvecs = mvecs
484
489
self .bvals = bvals
485
490
self .bids = bids
486
491
@@ -489,6 +494,7 @@ def _list_outputs(self):
489
494
outputs ["converted_files" ] = self .output_files
490
495
outputs ["bvecs" ] = self .bvecs
491
496
outputs ["bvals" ] = self .bvals
497
+ outputs ["mvecs" ] = self .mvecs
492
498
outputs ["bids" ] = self .bids
493
499
return outputs
494
500
0 commit comments