Skip to content

Commit 0fa8ef1

Browse files
authored
Merge pull request #1886 from oesteban/rf/new-sdcflows-api
ENH: Upgrade SDCFlows to new API (1.0.0rc1)
2 parents 4c8e835 + 9f14aba commit 0fa8ef1

File tree

8 files changed

+217
-103
lines changed

8 files changed

+217
-103
lines changed

docs/sdc.rst

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,3 @@ References
9595
Correction for geometric distortion in echo planar images from B0
9696
field variations Magn. Reson. Med., 34 (1) (1995), pp. 65-73,
9797
doi:`10.1002/mrm.1910340111 <https://doi.org/10.1002/mrm.1910340111>`_.
98-
99-
.. [Hutton2002] Hutton et al., Image Distortion Correction in fMRI: A Quantitative
100-
Evaluation, NeuroImage 16(1):217-240, 2002. doi:`10.1006/nimg.2001.1054
101-
<https://doi.org/10.1006/nimg.2001.1054>`_.
102-
103-
.. [Huntenburg2014] Huntenburg, J. M. (2014) Evaluating Nonlinear
104-
Coregistration of BOLD EPI and T1w Images. Berlin: Master
105-
Thesis, Freie Universität. `PDF
106-
<http://pubman.mpdl.mpg.de/pubman/item/escidoc:2327525:5/component/escidoc:2327523/master_thesis_huntenburg_4686947.pdf>`_.
107-
108-
.. [Treiber2016] Treiber, J. M. et al. (2016) Characterization and Correction
109-
of Geometric Distortions in 814 Diffusion Weighted Images,
110-
PLoS ONE 11(3): e0152472. doi:`10.1371/journal.pone.0152472
111-
<https://doi.org/10.1371/journal.pone.0152472>`_.
112-
113-
.. [Wang2017] Wang S, et al. (2017) Evaluation of Field Map and Nonlinear
114-
Registration Methods for Correction of Susceptibility Artifacts
115-
in Diffusion MRI. Front. Neuroinform. 11:17.
116-
doi:`10.3389/fninf.2017.00017
117-
<https://doi.org/10.3389/fninf.2017.00017>`_.
118-

fmriprep/cli/run.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,9 @@ def main():
489489

490490
# Generate reports phase
491491
failed_reports = generate_reports(
492-
subject_list, output_dir, work_dir, run_uuid, packagename='fmriprep')
492+
subject_list, output_dir, work_dir, run_uuid,
493+
config=pkgrf('fmriprep', 'data/reports-spec.yml'),
494+
packagename='fmriprep')
493495
write_derivative_description(bids_dir, output_dir / 'fmriprep')
494496

495497
if failed_reports and not opts.notrack:
@@ -638,12 +640,15 @@ def build_workflow(opts, retval):
638640

639641
# Called with reports only
640642
if opts.reports_only:
643+
from pkg_resources import resource_filename as pkgrf
644+
641645
build_log.log(25, 'Running --reports-only on participants %s', ', '.join(subject_list))
642646
if opts.run_uuid is not None:
643647
run_uuid = opts.run_uuid
644648
retval['run_uuid'] = run_uuid
645649
retval['return_code'] = generate_reports(
646650
subject_list, output_dir, work_dir, run_uuid,
651+
config=pkgrf('fmriprep', 'data/reports-spec.yml'),
647652
packagename='fmriprep')
648653
return retval
649654

fmriprep/data/reports-spec.yml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
package: niworkflows
2+
sections:
3+
- name: Summary
4+
reportlets:
5+
- bids: {datatype: anat, desc: summary, suffix: T1w}
6+
- name: Anatomical
7+
reportlets:
8+
- bids:
9+
datatype: anat
10+
desc: conform
11+
extension: [.html]
12+
suffix: T1w
13+
- bids: {datatype: anat, suffix: dseg}
14+
caption: This panel shows the template T1-weighted image (if several T1w images
15+
were found), with contours delineating the detected brain mask and brain tissue
16+
segmentations.
17+
subtitle: Brain mask and brain tissue segmentation of the T1w
18+
- bids: {datatype: anat, space: .*, suffix: T1w, regex_search: True}
19+
caption: Spatial normalization of the T1w image to the <code>{space}</code> template.
20+
description: Results of nonlinear alignment of the T1w reference one or more template
21+
space(s). Hover on the panels with the mouse pointer to transition between both
22+
spaces.
23+
static: false
24+
subtitle: Spatial normalization of the anatomical T1w reference
25+
- bids: {datatype: anat, 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+
- name: Functional
30+
ordering: session,task,run
31+
reportlets:
32+
- bids: {datatype: func, desc: summary, suffix: bold}
33+
- bids: {datatype: func, desc: validation, suffix: bold}
34+
- bids: {datatype: func, desc: fieldmap, suffix: bold}
35+
caption: The estimated fieldmap was aligned to the corresponding EPI reference
36+
with a rigid-registration process of the magintude part of the fieldmap,
37+
using <code>antsRegistration</code>.
38+
Overlaid on top of the co-registration results, the displacements along the
39+
phase-encoding direction are represented in arbitrary units.
40+
Please note that the color scale is centered around zero (i.e. full transparency),
41+
but the extremes might be different (i.e., the maximum of red colors could be
42+
orders of magnitude above or below the minimum of blue colors.)
43+
static: false
44+
subtitle: Estimated fieldmap and alignment to the corresponding EPI reference
45+
- bids: {datatype: func, desc: sdc, suffix: bold}
46+
caption: Results of performing susceptibility distortion correction (SDC) on the
47+
EPI
48+
static: false
49+
subtitle: Susceptibility distortion correction
50+
- bids: {datatype: func, desc: forcedsyn, suffix: bold}
51+
caption: The dataset contained some fieldmap information, but the argument <code>--force-syn</code>
52+
was used. The higher-priority SDC method was used. Here, we show the results
53+
of performing SyN-based SDC on the EPI for comparison.
54+
static: false
55+
subtitle: Experimental fieldmap-less susceptibility distortion correction
56+
- bids: {datatype: func, desc: flirtnobbr, suffix: bold}
57+
caption: FSL <code>flirt</code> was used to generate transformations from EPI
58+
space to T1 Space - BBR refinement rejected. Note that Nearest Neighbor interpolation
59+
is used in the reportlets in order to highlight potential spin-history and other
60+
artifacts, whereas final images are resampled using Lanczos interpolation.
61+
static: false
62+
subtitle: Alignment of functional and anatomical MRI data (volume based)
63+
- bids: {datatype: func, desc: coreg, suffix: bold}
64+
caption: <code>mri_coreg</code> (FreeSurfer) was used to generate transformations
65+
from EPI space to T1 Space - <code>bbregister</code> refinement rejected. Note
66+
that Nearest Neighbor interpolation is used in the reportlets in order to highlight
67+
potential spin-history and other artifacts, whereas final images are resampled
68+
using Lanczos interpolation.
69+
static: false
70+
subtitle: Alignment of functional and anatomical MRI data (volume based)
71+
- bids: {datatype: func, desc: flirtbbr, suffix: bold}
72+
caption: FSL <code>flirt</code> was used to generate transformations from EPI-space
73+
to T1w-space - The white matter mask calculated with FSL <code>fast</code> (brain
74+
tissue segmentation) was used for BBR. Note that Nearest Neighbor interpolation
75+
is used in the reportlets in order to highlight potential spin-history and other
76+
artifacts, whereas final images are resampled using Lanczos interpolation.
77+
static: false
78+
subtitle: Alignment of functional and anatomical MRI data (surface driven)
79+
- bids: {datatype: func, desc: bbregister, suffix: bold}
80+
caption: <code>bbregister</code> was used to generate transformations from EPI-space
81+
to T1w-space. Note that Nearest Neighbor interpolation is used in the reportlets
82+
in order to highlight potential spin-history and other artifacts, whereas final
83+
images are resampled using Lanczos interpolation.
84+
static: false
85+
subtitle: Alignment of functional and anatomical MRI data (surface driven)
86+
- bids: {datatype: func, desc: rois, suffix: bold}
87+
caption: Brain mask calculated on the BOLD signal (red contour), along with the
88+
masks used for a/tCompCor.<br />The aCompCor mask (magenta contour) is a conservative
89+
CSF and white-matter mask for extracting physiological and movement confounds.
90+
<br />The fCompCor mask (blue contour) contains the top 5% most variable voxels
91+
within a heavily-eroded brain-mask.
92+
subtitle: Brain mask and (temporal/anatomical) CompCor ROIs
93+
- bids:
94+
datatype: func
95+
desc: '[at]compcor'
96+
extension: [.html]
97+
suffix: bold
98+
- bids: {datatype: func, desc: 'compcorvar', suffix: bold}
99+
caption: The cumulative variance explained by the first k components of the
100+
<em>t/aCompCor</em> decomposition, plotted for all values of <em>k</em>.
101+
The number of components that must be included in the model in order to
102+
explain some fraction of variance in the decomposition mask can be used
103+
as a feature selection criterion for confound regression.
104+
subtitle: Variance explained by t/aCompCor components
105+
- bids: {datatype: func, desc: carpetplot, suffix: bold}
106+
caption: Summary statistics are plotted, which may reveal trends or artifacts
107+
in the BOLD data. Global signals calculated within the whole-brain (GS), within
108+
the white-matter (WM) and within cerebro-spinal fluid (CSF) show the mean BOLD
109+
signal in their corresponding masks. DVARS and FD show the standardized DVARS
110+
and framewise-displacement measures for each time point.<br />A carpet plot
111+
shows the time series for all voxels within the brain mask. Voxels are grouped
112+
into cortical (blue), and subcortical (orange) gray matter, cerebellum (green)
113+
and white matter and CSF (red), indicated by the color map on the left-hand
114+
side.
115+
subtitle: BOLD Summary
116+
- bids: {datatype: func, desc: 'confoundcorr', suffix: bold}
117+
caption: |
118+
Left: Heatmap summarizing the correlation structure among confound variables.
119+
(Cosine bases and PCA-derived CompCor components are inherently orthogonal.)
120+
Right: magnitude of the correlation between each confound time series and the
121+
mean global signal. Strong correlations might be indicative of partial volume
122+
effects and can inform decisions about feature orthogonalization prior to
123+
confound regression.
124+
subtitle: Correlations among nuisance regressors
125+
- bids: {datatype: func, desc: aroma, suffix: bold}
126+
caption: |
127+
Maps created with maximum intensity projection (glass brain) with a
128+
black brain outline. Right hand side of each map: time series (top in seconds),
129+
frequency spectrum (bottom in Hertz). Components classified as signal are plotted
130+
in green; noise components in red.
131+
subtitle: ICA Components classified by AROMA
132+
- name: About
133+
reportlets:
134+
- bids: {datatype: anat, desc: about, suffix: T1w}

0 commit comments

Comments
 (0)