Skip to content

Commit 90ea339

Browse files
committed
ENH: Generate separate reportlet for each reconstruction method
1 parent a399235 commit 90ea339

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

nibabies/data/reports-spec.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,17 @@ sections:
2323
static: false
2424
subtitle: Spatial normalization of the anatomical T1w reference
2525
- bids: {datatype: figures, desc: reconall, suffix: T1w}
26+
caption: Surfaces (white and pial) reconstructed with FreeSurfer (<code>recon-all</code>)
27+
overlaid on the participant's T1w template.
28+
subtitle: Surface reconstruction
29+
- bids: {datatype: figures, desc: infantfs, suffix: T1w}
2630
caption: Surfaces (white and pial) reconstructed with FreeSurfer (<code>infant_recon_all</code>)
2731
overlaid on the participant's T1w template.
2832
subtitle: Surface reconstruction
33+
- bids: {datatype: figures, desc: mcribs, suffix: T2w}
34+
caption: Surfaces (white and pial) reconstructed with M-CRIB-S (<code>MCRIBReconAll</code>)
35+
overlaid on the participant's T2w template.
36+
subtitle: Surface reconstruction
2937

3038
- name: <em>B<sub>0</sub></em> field mapping
3139
ordering: session,acquisition,run,fmapid

nibabies/workflows/anatomical/outputs.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,25 +233,29 @@ def init_anat_reports_wf(
233233
if not surface_recon:
234234
return workflow
235235

236-
# TODO: Separate report for MCRIBS?
237236
from smriprep.interfaces.reports import FSSurfaceReport
238237

239238
recon_report = pe.Node(FSSurfaceReport(), name="recon_report")
240239
recon_report.interface._always_run = True
241240

241+
if surface_recon == "freesurfer":
242+
recon_desc = "reconall"
243+
elif surface_recon == "infantfs":
244+
recon_desc = "infantfs"
245+
elif surface_recon == "mcribs":
246+
recon_desc = "mcribs"
247+
242248
ds_recon_report = pe.Node(
243-
DerivativesDataSink(base_directory=output_dir, desc="reconall", datatype="figures"),
249+
DerivativesDataSink(base_directory=output_dir, desc=recon_desc, datatype="figures"),
244250
name="ds_recon_report",
245251
run_without_submitting=True,
246252
)
247-
# fmt: off
248253
workflow.connect([
249254
(inputnode, recon_report, [('subjects_dir', 'subjects_dir'),
250255
('subject_id', 'subject_id')]),
251256
(recon_report, ds_recon_report, [('out_report', 'in_file')]),
252257
(inputnode, ds_recon_report, [('source_file', 'source_file')])
253-
])
254-
# fmt: on
258+
]) # fmt: skip
255259

256260
return workflow
257261

0 commit comments

Comments
 (0)