@@ -47,7 +47,8 @@ class SliceTimingInputSpec(SPMCommandInputSpec):
47
47
'calculated as TR-(TR/num_slices)' ),
48
48
mandatory = True )
49
49
slice_order = traits .List (traits .Int (), field = 'so' ,
50
- desc = '1-based order in which slices are acquired' ,
50
+ desc = ('1-based order in which slices are '
51
+ 'acquired' ),
51
52
mandatory = True )
52
53
ref_slice = traits .Int (field = 'refslice' ,
53
54
desc = '1-based Number of the reference slice' ,
@@ -104,7 +105,8 @@ def _list_outputs(self):
104
105
filelist = filename_to_list (self .inputs .in_files )
105
106
for f in filelist :
106
107
if isinstance (f , list ):
107
- run = [fname_presuffix (in_f , prefix = self .inputs .out_prefix ) for in_f in f ]
108
+ run = [fname_presuffix (in_f , prefix = self .inputs .out_prefix )
109
+ for in_f in f ]
108
110
else :
109
111
run = fname_presuffix (f , prefix = self .inputs .out_prefix )
110
112
outputs ['timecorrected_files' ].append (run )
@@ -126,7 +128,8 @@ class RealignInputSpec(SPMCommandInputSpec):
126
128
separation = traits .Range (low = 0.0 , field = 'eoptions.sep' ,
127
129
desc = 'sampling separation in mm' )
128
130
register_to_mean = traits .Bool (field = 'eoptions.rtm' ,
129
- desc = 'Indicate whether realignment is done to the mean image' )
131
+ desc = ('Indicate whether realignment is '
132
+ 'done to the mean image' ))
130
133
weight_img = File (exists = True , field = 'eoptions.weight' ,
131
134
desc = 'filename of weighting image' )
132
135
interp = traits .Range (low = 0 , high = 7 , field = 'eoptions.interp' ,
@@ -138,10 +141,12 @@ class RealignInputSpec(SPMCommandInputSpec):
138
141
minlen = 2 , maxlen = 2 , usedefault = True ,
139
142
desc = 'determines which images to reslice' )
140
143
write_interp = traits .Range (low = 0 , high = 7 , field = 'roptions.interp' ,
141
- desc = 'degree of b-spline used for interpolation' )
144
+ desc = ('degree of b-spline used for '
145
+ 'interpolation' ))
142
146
write_wrap = traits .List (traits .Int (), minlen = 3 , maxlen = 3 ,
143
147
field = 'roptions.wrap' ,
144
- desc = 'Check if interpolation should wrap in [x,y,z]' )
148
+ desc = ('Check if interpolation should wrap in '
149
+ '[x,y,z]' ))
145
150
write_mask = traits .Bool (field = 'roptions.mask' ,
146
151
desc = 'True/False mask output image' )
147
152
out_prefix = traits .String ('r' , field = 'roptions.prefix' , usedefault = True ,
@@ -150,20 +155,25 @@ class RealignInputSpec(SPMCommandInputSpec):
150
155
151
156
class RealignOutputSpec (TraitedSpec ):
152
157
mean_image = File (exists = True , desc = 'Mean image file from the realignment' )
153
- modified_in_files = OutputMultiPath (traits .Either (traits .List (File (exists = True )),
154
- File (exists = True )),
155
- desc = 'Copies of all files passed to in_files.\
156
- Headers will have been modified to align all\
157
- images with the first, or optionally to first\
158
- do that, extract a mean image, and re-align to\
159
- that mean image.' )
160
- realigned_files = OutputMultiPath (traits .Either (traits .List (File (exists = True )),
161
- File (exists = True )),
162
- desc = 'If jobtype is write or estwrite, these will be the\
163
- resliced files. Otherwise, they will be copies of\
164
- in_files that have had their headers rewritten.' )
158
+ modified_in_files = OutputMultiPath (traits .Either (
159
+ traits .List (File (exists = True )), File (exists = True )),
160
+ desc = ('Copies of all files passed to '
161
+ 'in_files. Headers will have '
162
+ 'been modified to align all '
163
+ 'images with the first, or '
164
+ 'optionally to first do that, '
165
+ 'extract a mean image, and '
166
+ 're-align to that mean image.' ))
167
+ realigned_files = OutputMultiPath (traits .Either (
168
+ traits .List (File (exists = True )), File (exists = True )),
169
+ desc = ('If jobtype is write or estwrite, '
170
+ 'these will be the resliced files.'
171
+ ' Otherwise, they will be copies '
172
+ 'of in_files that have had their '
173
+ 'headers rewritten.' ))
165
174
realignment_parameters = OutputMultiPath (File (exists = True ),
166
- desc = 'Estimated translation and rotation parameters' )
175
+ desc = ('Estimated translation and '
176
+ 'rotation parameters' ))
167
177
168
178
169
179
class Realign (SPMCommand ):
@@ -220,10 +230,9 @@ def _list_outputs(self):
220
230
tmp_imgf = imgf [0 ]
221
231
else :
222
232
tmp_imgf = imgf
223
- outputs ['realignment_parameters' ].append (fname_presuffix (tmp_imgf ,
224
- prefix = 'rp_' ,
225
- suffix = '.txt' ,
226
- use_ext = False ))
233
+ outputs ['realignment_parameters' ].append (
234
+ fname_presuffix (tmp_imgf , prefix = 'rp_' , suffix = '.txt' ,
235
+ use_ext = False ))
227
236
if not isinstance (imgf , list ) and func_is_3d (imgf ):
228
237
break
229
238
if self .inputs .jobtype == "estimate" :
0 commit comments