@@ -50,7 +50,7 @@ class Dcm2nii(CommandLine):
50
50
>>> converter.inputs.gzip_output = True
51
51
>>> converter.inputs.output_dir = '.'
52
52
>>> converter.cmdline #doctest: +ELLIPSIS
53
- 'dcm2nii -g y -n y -i n -o . -b config.ini functional_1.dcm functional_2.dcm '
53
+ 'dcm2nii -g y -n y -i n -o . -b config.ini functional_1.dcm'
54
54
>>> converter.run() # doctest: +SKIP
55
55
"""
56
56
@@ -67,6 +67,8 @@ def _format_arg(self, opt, spec, val):
67
67
else :
68
68
spec .argstr += ' n'
69
69
val = True
70
+ if opt == 'source_names' :
71
+ return spec .argstr % val [0 ]
70
72
return super (Dcm2nii , self )._format_arg (opt , spec , val )
71
73
72
74
def _run_interface (self , runtime ):
@@ -104,8 +106,8 @@ def _parse_stdout(self, stdout):
104
106
base , filename , ext = split_filename (last_added_file )
105
107
bvecs .append (os .path .join (base ,filename + ".bvec" ))
106
108
bvals .append (os .path .join (base ,filename + ".bval" ))
107
- elif re .search ('.*->(.*)' , line ):
108
- val = re .search ('.*->(.*)' , line )
109
+ elif re .search ('.*-- >(.*)' , line ):
110
+ val = re .search ('.*-- >(.*)' , line )
109
111
val = val .groups ()[0 ]
110
112
if isdefined (self .inputs .output_dir ):
111
113
output_dir = self .inputs .output_dir
@@ -115,8 +117,7 @@ def _parse_stdout(self, stdout):
115
117
file = val
116
118
117
119
if file :
118
- if last_added_file and os .path .exists (file ) and not last_added_file in file :
119
- files .append (file )
120
+ files .append (file )
120
121
last_added_file = file
121
122
continue
122
123
0 commit comments