@@ -1052,6 +1052,7 @@ def init_bold_grayords_wf(grayord_density, mem_gb, repetition_time, name="bold_g
1052
1052
from niworkflows .engine .workflows import LiterateWorkflow as Workflow
1053
1053
from niworkflows .interfaces .utility import KeySelect
1054
1054
1055
+ from ...interfaces .nibabel import ReorientImage
1055
1056
from ...interfaces .workbench import CiftiCreateDenseTimeseries
1056
1057
1057
1058
workflow = Workflow (name = name )
@@ -1137,9 +1138,16 @@ def init_bold_grayords_wf(grayord_density, mem_gb, repetition_time, name="bold_g
1137
1138
niu .Function (function = _split_surfaces , output_names = ["left_surface" , "right_surface" ]),
1138
1139
name = "split_surfaces" ,
1139
1140
)
1141
+
1142
+ reorient_data = pe .Node (ReorientImage (target_orientation = "LAS" ), name = "reorient_data" )
1143
+ reorient_labels = reorient_data .clone (name = "reorient_labels" )
1144
+
1140
1145
gen_cifti = pe .Node (CiftiCreateDenseTimeseries (timestep = repetition_time ), name = "gen_cifti" )
1141
- gen_cifti .inputs .volume_structure_labels = str (
1142
- tf .api .get ("MNI152NLin6Asym" , resolution = 2 , atlas = "HCP" , suffix = "dseg" )
1146
+ gen_cifti .inputs .roi_left = tf .api .get (
1147
+ "fsLR" , density = fslr_density , hemi = "L" , desc = "nomedialwall" , suffix = "dparc"
1148
+ )
1149
+ gen_cifti .inputs .roi_right = tf .api .get (
1150
+ "fsLR" , density = fslr_density , hemi = "R" , desc = "nomedialwall" , suffix = "dparc"
1143
1151
)
1144
1152
gen_cifti_metadata = pe .Node (
1145
1153
niu .Function (function = _gen_metadata , output_names = ["out_metadata" ]),
@@ -1149,9 +1157,10 @@ def init_bold_grayords_wf(grayord_density, mem_gb, repetition_time, name="bold_g
1149
1157
1150
1158
# fmt: off
1151
1159
workflow .connect ([
1152
- (inputnode , gen_cifti , [
1153
- ('subcortical_volume' , 'volume_data' ),
1154
- ('subcortical_labels' , 'volume_structure_labels' )]),
1160
+ (inputnode , reorient_data , [("subcortical_volume" , "in_file" )]),
1161
+ (inputnode , reorient_labels , [("subcortical_labels" , "in_file" )]),
1162
+ (reorient_data , gen_cifti , [("out_file" , "volume_data" )]),
1163
+ (reorient_labels , gen_cifti , [("out_file" , "volume_structure_labels" )]),
1155
1164
(inputnode , select_fs_surf , [('surf_files' , 'surf_files' ),
1156
1165
('surf_refs' , 'keys' )]),
1157
1166
(select_fs_surf , resample , [('surf_files' , 'in_file' )]),
0 commit comments