From cc4fb342a71649d5e0d7911156eb54631728db1e Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 12 Dec 2024 21:26:56 -0500 Subject: [PATCH] fix: Restore init_resample_midthickness_wf for backwards compatibility --- src/smriprep/workflows/surfaces.py | 46 ++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/src/smriprep/workflows/surfaces.py b/src/smriprep/workflows/surfaces.py index 55730596ca..53aa94ad09 100644 --- a/src/smriprep/workflows/surfaces.py +++ b/src/smriprep/workflows/surfaces.py @@ -1316,13 +1316,55 @@ def init_anat_ribbon_wf(name='anat_ribbon_wf'): return workflow +def init_resample_midthickness_wf( + grayord_density: ty.Literal['91k', '170k'], + name: str = 'resample_midthickness_wf', +): + """ + Resample subject midthickness surface to specified density. + + Workflow Graph + .. workflow:: + :graph2use: colored + :simple_form: yes + + from smriprep.workflows.surfaces import init_resample_midthickness_wf + wf = init_resample_midthickness_wf(grayord_density='91k') + + Parameters + ---------- + grayord_density : :class:`str` + Either `91k` or `170k`, representing the total of vertices or *grayordinates*. + name : :class:`str` + Unique name for the subworkflow (default: ``"resample_midthickness_wf"``) + + Inputs + ------ + midthickness + Left and right GIFTIs for midthickness surface + sphere_reg_fsLR + GIFTI surface mesh corresponding to the subject's fsLR registration sphere + + Outputs + ------- + midthickness + Left and right GIFTI surface mesh corresponding to the midthickness surface, + resampled to fsLR + """ + return init_resample_surfaces_wf( + surfaces=['midthickness'], + grayord_density=grayord_density, + name=name, + ) + + def init_resample_surfaces_wf( surfaces: list[str], grayord_density: ty.Literal['91k', '170k'], name: str = 'resample_surfaces_wf', ): """ - Resample subject surfaces surface to specified density. + Resample subject surfaces to specified density. Workflow Graph .. workflow:: @@ -1353,7 +1395,7 @@ def init_resample_surfaces_wf( Outputs ------- - ```` + ``_fsLR`` Left and right GIFTI surface mesh corresponding to the input surface, resampled to fsLR """ import templateflow.api as tf