Skip to content

Commit b3223a6

Browse files
committed
Allow predefined goodvoxels_mask.
1 parent 6399bc0 commit b3223a6

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

fmriprep/workflows/bold/resampling.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -544,14 +544,22 @@ def init_bold_fsLR_resampling_wf(
544544
------
545545
bold_file : :class:`str`
546546
Path to BOLD file resampled into T1 space
547-
surfaces : :class:`list` of :class:`str`
548-
Path to left and right hemisphere white, pial and midthickness GIFTI surfaces
549-
morphometrics : :class:`list` of :class:`str`
550-
Path to left and right hemisphere morphometric GIFTI surfaces, which must include thickness
551-
sphere_reg_fsLR : :class:`list` of :class:`str`
552-
Path to left and right hemisphere sphere.reg GIFTI surfaces, mapping from subject to fsLR
553547
anat_ribbon : :class:`str`
554548
Path to mask of cortical ribbon in T1w space, for calculating goodvoxels
549+
white : :class:`list` of :class:`str`
550+
Path to left and right hemisphere white matter GIFTI surfaces.
551+
pial : :class:`list` of :class:`str`
552+
Path to left and right hemisphere pial GIFTI surfaces.
553+
midthickness : :class:`list` of :class:`str`
554+
Path to left and right hemisphere midthickness GIFTI surfaces.
555+
midthickness_fsLR : :class:`list` of :class:`str`
556+
Path to left and right hemisphere midthickness GIFTI surfaces in fsLR space.
557+
sphere_reg_fsLR : :class:`list` of :class:`str`
558+
Path to left and right hemisphere sphere.reg GIFTI surfaces, mapping from subject to fsLR
559+
cortex_mask : :class:`list` of :class:`str`
560+
Path to left and right hemisphere cortical masks.
561+
goodvoxels_mask : :class:`str` or Undefined
562+
Pre-calculated goodvoxels mask. Not required.
555563
556564
Outputs
557565
-------
@@ -565,14 +573,8 @@ def init_bold_fsLR_resampling_wf(
565573
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
566574
from niworkflows.interfaces.utility import KeySelect
567575
from smriprep import data as smriprep_data
568-
from smriprep.interfaces.workbench import SurfaceResample
569576

570-
from fmriprep.interfaces.gifti import CreateROI
571-
from fmriprep.interfaces.workbench import (
572-
MetricFillHoles,
573-
MetricRemoveIslands,
574-
VolumeToSurfaceMapping,
575-
)
577+
from fmriprep.interfaces.workbench import VolumeToSurfaceMapping
576578

577579
fslr_density = "32k" if grayord_density == "91k" else "59k"
578580

@@ -594,6 +596,7 @@ def init_bold_fsLR_resampling_wf(
594596
'midthickness_fsLR',
595597
'sphere_reg_fsLR',
596598
'cortex_mask',
599+
'goodvoxels_mask',
597600
]
598601
),
599602
name='inputnode',
@@ -733,6 +736,9 @@ def init_bold_fsLR_resampling_wf(
733736
("outputnode.goodvoxels_mask", "goodvoxels_mask"),
734737
]),
735738
]) # fmt:skip
739+
else:
740+
# Won't have any effect if goodvoxels_mask is Undefined.
741+
workflow.connect([(inputnode, volume_to_surface, ('goodvoxels_mask', 'volume_roi'))])
736742

737743
return workflow
738744

0 commit comments

Comments
 (0)