Skip to content

Commit 6c38c07

Browse files
committed
FIX: Connections for T1-only
1 parent 4b715c9 commit 6c38c07

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

nibabies/workflows/anatomical/base.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,10 @@ def init_infant_anat_wf(
463463
# M-CRIB-S to dHCP42week (32k)
464464
sphere_reg_wf = init_mcribs_sphere_reg_wf()
465465

466-
# fmt:off
467466
wf.connect([
468467
(t2w_template_wf, denoise_t2w, [('outputnode.anat_ref', 'input_image')]),
469468
(denoise_t2w, surface_recon_wf, [('output_image', 'inputnode.t2w')]),
470-
])
471-
# fmt:on
469+
]) # fmt:skip
472470
if derivatives.aseg:
473471
wf.connect(deriv_buffer, 't2w_aseg', surface_recon_wf, 'inputnode.ants_segs')
474472
if derivatives.mask:
@@ -811,7 +809,7 @@ def init_infant_single_anat_wf(
811809
if not recon_method:
812810
return workflow
813811

814-
elif recon_method == 'freesurfer':
812+
if recon_method == 'freesurfer':
815813
from smriprep.workflows.surfaces import init_surface_recon_wf
816814

817815
surface_recon_wf = init_surface_recon_wf(omp_nthreads=omp_nthreads, hires=hires)
@@ -853,6 +851,12 @@ def init_infant_single_anat_wf(
853851
else:
854852
raise NotImplementedError
855853

854+
if recon_method in ('freesurfer', 'infantfs'):
855+
from smriprep.workflows.surfaces import init_sphere_reg_wf
856+
857+
# fsaverage to fsLR
858+
sphere_reg_wf = init_sphere_reg_wf()
859+
856860
# Anatomical ribbon file using HCP signed-distance volume method
857861
anat_ribbon_wf = init_anat_ribbon_wf()
858862

@@ -865,8 +869,7 @@ def init_infant_single_anat_wf(
865869
("outputnode.anat_ref", "inputnode.t1w"),
866870
]),
867871
(mask_buffer, surface_recon_wf, [
868-
("anat_brain", "inputnode.skullstripped_t1"),
869-
("anat_mask", "inputnode.anat_mask")]),
872+
("anat_brain", "inputnode.skullstripped_t1")]),
870873
(anat_preproc_wf, surface_recon_wf, [
871874
("outputnode.anat_preproc", "inputnode.corrected_t1")]),
872875
(surface_recon_wf, outputnode, [

nibabies/workflows/anatomical/outputs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ def init_anat_derivatives_wf(
424424
# fmt:on
425425

426426
if num_t2w:
427-
428427
if not num_t1w:
429428
raw_sources = pe.Node(niu.Function(function=_bids_relative), name="t2w_raw_sources")
430429
raw_sources.inputs.bids_root = bids_root

0 commit comments

Comments
 (0)