Skip to content

Commit bc1a7a1

Browse files
committed
FIX: resampling.py: removed unused connect_bold_surf_wf, update docstrings
1 parent 3c49e66 commit bc1a7a1

File tree

1 file changed

+32
-41
lines changed

1 file changed

+32
-41
lines changed

nibabies/workflows/bold/resampling.py

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def init_bold_surf_wf(
7474
FreeSurfer subject ID
7575
t1w2fsnative_xfm
7676
LTA-style affine matrix translating from T1w to FreeSurfer-conformed subject space
77-
anat_giftis
78-
GIFTI anatomical surfaces in T1w space
77+
anat_ribbon
78+
Cortical ribbon in T1w space
7979
t1w_mask
8080
Mask of the skull-stripped T1w image
8181
@@ -296,10 +296,38 @@ def select_target(subject_id, space):
296296

297297
return workflow
298298

299-
return workflow
300-
301299

302300
def init_goodvoxels_bold_mask_wf(mem_gb, name="goodvoxels_bold_mask_wf"):
301+
"""
302+
Workflow Graph
303+
.. workflow::
304+
:graph2use: colored
305+
:simple_form: yes
306+
307+
from nibabies.workflows.bold import init_goodvoxels_mask_wf
308+
wf = init_goodvoxels_mask_wf(mem_gb=0.1)
309+
310+
Parameters
311+
----------
312+
mem_gb : :obj:`float`
313+
Size of BOLD file in GB
314+
name : :obj:`str`
315+
Name of workflow (default: ``goodvoxels_bold_mask_wf``)
316+
317+
Inputs
318+
------
319+
anat_ribbon
320+
Cortical ribbon in T1w space
321+
bold_file
322+
Motion-corrected BOLD series in T1w space
323+
324+
Outputs
325+
-------
326+
masked_bold
327+
BOLD series after masking outlier voxels with locally high COV
328+
goodvoxels_ribbon
329+
Cortical ribbon mask excluding voxels with locally high COV
330+
"""
303331
workflow = pe.Workflow(name=name)
304332

305333
inputnode = pe.Node(
@@ -540,43 +568,6 @@ def _calc_lower_thr(in_stats):
540568
]
541569
)
542570

543-
return workflow # , apply_goodvoxels_ribbon_mask
544-
545-
546-
def connect_bold_surf_wf(
547-
workflow,
548-
inputnode,
549-
outputnode,
550-
get_fsnative,
551-
itersource,
552-
targets,
553-
rename_src,
554-
sampler,
555-
itk2lta,
556-
update_metadata,
557-
apply_goodvoxels_or_rename,
558-
):
559-
workflow.connect(
560-
[
561-
(
562-
inputnode,
563-
get_fsnative,
564-
[("subject_id", "subject_id"), ("subjects_dir", "subjects_dir")],
565-
),
566-
(inputnode, targets, [("subject_id", "subject_id")]),
567-
(inputnode, rename_src, [("source_file", "in_file")]),
568-
(inputnode, itk2lta, [("source_file", "src_file"), ("t1w2fsnative_xfm", "in_file")]),
569-
(get_fsnative, itk2lta, [("brain", "dst_file")]), # InfantFS: Use brain instead of T1
570-
(inputnode, sampler, [("subjects_dir", "subjects_dir"), ("subject_id", "subject_id")]),
571-
(itersource, targets, [("target", "space")]),
572-
(itersource, rename_src, [("target", "subject")]),
573-
(itk2lta, sampler, [("out", "reg_file")]),
574-
(targets, sampler, [("out", "target_subject")]),
575-
(apply_goodvoxels_or_rename, sampler, [("out_file", "source_file")]),
576-
(update_metadata, outputnode, [("out_file", "surfaces")]),
577-
(itersource, outputnode, [("target", "target")]),
578-
]
579-
)
580571
return workflow
581572

582573

0 commit comments

Comments
 (0)