Skip to content

Commit

Permalink
enh: finalize with plotting a report
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Dec 4, 2020
1 parent 6b4e72a commit 55adb11
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
17 changes: 17 additions & 0 deletions dmriprep/config/reports-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@ sections:
all b=0 found in the dataset, after accounting for signal drift.
The red contour shows the brain mask calculated using this reference b=0.
subtitle: Reference b=0 and brain mask
- bids: {datatype: figures, desc: coreg, suffix: dwi}
caption: Diffusion-weighted data and anatomical data (EPI-space and T1w-space)
were aligned with <code>mri_coreg</code> (FreeSurfer).
WARNING - <code>bbregister</code> refinement rejected.
descriptions: Note that nearest-neighbor interpolation is used in this reportlet
in order to highlight potential slice Inhomogeneities and other artifacts, whereas
the final images are resampled using cubic B-Spline interpolation.
static: false
subtitle: Alignment of functional and anatomical MRI data (volume based)
- bids: {datatype: figures, desc: bbregister, suffix: dwi}
caption: Diffusion-weighted data and anatomical data (EPI-space and T1w-space)
were aligned with <code>bbregister</code> (FreeSurfer).
descriptions: Note that nearest-neighbor interpolation is used in this reportlet
in order to highlight potential slice Inhomogeneities and other artifacts, whereas
the final images are resampled using cubic B-Spline interpolation.
static: false
subtitle: Alignment of functional and anatomical MRI data (surface driven)
- name: About
reportlets:
- bids: {datatype: figures, desc: about, suffix: T1w}
13 changes: 13 additions & 0 deletions dmriprep/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,21 @@ def init_single_subject_wf(subject_id):
t1w_brain = pe.Node(ApplyMask(), name="t1w_brain")

bbr_wf = init_bbreg_wf(
bold2t1w_dof=6,
bold2t1w_init=config.workflow.dwi2t1w_init,
omp_nthreads=config.nipype.omp_nthreads,
use_bbr=True,
)

ds_report_reg = pe.Node(
DerivativesDataSink(base_directory=str(output_dir), datatype="figures",),
name="ds_report_reg",
run_without_submitting=True,
)

def _bold_reg_suffix(fallback):
return "coreg" if fallback else "bbregister"

# fmt:off
workflow.connect([
# T1w Mask
Expand All @@ -383,6 +393,9 @@ def init_single_subject_wf(subject_id):
(anat_preproc_wf, bbr_wf, [
("outputnode.fsnative2t1w_xfm", "inputnode.fsnative2t1w_xfm")
]),
(bbr_wf, ds_report_reg, [
('outputnode.out_report', 'in_file'),
(('outputnode.fallback', _bold_reg_suffix), 'desc')]),
])
# fmt:on

Expand Down

0 comments on commit 55adb11

Please sign in to comment.