@@ -74,8 +74,8 @@ def init_bold_surf_wf(
74
74
FreeSurfer subject ID
75
75
t1w2fsnative_xfm
76
76
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
79
79
t1w_mask
80
80
Mask of the skull-stripped T1w image
81
81
@@ -296,10 +296,38 @@ def select_target(subject_id, space):
296
296
297
297
return workflow
298
298
299
- return workflow
300
-
301
299
302
300
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
+ """
303
331
workflow = pe .Workflow (name = name )
304
332
305
333
inputnode = pe .Node (
@@ -540,43 +568,6 @@ def _calc_lower_thr(in_stats):
540
568
]
541
569
)
542
570
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
- )
580
571
return workflow
581
572
582
573
0 commit comments