@@ -113,11 +113,9 @@ def init_rodent_brain_extraction_wf(
113113 mrg_tmpl = pe .Node (niu .Merge (2 ), name = 'mrg_tmpl' )
114114 # mrg_tmpl.inputs.in1 = tpl_target_path
115115
116- #create integration nodes to allow compatability between pipelines
117- integrate_1 = pe .Node (niu .Function (function = _integrate ,
118- input_names = ['in_file' ], output_names = ['out_file' ]), name = 'integrate_1' )
119- integrate_2 = pe .Node (niu .Function (function = _integrate ,
120- input_names = ['in_file' ], output_names = ['out_file' ]), name = 'integrate_2' )
116+ # Create integration nodes to allow compatibility between pipelines
117+ integrate_1 = pe .Node (niu .IdentityInterface (fields = ["in_file" ]), name = 'integrate_1' )
118+ integrate_2 = pe .Node (niu .IdentityInterface (fields = ["in_file" ]), name = 'integrate_2' )
121119
122120 # Initialize transforms with antsAI
123121 init_aff = pe .Node (AI (
@@ -301,7 +299,7 @@ def init_rodent_brain_extraction_wf(
301299 (warp_mask_out , sinker , [('output_image' , 'derivatives.@out_mask' )]),
302300 ])
303301 # add second target prep stage if necessary
304- if modality .lower == 't2w' :
302+ if modality .lower () == 't2w' :
305303 wf .connect ([(warp_mask_1 , tar_prep , [('output_image' , 'inu_n4_final.weight_image' )])])
306304
307305 # add segmentation if necessary
@@ -343,4 +341,4 @@ def res_by_spc(in_file, out_file = None):
343341def _integrate (in_file , out_file = None ):
344342 import os .path as op
345343 out_file = op .abspath (in_file )
346- return out_file
344+ return out_file
0 commit comments