Skip to content

Commit

Permalink
Drop T1w-space output as a surface Source.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Mar 29, 2024
1 parent 05dde4b commit 79eb79e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 37 deletions.
44 changes: 16 additions & 28 deletions fmriprep/workflows/bold/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,34 +514,22 @@ def init_bold_wf(
(bold_anat_wf, bold_surf_wf, [('outputnode.bold_file', 'inputnode.bold_t1w')]),
]) # fmt:skip

if nonstd_spaces.intersection(('anat', 'T1w')):
# Source file should be output T1w-space volumetric file and fsnative2t1w_xfm
merge_surface_sources = pe.Node(
niu.Merge(2),
name='merge_surface_sources',
run_without_submitting=True,
)
workflow.connect([
(ds_bold_t1_wf, merge_surface_sources, [('outputnode.bold', 'in1')]),
(inputnode, merge_surface_sources, [('fsnative2t1w_xfm', 'in2')]),
]) # fmt:skip
else:
# sources are bold_file, motion_xfm, boldref2anat_xfm, fsnative2t1w_xfm
merge_surface_sources = pe.Node(
niu.Merge(4),
name='merge_surface_sources',
run_without_submitting=True,
)
merge_surface_sources.inputs.in1 = bold_file
workflow.connect([
(bold_fit_wf, merge_surface_sources, [
('outputnode.motion_xfm', 'in2'),
('outputnode.boldref2anat_xfm', 'in3'),
]),
(inputnode, merge_surface_sources, [
('fsnative2t1w_xfm', 'in4'),
]),
]) # fmt:skip
# sources are bold_file, motion_xfm, boldref2anat_xfm, fsnative2t1w_xfm
merge_surface_sources = pe.Node(
niu.Merge(4),
name='merge_surface_sources',
run_without_submitting=True,
)
merge_surface_sources.inputs.in1 = bold_file
workflow.connect([
(bold_fit_wf, merge_surface_sources, [
('outputnode.motion_xfm', 'in2'),
('outputnode.boldref2anat_xfm', 'in3'),
]),
(inputnode, merge_surface_sources, [
('fsnative2t1w_xfm', 'in4'),
]),
]) # fmt:skip

workflow.connect([(merge_surface_sources, bold_surf_wf, [('out', 'inputnode.sources')])])

Expand Down
9 changes: 0 additions & 9 deletions fmriprep/workflows/bold/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,14 +746,6 @@ def init_ds_volumes_wf(
),
name='inputnode',
)
outputnode = pe.Node(
niu.IdentityInterface(
fields=[
'bold',
],
),
name='outputnode',
)

sources = pe.Node(
BIDSURI(
Expand Down Expand Up @@ -799,7 +791,6 @@ def init_ds_volumes_wf(
('resolution', 'resolution'),
]),
(sources, ds_bold, [('out', 'Sources')]),
(ds_bold, outputnode, [('out_file', 'bold')]),
]) # fmt:skip

resample_ref = pe.Node(
Expand Down

0 comments on commit 79eb79e

Please sign in to comment.