@@ -3108,7 +3108,9 @@ def overwrite_transform_anat_to_template(wf, cfg, strat_pool, pipe_num, opt=None
31083108 merge_xfms , "merged_file" , fsl_apply_warp_t1_to_template , "field_file"
31093109 )
31103110
3111- concat_match_fov = pe .Node (interface = fsl .ConvertWarp (), name = f"concat_match_fov_{ pipe_num } " )
3111+ concat_match_fov = pe .Node (
3112+ interface = fsl .ConvertWarp (), name = f"concat_match_fov_{ pipe_num } "
3113+ )
31123114 concat_match_fov .inputs .relwarp = True
31133115
31143116 wf .connect (match_fovs_T1w , "out_matrix_file" , concat_match_fov , "premat" )
@@ -3118,8 +3120,7 @@ def overwrite_transform_anat_to_template(wf, cfg, strat_pool, pipe_num, opt=None
31183120
31193121 # Node to concatenate the inverse warp with the FOV matrix
31203122 concat_match_fov_inv = pe .Node (
3121- interface = fsl .ConvertWarp (),
3122- name = f"concat_match_fov_inv_{ pipe_num } "
3123+ interface = fsl .ConvertWarp (), name = f"concat_match_fov_inv_{ pipe_num } "
31233124 )
31243125 concat_match_fov_inv .inputs .relwarp = True
31253126
@@ -3138,15 +3139,16 @@ def overwrite_transform_anat_to_template(wf, cfg, strat_pool, pipe_num, opt=None
31383139 # TODO connect T1wRestoreBrain, check T1wRestoreBrain quality
31393140 node , out = strat_pool .get_data (["desc-restore-brain_T1w" , "desc-preproc_T1w" ])
31403141
3141- wf .connect (
3142- node , out , fsl_apply_warp_t1_brain_to_template , "in_file"
3143- )
3142+ wf .connect (node , out , fsl_apply_warp_t1_brain_to_template , "in_file" )
31443143
31453144 node , out = strat_pool .get_data ("T1w-brain-template" )
31463145 wf .connect (node , out , fsl_apply_warp_t1_brain_to_template , "ref_file" )
31473146
31483147 wf .connect (
3149- concat_match_fov , "out_file" , fsl_apply_warp_t1_brain_to_template , "field_file"
3148+ concat_match_fov ,
3149+ "out_file" ,
3150+ fsl_apply_warp_t1_brain_to_template ,
3151+ "field_file" ,
31503152 )
31513153
31523154 fsl_apply_warp_t1_brain_mask_to_template = pe .Node (
@@ -3158,9 +3160,7 @@ def overwrite_transform_anat_to_template(wf, cfg, strat_pool, pipe_num, opt=None
31583160
31593161 node , out = strat_pool .get_data ("space-T1w_desc-brain_mask" )
31603162
3161- wf .connect (
3162- node , out , fsl_apply_warp_t1_brain_mask_to_template , "in_file"
3163- )
3163+ wf .connect (node , out , fsl_apply_warp_t1_brain_mask_to_template , "in_file" )
31643164
31653165 node , out = strat_pool .get_data ("T1w-brain-template-mask" )
31663166 wf .connect (node , out , fsl_apply_warp_t1_brain_mask_to_template , "ref_file" )
@@ -3438,9 +3438,7 @@ def coregistration(wf, cfg, strat_pool, pipe_num, opt=None):
34383438 node , out = strat_pool .get_data ("sbref" )
34393439 wf .connect (node , out , func_to_anat , "inputspec.func" )
34403440
3441- node , out = strat_pool .get_data (
3442- ["desc-restore-brain_T1w" , "desc-preproc_T1w" ]
3443- )
3441+ node , out = strat_pool .get_data (["desc-restore-brain_T1w" , "desc-preproc_T1w" ])
34443442 wf .connect (node , out , func_to_anat , "inputspec.anat" )
34453443
34463444 if diff_complete :
@@ -4020,8 +4018,14 @@ def warp_wholeheadT1_to_template(wf, cfg, strat_pool, pipe_num, opt=None):
40204018def warp_T1mask_to_template (wf , cfg , strat_pool , pipe_num , opt = None ):
40214019 """Warp T1 mask to template."""
40224020
4023- if cfg .registration_workflows ["anatomical_registration" ]["overwrite_transform" ] and cfg .registration_workflows ["anatomical_registration" ]["overwrite_transform" ]["using" ] == 'FSL' :
4024- reg_tool = 'fsl'
4021+ if (
4022+ cfg .registration_workflows ["anatomical_registration" ]["overwrite_transform" ]
4023+ and cfg .registration_workflows ["anatomical_registration" ][
4024+ "overwrite_transform"
4025+ ]["using" ]
4026+ == "FSL"
4027+ ):
4028+ reg_tool = "fsl"
40254029 else :
40264030 reg_tool = strat_pool .reg_tool ("from-T1w_to-template_mode-image_xfm" )
40274031
0 commit comments