11# -*- coding: utf-8 -*-
2- # Copyright (C) 2012-2023 C-PAC Developers
2+ # Copyright (C) 2012-2025 C-PAC Developers
33
44# This file is part of C-PAC.
55
@@ -1227,15 +1227,7 @@ def freesurfer_fsl_brain_connector(wf, cfg, strat_pool, pipe_num, opt):
12271227 wf .connect (node , out , convert_fs_T1_to_nifti , "in_file" )
12281228
12291229 # 3dresample -orient RPI -inset brainmask.nii.gz -prefix brain_fs.nii.gz
1230- reorient_fs_brainmask = pe .Node (
1231- interface = afni .Resample (),
1232- name = f"reorient_fs_brainmask_{ node_id } " ,
1233- mem_gb = 0 ,
1234- mem_x = (0.0115 , "in_file" , "t" ),
1235- )
1236- reorient_fs_brainmask .inputs .orientation = cfg .pipeline_setup ["desired_orientation" ]
1237- reorient_fs_brainmask .inputs .outputtype = "NIFTI_GZ"
1238-
1230+ reorient_fs_brainmask = cfg .orientation_node (f"reorient_fs_brainmask_{ node_id } " )
12391231 wf .connect (
12401232 convert_fs_brainmask_to_nifti , "out_file" , reorient_fs_brainmask , "in_file"
12411233 )
@@ -1249,15 +1241,7 @@ def freesurfer_fsl_brain_connector(wf, cfg, strat_pool, pipe_num, opt):
12491241 wf .connect (reorient_fs_brainmask , "out_file" , binarize_fs_brain , "in_file" )
12501242
12511243 # 3dresample -orient RPI -inset T1.nii.gz -prefix head_fs.nii.gz
1252- reorient_fs_T1 = pe .Node (
1253- interface = afni .Resample (),
1254- name = f"reorient_fs_T1_{ node_id } " ,
1255- mem_gb = 0 ,
1256- mem_x = (0.0115 , "in_file" , "t" ),
1257- )
1258- reorient_fs_T1 .inputs .orientation = cfg .pipeline_setup ["desired_orientation" ]
1259- reorient_fs_T1 .inputs .outputtype = "NIFTI_GZ"
1260-
1244+ reorient_fs_T1 = cfg .orientation_node (f"reorient_fs_T1_{ node_id } " )
12611245 wf .connect (convert_fs_T1_to_nifti , "out_file" , reorient_fs_T1 , "in_file" )
12621246
12631247 # flirt -in head_fs.nii.gz -ref ${FSLDIR}/data/standard/MNI152_T1_1mm.nii.gz \
@@ -1454,15 +1438,7 @@ def anatomical_init(wf, cfg, strat_pool, pipe_num, opt=None) -> NODEBLOCK_RETURN
14541438 node , out = strat_pool .get_data ("T1w" )
14551439 wf .connect (node , out , anat_deoblique , "in_file" )
14561440
1457- anat_reorient = pe .Node (
1458- interface = afni .Resample (),
1459- name = f"anat_reorient_{ pipe_num } " ,
1460- mem_gb = 0 ,
1461- mem_x = (0.0115 , "in_file" , "t" ),
1462- )
1463- anat_reorient .inputs .orientation = cfg .pipeline_setup ["desired_orientation" ]
1464- anat_reorient .inputs .outputtype = "NIFTI_GZ"
1465-
1441+ anat_reorient = cfg .orientation_node (f"anat_reorient_{ pipe_num } " )
14661442 wf .connect (anat_deoblique , "out_file" , anat_reorient , "in_file" )
14671443
14681444 outputs = {
@@ -2262,15 +2238,7 @@ def anatomical_init_T2(wf, cfg, strat_pool, pipe_num, opt=None):
22622238 node , out = strat_pool .get_data ("T2w" )
22632239 wf .connect (node , out , T2_deoblique , "in_file" )
22642240
2265- T2_reorient = pe .Node (
2266- interface = afni .Resample (),
2267- name = f"T2_reorient_{ pipe_num } " ,
2268- mem_gb = 0 ,
2269- mem_x = (0.0115 , "in_file" , "t" ),
2270- )
2271- T2_reorient .inputs .orientation = cfg .pipeline_setup ["desired_orientation" ]
2272- T2_reorient .inputs .outputtype = "NIFTI_GZ"
2273-
2241+ T2_reorient = cfg .orientation_node (f"T2_reorient_{ pipe_num } " )
22742242 wf .connect (T2_deoblique , "out_file" , T2_reorient , "in_file" )
22752243
22762244 outputs = {
0 commit comments