Skip to content

Commit 7e85ecb

Browse files
sarenseeleycelprov
authored andcommitted
doc : convert to markdown the "How To Read fMRIPrep Visual report"
started by Saren
1 parent 43e3013 commit 7e85ecb

File tree

3 files changed

+186
-0
lines changed

3 files changed

+186
-0
lines changed
67.6 KB
Loading
38.7 KB
Loading
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
# How To Read fMRIPrep visual Report
2+
3+
fMRIPrep generates HTML visual reports that allow you to check the results of the preprocessing steps that were applied to the data.
4+
Note: this is not a replacement for running quality control of your images before running fMRIPrep (FAQ link: https://fmriprep.readthedocs.io/en/stable/faq.html)
5+
Below is a guide to interpreting the information contained in the visual reports, organized by subsection of the report.
6+
7+
If you have examples of “bad” preprocessing results that you’re willing to share, please [submit them somewhere?] with a short description of the problem (for example, “bad skull stripping”).
8+
9+
When you open a report, it may be helpful to first jump to the [Errors subsection](LINK) to see whether fMRIPrep encountered any errors during preprocessing. Note that “errors” refers only to problems in running fMRIPrep, and NOT problems with the quality of the resulting images. This section won’t flag participants in which fMRIPrep was able to successfully run to completion but yielded poor results.
10+
11+
## **Summary**
12+
13+
The first section of the report is a text summary, containing the subject ID, number of structural and functional images, task name, output spaces in which fMRIPrep generated your preprocessed data, and whether surface reconstruction with Freesurfer was run.
14+
It is good to check that all of this information is as expected.
15+
16+
## **Anatomical**
17+
18+
The reports first present results of anatomical preprocessing.
19+
20+
### Anatomical conformation
21+
22+
* This section provides information about the structural images.
23+
* Check for obvious failures, such as missing images or implausible values for voxel size, orientation, or dimensions.
24+
* For example: you’re expecting two input T1w images but it says “Input T1w images: 1”
25+
26+
### Brain mask and brain tissue segmentation of the T1w
27+
28+
The brain mask report shows the quality of intensity non-uniformity (INU) correction, skull stripping, and tissue segmentation.
29+
* Good:
30+
* The brain mask (red) covers the whole brain and only the brain - not the dura or anything else outside the brain. It should closely follow the contour of the brain.
31+
* The outlines of the gray matter (magenta) and white matter (blue) segmentation are correctly drawn. The blue line should follow the boundary between gray and white matter, while the magenta line should outline ventricles.
32+
33+
* Bad:
34+
* Intensity non-uniformity artifacts (looks like the “original image” panel in the figure below):
35+
36+
![inu](../assets/fmriprep_visual_report/inu.png)
37+
*from Vovk, U., Pernus, F., & Likar, B. (2007). A review of methods for correction of intensity inhomogeneity in MRI. IEEE transactions on medical imaging, 26(3), 405-421.*
38+
39+
40+
* Skull-stripping failed leading to an inaccurate brain mask
41+
* The brain mask cuts off part of the brain and/or contains holes surrounding signal drop-out regions.
42+
* The brain mask includes parts that are clearly NOT brain.
43+
44+
* For example, fMRIPrep might have misclassified part of the dura, epidural space, or skull as belonging inside the brain mask.
45+
46+
* The gray matter (magenta)/white matter (blue) outlines don’t match where those tissue classes are distributed in the underlying image.
47+
48+
* Common pitfalls in interpretation:
49+
* At the inter-hemispheric space, masks (and in particular the brain mask, despite its smooth edges) may intersect the visualization plane several times, giving the impression that the mask is cutting off brain regions. However, this is more of a visual effect on the cutting plane.
50+
51+
52+
### Spatial normalization of the anatomical T1w reference
53+
54+
The normalization report shows how successfully your T1w image(s) were resampled into standard space, for each of the template spaces used.
55+
* Good:
56+
* Your T1w image and the template image line up well when you toggle between the images (hover mouse over the panel):
57+
* The standard templates provided with fMRIPrep (such as `MNI152NLin2009cAsym`) are averaged across multiple subjects, so the template image will look blurrier than the T1w image. Because of this averaging, it is normal for sulci to be less pronounced and gyri to be wider on the template than the T1w image.
58+
59+
* Bad:
60+
* Stretching or distortion in the participant’s T1w image, indicating failed normalization.
61+
* If skull-stripping was not successful, you might see some places where there are non-brain voxels outside of the contours of the brain.
62+
63+
64+
### Surface reconstruction
65+
66+
If you used the `--fs-no-reconall` flag to skip surface-based preprocessing, this section of the report will not exist.
67+
The FreeSurfer [fischl2012] [1] subject reconstruction report shows the white matter (blue outline) and pial (red outline) surfaces overlaid on the T1w image.
68+
* Good:
69+
* The white-gray boundary outlined (blue link) matches the underlying image.
70+
* White matter and pial surface boundary outlines do not cross or overlap each other.
71+
72+
* Bad:
73+
* The white-gray boundary outline (blue line) does not correspond well to the boundary observed in the underlying image.
74+
* White matter and pial surface boundaries cross or overlap each other.
75+
* Pial surface (red outline) extends past the actual pial boundary (see images [here](https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/PialEdits_tktools) for an example ; this can be a result of bad skull-stripping).
76+
77+
* Common pitfalls in interpretation:
78+
* Note that cerebellum and brainstem are excluded from the surface reconstruction in fMRIPrep; it is thus normal that the outlines do not include these areas.
79+
80+
## **Functional**
81+
82+
### Textual summary
83+
84+
* The BOLD summary describes the interpretation of the inputs by fMRIPrep, and the applied heuristics. For instance, if the dataset is multi-echo EPI and comprehends three or more echos, then fMRIPrep should indicate this in the BOLD summary.
85+
86+
* Other potential issues are missing images or implausible values.
87+
* Functional data can vary based on available data, metadata, user selections.
88+
* What does “Heuristics - BBR may fall back to volume-based coregistration” mean?
89+
In fMRIPrep’s workflow, if boundary-based registration fails (meaning that `bbr` distorts the affine registration more than 15mm), fMRIPrep reverts to using the initial affine transform from Freesurfer’s `mri_coreg` tool instead of using the bbr refinement of the initial transform ([relevant code](https://github.com/poldracklab/fmriprep/pull/694/files#diff-939042e0a10e509ce5708c3e112376ffR29))
90+
“Note on orientation: qform matrix overwritten/ this data has been copied from sform/sform matrix set” warnings
91+
`qform` and `sform` refer to metadata fields in the NIfTI file header, prescribing a coordinate system for the image.
92+
This message warns you that information in the header was altered during the preprocessing.
93+
This is an advisory message and does not necessarily indicate issues in data quality or registration.
94+
A common scenario is that the sform code was 0, so fMRIPrep copied the code from qform in order to keep the affine matrices aligned, ensuring that the images will be treated as having the same orientation later down the pipeline.
95+
See Chris Markewicz’s Neurostars posts [here](https://neurostars.org/t/note-on-orientation-qform-and-sform-warning/4379/4) and [here](https://neurostars.org/t/note-on-orientation-sform-matrix-set/5939) for a longer explanation of when/why fMRIPrep produces these warnings.
96+
You can read more about how `qform` and `sform` work at the following links: [Recommended usage of qform and sform](https://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/nifti1fields_pages/qsform_brief_usage) and [Nifti Qform and Sform](http://gru.stanford.edu/doku.php/mrTools/coordinateTransforms).
97+
98+
### Susceptibility distortion correction
99+
100+
* `--use-syn-sdc`
101+
* `--force-syn`
102+
* `--ignore fieldmaps`
103+
104+
The functional images can have some warping or distortion due to inhomogeneities in the magnetic field. (fMRIPrep has several options to try to estimate the displacement map)[https://fmriprep.readthedocs.io/en/stable/sdc.html], based either on command-line arguments or automatic selection based on the available data).
105+
This section of the report shows the participant’s functional images before and after distortion correction, with the GM/WM boundary from the anatomical images overlaid as reference.
106+
* Good:
107+
* The distortion-corrected (or “after”) image shows improved alignment between the brain and the GM/WM boundary, compared to the “before” image.
108+
* The shape of the brain in the distortion-corrected image is not .
109+
110+
* Bad:
111+
* Alignment between the brain and the GM/WM boundary is worse in the “after” compared to the “before” image.
112+
* The brain in the “after” image looks more distorted, stretched, smeared or otherwise misshapen, indicating that distortion correction was not successful.
113+
114+
### Alignment of functional and anatomical data
115+
116+
The text tells you which method fMRIPrep used to align the functional and anatomical data - for example, by running `bbregis
117+
ter`. The images show the registered BOLD reference with the white and pial surfaces overlaid (red and blue lines)
118+
* Good:
119+
* The BOLD and T1w images are aligned; image boundaries and anatomical landmarks (for example, ventricles; corpus callosum) appear to be in the same place when toggling between the images.
120+
* White and pial surface outlines (red and blue lines) appear to correspond well to the tissue boundaries in the functional images.
121+
122+
* Bad:
123+
* Functional and anatomical images are not aligned and clearly differ in their spatial location or orientation.
124+
* White and pial surface boundaries (red and blue lines) overlays correspond poorly to the tissue boundaries in the underlying images.
125+
* Some drop out in inferior brain regions (such as the OFC or medial temporal lobe) in functional images is somewhat inevitable. Depending on the type of analysis you’re doing and what you’re interested in, this may be more/less of an issue for you. If you see a lot of signal drop out, you will probably want to check the mask generated by fMRIPrep to see how that drop-out impacts the location and quantity of missing voxels in your mask.
126+
127+
* Note that the BOLD images displayed in the report may have what appears to be an “artifact” in the data, as shown below. This is because the reports use a faster but less precise type of interpolation (Nearest Neighbor interpolation) for display. In actuality, fMRIPrep uses Lanczos interpolation for resampling, so these apparent “artifacts” are not present in the actual data (you can confirm this by checking the preprocessed BOLD NIFTI file and its registration to the T1w image in your preferred software).
128+
129+
![segmentation](../assets/fmriprep_visual_report/segmentation.png)
130+
131+
### Brain mask and temporal/anatomical CompCor ROIs
132+
133+
BOLD brain mask with the aCompCor and tCompCor masks
134+
The aCompCor mask (magenta outline) is a conservative CSF and white-matter mask for extracting physiological and movement confounds.
135+
The tCompCor mask (blue outline) contains the top 5% most variable voxels within a heavily-eroded brain-mask.
136+
* Good:
137+
138+
* Bad:
139+
140+
### Variance explained by t/a CompCor components
141+
142+
Explained in more depth by <https://fmriprep.readthedocs.io/en/stable/outputs.html#confounds-and-carpet-plot-on-the-visual-reports> but may be useful to duplicate some of this information here?
143+
144+
### BOLD summary
145+
146+
The BOLD summary report shows several characteristic statistics along with a carpetplot (Power, 2016), giving a view of the temporal characteristics of the preprocessed BOLD series.
147+
* Good:
148+
* Bad:
149+
Note on how variance and scaling affects this display? (in other words, spikes are relative to other datapoints in the timeseries)
150+
* Definitions:
151+
* GS
152+
* GSCSF
153+
* GSWM
154+
* DVARS
155+
* *standardized DVARS!* <https://neurostars.org/t/fmriprep-standardised-dvars/5271>
156+
* FD
157+
158+
### Correlations among nuisance regressors
159+
160+
This may also be addressed in more depth by the confounds and regressors documentation (link to page)
161+
Can be used to diagnose partial volume effects
162+
PVE indicated by high correlations of a confound time series (or several) with the global signal
163+
164+
### ICA-AROMA
165+
What you’re looking at:
166+
* Glass brain
167+
* Map with time on the top and frequency on the bottom
168+
* 1) the spatial map, 2) the time course, and 3) the power spectrum of the time c
169+
* Artifact components (red) should have more high-frequency noise whereas signal components (green) should have their peak in the lower-frequency range
170+
* Artifacts you might see:
171+
* Multi-band artifacts in ICA-AROMA: <https://neurostars.org/t/potential-issue-in-ica-aroma-report/4231>
172+
* Note on ICA-AROMA and multiband data
173+
* Slice-timing artifacts in ICA-AROMA: <https://neurostars.org/t/potential-issue-in-ica-aroma-report/4231/6>
174+
* Link to documentation on confounds: <https://fmriprep.readthedocs.io/en/stable/outputs.html#confounds>
175+
176+
## About
177+
178+
## Methods
179+
180+
## Errors
181+
182+
This section tells you whether fMRIPrep encountered any problems during the preprocessing. Note that “errors” refers only to problems in running fMRIPrep, and NOT problems with the quality of the resulting images. This section won’t flag participants in which fMRIPrep was able to successfully run to completion but yielded poor results, or in which the input data was of lower-than-desirable quality.
183+
184+
## Things that aren’t an issue:
185+
* “Missing” [not visualized] slices
186+
* In the report visualizations that display a panel of slices, sometimes it will appear as though there is a slice missing - for example, nothing is shown for x = -12. This is a problem with the visualization and does NOT indicate the slice is missing from the actual data. You can try reloading the report, or opening it with Chrome if you’re using another browser, as well as using your preferred NIFTI viewer to check the data.

0 commit comments

Comments
 (0)