Skip to content

Commit d649e3d

Browse files
authored
Merge pull request #298 from madisoth/fix/goodvoxels-cifti-output
FIX: restore cifti medial wall masking, subcortical volume LAS reorientation
2 parents df80894 + 0cb3621 commit d649e3d

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

nibabies/workflows/bold/resampling.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,7 @@ def init_bold_grayords_wf(grayord_density, mem_gb, repetition_time, name="bold_g
10521052
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
10531053
from niworkflows.interfaces.utility import KeySelect
10541054

1055+
from ...interfaces.nibabel import ReorientImage
10551056
from ...interfaces.workbench import CiftiCreateDenseTimeseries
10561057

10571058
workflow = Workflow(name=name)
@@ -1137,9 +1138,16 @@ def init_bold_grayords_wf(grayord_density, mem_gb, repetition_time, name="bold_g
11371138
niu.Function(function=_split_surfaces, output_names=["left_surface", "right_surface"]),
11381139
name="split_surfaces",
11391140
)
1141+
1142+
reorient_data = pe.Node(ReorientImage(target_orientation="LAS"), name="reorient_data")
1143+
reorient_labels = reorient_data.clone(name="reorient_labels")
1144+
11401145
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"
11431151
)
11441152
gen_cifti_metadata = pe.Node(
11451153
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
11491157

11501158
# fmt: off
11511159
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")]),
11551164
(inputnode, select_fs_surf, [('surf_files', 'surf_files'),
11561165
('surf_refs', 'keys')]),
11571166
(select_fs_surf, resample, [('surf_files', 'in_file')]),

0 commit comments

Comments
 (0)