@@ -380,6 +380,7 @@ class Dcm2niixInputSpec(CommandLineInputSpec):
380380class 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
0 commit comments