Skip to content

Commit cd45f0e

Browse files
authored
DOC: Improve report captions and update expected outputs in docs (#3137)
This PR focuses on non-fasttrack reports. If issues are found in the fasttrack versions, we can deal with them after the alpha.
2 parents 052c056 + 314fbec commit cd45f0e

File tree

4 files changed

+96
-39
lines changed

4 files changed

+96
-39
lines changed

docs/outputs.rst

Lines changed: 81 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,16 @@ If FreeSurfer reconstructions are used, the following surface files are generate
131131

132132
sub-<subject_label>/
133133
anat/
134-
sub-<subject_label>_hemi-[LR]_smoothwm.surf.gii
135-
sub-<subject_label>_hemi-[LR]_pial.surf.gii
134+
sub-<subject_label>_hemi-[LR]_white.surf.gii
136135
sub-<subject_label>_hemi-[LR]_midthickness.surf.gii
137-
sub-<subject_label>_hemi-[LR]_inflated.surf.gii
136+
sub-<subject_label>_hemi-[LR]_pial.surf.gii
137+
sub-<subject_label>_hemi-[LR]_desc-reg_sphere.surf.gii
138+
sub-<subject_label>_hemi-[LR]_space-fsLR_desc-reg_sphere.surf.gii
139+
sub-<subject_label>_hemi-[LR]_space-fsLR_desc-msmsulc_sphere.surf.gii
140+
141+
The registration spheres target ``fsaverage`` and ``fsLR`` spaces. If MSM
142+
is enabled (i.e., the ``--no-msm`` flag is not passed), then the ``msmsulc``
143+
spheres are generated and used for creating ``space-fsLR`` derivatives.
138144

139145
And the affine translation (and inverse) between the original T1w sampling and FreeSurfer's
140146
conformed space for surface reconstruction (``fsnative``) is stored in::
@@ -144,6 +150,27 @@ conformed space for surface reconstruction (``fsnative``) is stored in::
144150
sub-<subject_label>_from-fsnative_to-T1w_mode-image_xfm.txt
145151
sub-<subject_label>_from-T1w_to-fsnative_mode-image_xfm.txt
146152

153+
Finally, cortical thickness, curvature, and sulcal depth maps are converted to GIFTI
154+
and CIFTI-2::
155+
156+
sub-<subject_label>/
157+
anat/
158+
sub-<subject_label>_hemi-[LR]_thickness.shape.gii
159+
sub-<subject_label>_hemi-[LR]_curv.shape.gii
160+
sub-<subject_label>_hemi-[LR]_sulc.shape.gii
161+
sub-<subject_label>_space-fsLR_den-32k_thickness.dscalar.nii
162+
sub-<subject_label>_space-fsLR_den-32k_curv.dscalar.nii
163+
sub-<subject_label>_space-fsLR_den-32k_sulc.dscalar.nii
164+
165+
.. warning::
166+
167+
GIFTI metric files follow the FreeSurfer conventions and are not modified
168+
by *fMRIPrep* in any way.
169+
170+
The Human Connectome Project (HCP) inverts the sign of the curvature and
171+
sulcal depth maps. For consistency with HCP, *fMRIPrep* follows these
172+
conventions and masks the medial wall of CIFTI-2 dscalar files.
173+
147174
.. _fsderivs:
148175

149176
FreeSurfer derivatives
@@ -187,16 +214,63 @@ these will be indicated with ``[specifiers]``::
187214

188215
sub-<subject_label>/
189216
func/
190-
sub-<subject_label>_[specifiers]_space-<space_label>_boldref.nii.gz
191217
sub-<subject_label>_[specifiers]_space-<space_label>_desc-brain_mask.nii.gz
192218
sub-<subject_label>_[specifiers]_space-<space_label>_desc-preproc_bold.nii.gz
193219

194-
Additionally, the following transforms are saved::
220+
.. note::
221+
222+
The mask file is part of the *minimal* processing level. The BOLD series
223+
is only generated at the *full* processing level.
224+
225+
**Motion correction outputs**.
226+
227+
Head-motion correction (HMC) produces a reference image to which all volumes
228+
are aligned, and a corresponding transform that maps the original BOLD series
229+
to the reference image::
230+
231+
sub-<subject_label>/
232+
func/
233+
sub-<subject_label>_[specifiers]_desc-hmc_boldref.nii.gz
234+
sub-<subject_label>_[specifiers]_from-orig_to_boldref_mode-image_desc-hmc_xfm.nii.gz
235+
236+
.. note::
237+
238+
Motion correction outputs are part of the *minimal* processing level.
239+
240+
**Coregistration outputs**.
241+
242+
Registration of the BOLD series to the T1w image generates a further reference
243+
image and affine transform::
195244

196245
sub-<subject_label>/
197246
func/
198-
sub-<subject_label>_[specifiers]_from-scanner_to-T1w_mode-image_xfm.txt
199-
sub-<subject_label>_[specifiers]_from-T1w_to-scanner_mode-image_xfm.txt
247+
sub-<subject_label>_[specifiers]_desc-coreg_boldref.nii.gz
248+
sub-<subject_label>_[specifiers]_from-boldref_to-T1w_mode-image_desc-coreg_xfm.txt
249+
250+
.. note::
251+
252+
Coregistration outputs are part of the *minimal* processing level.
253+
254+
**Fieldmap registration**.
255+
256+
If a fieldmap is used for the correction of a BOLD series, then a registration
257+
is calculated between the BOLD series and the fieldmap. If, for example, the fieldmap
258+
is identified with ``"B0Identifier": "TOPUP"``, the generated transform will be named::
259+
260+
sub-<subject_label>/
261+
func/
262+
sub-<subject_label>_[specifiers]_from-boldref_to-TOPUP_mode-image_xfm.nii.gz
263+
264+
If the association is discovered through the ``IntendedFor`` field of the
265+
fieldmap metadata, then the transform will be given an auto-generated name::
266+
267+
sub-<subject_label>/
268+
func/
269+
sub-<subject_label>_[specifiers]_from-boldref_to-auto000XX_mode-image_xfm.txt
270+
271+
.. note::
272+
273+
Fieldmap registration outputs are part of the *minimal* processing level.
200274

201275
**Regularly gridded outputs (images)**.
202276
Volumetric output spaces labels (``<space_label>`` above, and in the following) include

fmriprep/data/reports-spec.yml

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ sections:
8282
Overlaid on top of the co-registration results, the final BOLD mask is represented
8383
with a red contour for reference.
8484
static: false
85-
subtitle: Alignment between the anatomical reference of the fieldmap and the target EPI (debug mode)
85+
subtitle: Alignment between the anatomical reference of the fieldmap and the target EPI
8686
- bids: {datatype: figures, desc: fieldmap, suffix: bold}
8787
caption: Estimated fieldmap, as reconstructed on the target BOLD run space to allow
8888
the assessment of its alignment with the distorted data.
@@ -97,7 +97,9 @@ sections:
9797
subtitle: "Reconstructed <em>B<sub>0</sub></em> map in the corresponding run's space (debug mode)"
9898
- bids: {datatype: figures, desc: sdc, suffix: bold}
9999
caption: Results of performing susceptibility distortion correction (SDC) on the
100-
EPI
100+
BOLD reference image. The "distorted" image is the image that would be used to
101+
align to the anatomical reference if SDC were not applied. The "corrected"
102+
image is the image that was used.
101103
static: false
102104
subtitle: Susceptibility distortion correction
103105
- bids: {datatype: figures, desc: forcedsyn, suffix: bold}
@@ -118,37 +120,15 @@ sections:
118120
appear in the 100ms bin.
119121
static: false
120122
subtitle: T2* gray-matter values
121-
- bids: {datatype: figures, desc: flirtnobbr, suffix: bold}
122-
caption: <code>mri_coreg</code> (FreeSurfer) was used to generate transformations
123-
from EPI space to T1 Space - BBR refinement using FSL <code>flirt</code> rejected.
124-
Note that Nearest Neighbor interpolation is used in the reportlets in order to
125-
highlight potential spin-history and other artifacts, whereas final images are
126-
resampled using Lanczos interpolation.
127-
static: false
128-
subtitle: Alignment of functional and anatomical MRI data (volume based)
129123
- bids: {datatype: figures, desc: coreg, suffix: bold}
130-
caption: <code>mri_coreg</code> (FreeSurfer) was used to generate transformations
131-
from EPI space to T1 Space - <code>bbregister</code> refinement rejected. Note
132-
that Nearest Neighbor interpolation is used in the reportlets in order to highlight
133-
potential spin-history and other artifacts, whereas final images are resampled
134-
using Lanczos interpolation.
135-
static: false
136-
subtitle: Alignment of functional and anatomical MRI data (volume based)
137-
- bids: {datatype: figures, desc: flirtbbr, suffix: bold}
138-
caption: FSL <code>flirt</code> was used to generate transformations from EPI-space
139-
to T1w-space - The white matter mask calculated with FSL <code>fast</code> (brain
140-
tissue segmentation) was used for BBR. Note that Nearest Neighbor interpolation
141-
is used in the reportlets in order to highlight potential spin-history and other
142-
artifacts, whereas final images are resampled using Lanczos interpolation.
143-
static: false
144-
subtitle: Alignment of functional and anatomical MRI data (surface driven)
145-
- bids: {datatype: figures, desc: bbregister, suffix: bold}
146-
caption: <code>bbregister</code> was used to generate transformations from EPI-space
147-
to T1w-space. Note that Nearest Neighbor interpolation is used in the reportlets
148-
in order to highlight potential spin-history and other artifacts, whereas final
149-
images are resampled using Lanczos interpolation.
124+
caption: This panel shows the alignment of the reference EPI (BOLD) image to the
125+
anatomical (T1-weighted) image.
126+
The reference EPI has been contrast enhanced and susceptibility-distortion
127+
corrected (if applicable) for improved anatomical fidelity.
128+
The anatomical image has been resampled into EPI space, as well as the
129+
anatomical white matter mask, which appears as a red contour.
150130
static: false
151-
subtitle: Alignment of functional and anatomical MRI data (surface driven)
131+
subtitle: Alignment of functional and anatomical MRI data (coregistration)
152132
- bids: {datatype: figures, desc: rois, suffix: bold}
153133
caption: Brain mask calculated on the BOLD signal (red contour), along with the
154134
regions of interest (ROIs) used for the estimation of physiological and movement

fmriprep/workflows/bold/fit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ def init_bold_fit_wf(
354354
]),
355355
(outputnode, func_fit_reports_wf, [
356356
("coreg_boldref", "inputnode.coreg_boldref"),
357+
("bold_mask", "inputnode.bold_mask"),
357358
("boldref2anat_xfm", "inputnode.boldref2anat_xfm"),
358359
]),
359360
(summary, func_fit_reports_wf, [("out_report", "inputnode.summary_report")]),

fmriprep/workflows/bold/outputs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ def init_func_fit_reports_wf(
195195
"source_file",
196196
"sdc_boldref",
197197
"coreg_boldref",
198+
"bold_mask",
198199
"boldref2anat_xfm",
199200
"boldref2fmap_xfm",
200201
"t1w_preproc",
@@ -368,7 +369,8 @@ def init_func_fit_reports_wf(
368369
]),
369370
(inputnode, sdcreg_report, [
370371
('sdc_boldref', 'reference'),
371-
('fieldmap', 'fieldmap')
372+
('fieldmap', 'fieldmap'),
373+
('bold_mask', 'mask'),
372374
]),
373375
(fmapref_boldref, sdcreg_report, [('output_image', 'moving')]),
374376
(inputnode, ds_sdcreg_report, [('source_file', 'source_file')]),

0 commit comments

Comments
 (0)