From cf7a4016f7eb9c4b1cc06232717116cabd972c89 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 3 Apr 2024 16:02:40 -0400 Subject: [PATCH] FIX: Use tissue segmentations for FS recon-all --- nibabies/workflows/anatomical/base.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/nibabies/workflows/anatomical/base.py b/nibabies/workflows/anatomical/base.py index 489c3a81..ba0cd65e 100644 --- a/nibabies/workflows/anatomical/base.py +++ b/nibabies/workflows/anatomical/base.py @@ -482,14 +482,23 @@ def init_infant_anat_wf( # fsaverage to fsLR sphere_reg_wf = init_sphere_reg_wf() - # fmt:off wf.connect([ (t2w_preproc_wf, surface_recon_wf, [ ("outputnode.anat_preproc", "inputnode.t2w")]), - (anat_seg_wf, surface_recon_wf, [ - ("outputnode.anat_aseg", "inputnode.ants_segs")]), ]) - # fmt:on + + if recon_method == 'infantfs': + wf.connect([ + (anat_seg_wf, surface_recon_wf, [ + ("outputnode.anat_aseg", "inputnode.ants_segs"), + ]), + ]) # fmt:skip + if recon_method == 'freesurfer': + wf.connect([ + (anat_seg_wf, surface_recon_wf, [ + ("outputnode.anat_dseg", "inputnode.ants_segs"), + ]) + ]) # fmt:skip # Anatomical ribbon file using HCP signed-distance volume method anat_ribbon_wf = init_anat_ribbon_wf()