@@ -64,7 +64,7 @@ def create_AutoRecon1(name="AutoRecon1", longitudinal=False, field_strength='1.5
6464 inputspec.cw256 : Conform inputs to 256 FOV (optional)
6565 inputspec.num_threads: Number of threads to use with EM Register (default=1)
6666 Outpus::
67-
67+
6868 """
6969 ar1_wf = pe .Workflow (name = name )
7070 inputspec = pe .Node (interface = IdentityInterface (fields = ['T1_files' ,
@@ -114,14 +114,14 @@ def convert_modalities(in_file=None, out_file=None):
114114 convert_modalities ),
115115 name = "T2_Convert" )
116116 T2_convert .inputs .out_file = 'T2raw.mgz'
117- ar1_wf .connect ([(inputspec , T2_convert , [('T2_file' , 'in_file' )])])
117+ ar1_wf .connect ([(inputspec , T2_convert , [('T2_file' , 'in_file' )])])
118118
119119 FLAIR_convert = pe .Node (Function (['in_file' , 'out_file' ],
120120 ['out_file' ],
121121 convert_modalities ),
122122 name = "FLAIR_Convert" )
123123 FLAIR_convert .inputs .out_file = 'FLAIRraw.mgz'
124- ar1_wf .connect ([(inputspec , FLAIR_convert , [('FLAIR_file' , 'in_file' )])])
124+ ar1_wf .connect ([(inputspec , FLAIR_convert , [('FLAIR_file' , 'in_file' )])])
125125 else :
126126 # longitudinal inputs
127127 inputspec = pe .Node (interface = IdentityInterface (fields = ['T1_files' ,
@@ -151,7 +151,7 @@ def output_names(T1_files):
151151 output_names ),
152152 name = "Longitudinal_Filenames" )
153153 ar1_wf .connect ([(inputspec , filenames , [('T1_files' , 'T1_files' )])])
154-
154+
155155 copy_ltas = pe .MapNode (Function (['in_file' , 'out_file' ],
156156 ['out_file' ],
157157 copy_file ),
@@ -173,7 +173,7 @@ def output_names(T1_files):
173173 ar1_wf .connect ([(copy_ltas , concatenate_lta , [('out_file' , 'in_file' )]),
174174 (inputspec , concatenate_lta , [('subj_to_template_lta' , 'subj_to_base' )])])
175175
176-
176+
177177 # Motion Correction
178178 """
179179 When there are multiple source volumes, this step will correct for small
@@ -215,7 +215,7 @@ def createTemplate(in_files, out_file):
215215 out_file = robtemp .outputs .out_file
216216 out_file = os .path .abspath (out_file )
217217 return out_file , intensity_scales , transforms
218-
218+
219219 if not longitudinal :
220220 create_template = pe .Node (Function (['in_files' , 'out_file' ],
221221 ['out_file' , 'intensity_scales' , 'transforms' ],
@@ -238,10 +238,10 @@ def createTemplate(in_files, out_file):
238238 if not longitudinal :
239239 conform_template .inputs .conform = True
240240 ar1_wf .connect ([(verify_inputs , conform_template , [('cw256' , 'cw256' ),
241- ('resample_type' , 'resample_type' )])])
241+ ('resample_type' , 'resample_type' )])])
242242 else :
243243 conform_template .inputs .out_datatype = 'uchar'
244-
244+
245245 ar1_wf .connect ([(create_template , conform_template , [('out_file' , 'in_file' )])])
246246
247247 # Talairach
@@ -258,7 +258,7 @@ def createTemplate(in_files, out_file):
258258 # 3T params from Zheng, Chee, Zagorodnov 2009 NeuroImage paper
259259 # "Improvement of brain segmentation accuracy by optimizing
260260 # non-uniformity correction using N3"
261- # namely specifying iterations, proto-iters and distance:
261+ # namely specifying iterations, proto-iters and distance:
262262 bias_correction .inputs .distance = 50
263263 else :
264264 # 1.5T default
@@ -294,7 +294,7 @@ def createTemplate(in_files, out_file):
294294 talairach_avi .inputs .out_file = 'talairach.auto.xfm'
295295
296296 ar1_wf .connect ([(inputspec , talairach_avi , [('template_talairach_xfm' , 'in_file' )])])
297-
297+
298298 copy_transform = pe .Node (Function (['in_file' , 'out_file' ],
299299 ['out_file' ],
300300 copy_file ),
@@ -328,7 +328,7 @@ def createTemplate(in_files, out_file):
328328 (copy_transform , add_xform_to_orig_nu , [('out_file' , 'transform' )])])
329329
330330
331-
331+
332332 # check the alignment of the talairach
333333 # TODO: Figure out how to read output from this node.
334334 check_alignment = pe .Node (CheckTalairachAlignment (),
@@ -356,7 +356,7 @@ def awkfile(in_file, log_file):
356356 awkfile ),
357357 name = 'Awk' )
358358 awk_logfile .inputs .in_file = awk_file
359-
359+
360360 ar1_wf .connect ([(talairach_avi , awk_logfile , [('out_log' , 'log_file' )])])
361361
362362 # TODO datasink the output from TalirachQC...not sure how to do this
@@ -376,19 +376,19 @@ def awkfile(in_file, log_file):
376376 (copy_transform , mri_normalize ,
377377 [('out_file' , 'transform' )]),
378378 ])
379-
379+
380380 # Skull Strip
381381 """
382- Removes the skull from mri/T1.mgz and stores the result in
382+ Removes the skull from mri/T1.mgz and stores the result in
383383 mri/brainmask.auto.mgz and mri/brainmask.mgz. Runs the mri_watershed program.
384384 """
385- if not longitudinal :
385+ if not longitudinal :
386386 mri_em_register = pe .Node (EMRegister (), name = "EM_Register" )
387387 mri_em_register .inputs .out_file = 'talairach_with_skull.lta'
388388 mri_em_register .inputs .skull = True
389389 if plugin_args :
390390 mri_em_register .plugin_args = plugin_args
391-
391+
392392 ar1_wf .connect ([(add_xform_to_orig_nu , mri_em_register , [('out_file' , 'in_file' )]),
393393 (inputspec , mri_em_register , [('num_threads' , 'num_threads' ),
394394 ('reg_template_withskull' , 'template' )])])
@@ -406,13 +406,13 @@ def awkfile(in_file, log_file):
406406 copy_file ),
407407 name = 'Copy_Template_Brainmask' )
408408 copy_template_brainmask .inputs .out_file = 'brainmask_{0}.mgz' .format (config ['long_template' ])
409-
409+
410410 ar1_wf .connect ([(inputspec , copy_template_brainmask , [('template_brainmask' , 'in_file' )])])
411411
412412 mask1 = pe .Node (ApplyMask (), name = "ApplyMask1" )
413413 mask1 .inputs .keep_mask_deletion_edits = True
414414 mask1 .inputs .out_file = 'brainmask.auto.mgz'
415-
415+
416416 ar1_wf .connect ([(mri_normalize , mask1 , [('out_file' , 'in_file' )]),
417417 (copy_template_brainmask , mask1 , [('out_file' , 'mask_file' )])])
418418
@@ -423,7 +423,7 @@ def awkfile(in_file, log_file):
423423
424424 ar1_wf .connect ([(mask1 , brainmask , [('out_file' , 'in_file' )]),
425425 (copy_template_brainmask , brainmask , [('out_file' , 'mask_file' )])])
426-
426+
427427 copy_brainmask = pe .Node (Function (['in_file' , 'out_file' ],
428428 ['out_file' ],
429429 copy_file ),
@@ -458,10 +458,10 @@ def awkfile(in_file, log_file):
458458 (copy_transform , outputspec , [('out_file' , 'talairach' )]),
459459 (mri_normalize , outputspec , [('out_file' , 't1' )]),
460460 (brainmask , outputspec , [('out_file' , 'brainmask_auto' )]),
461- (copy_brainmask , outputspec , [('out_file' , 'brainmask' )]),
461+ (copy_brainmask , outputspec , [('out_file' , 'brainmask' )]),
462462 ])
463463
464-
464+
465465 if not longitudinal :
466466 ar1_wf .connect ([(mri_em_register , outputspec , [('out_file' , 'talskull' )]),
467467 ])
0 commit comments