Skip to content

Commit

Permalink
fix(report): Resample fieldmap for plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 24, 2024
1 parent 1248b63 commit 7868b64
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions fmriprep/workflows/bold/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,26 @@ def init_func_fit_reports_wf(
mem_gb=1,
)

fmap_boldref = pe.Node(
ApplyTransforms(
dimension=3,
default_value=0,
float=True,
invert_transform_flags=[True],
interpolation='LanczosWindowedSinc',
),
name='fmap_boldref',
mem_gb=1,
)

# SDC1
sdcreg_report = pe.Node(
FieldmapReportlet(
reference_label='BOLD reference',
moving_label='Fieldmap reference',
show='both',
),
name='sdecreg_report',
name='sdcreg_report',
mem_gb=0.1,
)

Expand Down Expand Up @@ -360,19 +372,23 @@ def init_func_fit_reports_wf(
name='ds_sdc_report',
)

# fmt:off
workflow.connect([
(inputnode, fmapref_boldref, [
('fmap_ref', 'input_image'),
('coreg_boldref', 'reference_image'),
('boldref2fmap_xfm', 'transforms'),
]),
(inputnode, fmap_boldref, [
('fieldmap', 'input_image'),
('coreg_boldref', 'reference_image'),
('boldref2fmap_xfm', 'transforms'),
]),
(inputnode, sdcreg_report, [
('sdc_boldref', 'reference'),
('fieldmap', 'fieldmap'),
('bold_mask', 'mask'),
]),
(fmapref_boldref, sdcreg_report, [('output_image', 'moving')]),
(fmap_boldref, sdcreg_report, [('output_image', 'fieldmap')]),
(inputnode, ds_sdcreg_report, [('source_file', 'source_file')]),
(sdcreg_report, ds_sdcreg_report, [('out_report', 'in_file')]),
(inputnode, sdc_report, [
Expand All @@ -382,8 +398,7 @@ def init_func_fit_reports_wf(
(boldref_wm, sdc_report, [('output_image', 'wm_seg')]),
(inputnode, ds_sdc_report, [('source_file', 'source_file')]),
(sdc_report, ds_sdc_report, [('out_report', 'in_file')]),
])
# fmt:on
]) # fmt:skip

# EPI-T1 registration
# Resample T1w image onto EPI-space
Expand Down

0 comments on commit 7868b64

Please sign in to comment.