4
4
Processing pipeline details
5
5
===========================
6
6
7
- `` fmriprep `` adapts its pipeline depending on what data and metadata are
7
+ * fMRIPrep * adapts its pipeline depending on what data and metadata are
8
8
available and are used as the input.
9
9
For example, slice timing correction will be
10
10
performed only if the ``SliceTiming `` metadata field is found for the input
@@ -118,34 +118,35 @@ Once the brain mask is computed, FSL ``fast`` is utilized for brain tissue segme
118
118
Brain tissue segmentation.
119
119
120
120
121
- Finally, spatial normalization to MNI-space is performed using ANTs' ``antsRegistration ``
121
+ Finally, spatial normalization to standard spaces is performed using ANTs' ``antsRegistration ``
122
122
in a multiscale, mutual-information based, nonlinear registration scheme.
123
- In particular, spatial normalization is done using the `ICBM 2009c Nonlinear
124
- Asymmetric template (1×1×1mm) <http://nist.mni.mcgill.ca/?p=904> `_ [Fonov2011 ]_.
123
+ See `output_spaces `_ for information about how standard and nonstandard spaces can
124
+ be set to resample the preprocessed data onto the final output spaces.
125
+
125
126
126
127
.. figure :: _static/T1MNINormalization.svg
127
128
:scale: 100%
128
129
129
- Animation showing T1w to MNI normalization
130
+ Animation showing spatial normalization of T1w onto the `` MNI152NLin2009cAsym `` template.
130
131
131
132
Cost function masking during spatial normalization
132
133
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133
134
134
135
When processing images from patients with focal brain lesions (e.g. stroke, tumor
135
136
resection), it is possible to provide a lesion mask to be used during spatial
136
- normalization to MNI- space [Brett2001 ]_.
137
+ normalization to standard space [Brett2001 ]_.
137
138
ANTs will use this mask to minimize warping of healthy tissue into damaged
138
139
areas (or vice-versa).
139
140
Lesion masks should be binary NIfTI images (damaged areas = 1, everywhere else = 0)
140
141
in the same space and resolution as the T1 image, and follow the naming convention specified in
141
142
`BIDS Extension Proposal 3: Common Derivatives <https://docs.google.com/document/d/1Wwc4A6Mow4ZPPszDIWfCUCRNstn7d_zzaWPcfcHmgI4/edit#heading=h.9146wuepclkt >`_
142
143
(e.g. ``sub-001_T1w_label-lesion_roi.nii.gz ``).
143
144
This file should be placed in the ``sub-*/anat `` directory of the BIDS dataset
144
- to be run through `` fmriprep `` .
145
+ to be run through * fMRIPrep * .
145
146
Because lesion masks are not currently part of the BIDS specification, it is also necessary to
146
147
include a ``.bidsignore `` file in the root of your dataset directory. This will prevent
147
148
`bids-validator <https://github.com/bids-standard/bids-validator#bidsignore >`_ from complaining that your dataset not BIDS valid, which prevents
148
- `` fmriprep `` from running. Your ``.bidsignore `` file should include the following line::
149
+ * fMRIPrep * from running. Your ``.bidsignore `` file should include the following line::
149
150
150
151
*lesion_roi.nii.gz
151
152
@@ -159,7 +160,7 @@ aligned to the first image (determined lexicographically by session label).
159
160
For two images, the additional cost of estimating an unbiased template is
160
161
trivial and is the default behavior, but, for greater than two images, the cost
161
162
can be a slowdown of an order of magnitude.
162
- Therefore, in the case of three or more images, `` fmriprep `` constructs
163
+ Therefore, in the case of three or more images, * fMRIPrep * constructs
163
164
templates aligned to the first image, unless passed the ``--longitudinal ``
164
165
flag, which forces the estimation of an unbiased template.
165
166
@@ -186,17 +187,17 @@ Surface preprocessing
186
187
wf = init_surface_recon_wf(omp_nthreads=1,
187
188
hires=True)
188
189
189
- `` fmriprep `` uses FreeSurfer _ to reconstruct surfaces from T1w/T2w
190
+ * fMRIPrep * uses FreeSurfer _ to reconstruct surfaces from T1w/T2w
190
191
structural images.
191
- If enabled, several steps in the `` fmriprep `` pipeline are added or replaced.
192
+ If enabled, several steps in the * fMRIPrep * pipeline are added or replaced.
192
193
All surface preprocessing may be disabled with the ``--fs-no-reconall `` flag.
193
194
194
195
.. note ::
195
196
Surface processing will be skipped if the outputs already exist.
196
197
197
- In order to bypass reconstruction in `` fmriprep `` , place existing reconstructed
198
+ In order to bypass reconstruction in * fMRIPrep * , place existing reconstructed
198
199
subjects in ``<output dir>/freesurfer `` prior to the run.
199
- `` fmriprep `` will perform any missing ``recon-all `` steps, but will not perform
200
+ * fMRIPrep * will perform any missing ``recon-all `` steps, but will not perform
200
201
any steps whose outputs already exist.
201
202
202
203
@@ -258,7 +259,7 @@ will contain some innaccuracies including small amounts of MR signal from
258
259
outside the brain.
259
260
Based on the tissue segmentation of FreeSurfer (located in ``mri/aseg.mgz ``)
260
261
and only when the :ref: `Surface Processing <workflows_surface >` step has been
261
- executed, FMRIPREP replaces the brain mask with a refined one that derives
262
+ executed, * fMRIPrep * replaces the brain mask with a refined one that derives
262
263
from the ``aseg.mgz `` file as described in
263
264
:mod: `fmriprep.interfaces.freesurfer.grow_mask `.
264
265
@@ -468,8 +469,8 @@ If FreeSurfer processing is disabled, FSL ``flirt`` is run with the
468
469
After :abbr: `BBR ( boundary-based registration ) ` is run, the resulting affine transform will be compared to the initial transform found by FLIRT.
469
470
Excessive deviation will result in rejecting the BBR refinement and accepting the original, affine registration.
470
471
471
- EPI to MNI transformation
472
- ~~~~~~~~~~~~~~~~~~~~~~~~~
472
+ Resampling BOLD runs onto standard spaces
473
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
473
474
:mod: `fmriprep.workflows.bold.resampling.init_bold_std_trans_wf `
474
475
475
476
.. workflow ::
@@ -487,22 +488,17 @@ EPI to MNI transformation
487
488
488
489
This sub-workflow concatenates the transforms calculated upstream (see
489
490
`Head-motion estimation `_, `Susceptibility Distortion Correction (SDC) `_ --if
490
- fieldmaps are available--, `EPI to T1w registration `_, and a T1w -to-MNI
491
+ fieldmaps are available--, `EPI to T1w registration `_, and an anatomical -to-standard
491
492
transform from `T1w/T2w preprocessing `_) to map the :abbr: `EPI ( echo-planar imaging ) `
492
- image to standard MNI space.
493
- It also maps the T1w-based mask to MNI space.
493
+ image to the standard spaces given by the ``--output-spaces `` argument (see
494
+ `output_spaces `_.
495
+ It also maps the T1w-based mask to each of those standard spaces.
494
496
495
497
Transforms are concatenated and applied all at once, with one interpolation (Lanczos)
496
498
step, so as little information is lost as possible.
497
499
498
- The output space grid can be specified using the ``template_out_grid `` argument.
499
- This option accepts the following (``str ``) values:
500
-
501
- * ``'native' ``: the original resolution of the BOLD image will be used.
502
- * ``'1mm' ``: uses the 1:math: `\t imes`1:math: `\t imes`1 [mm] version of the template.
503
- * ``'2mm' ``: uses the 2:math: `\t imes`2:math: `\t imes`2 [mm] version of the template.
504
- * **Path to arbitrary reference file **: the output will be resampled on a grid with
505
- same resolution as this reference.
500
+ The output space grid can be specified using modifiers to the ``--output-spaces ``
501
+ argument.
506
502
507
503
508
504
EPI sampled to FreeSurfer surfaces
@@ -562,23 +558,25 @@ ICA-AROMA
562
558
~~~~~~~~~
563
559
:mod: `fmriprep.workflows.bold.confounds.init_ica_aroma_wf `
564
560
565
- When one of the `--output-spaces ` selected is in MNI space, ICA-AROMA denoising
566
- can be automatically appended to the workflow.
567
- The number of ICA-AROMA components depends on a dimensionality estimate made by MELODIC.
561
+ ICA-AROMA denoising is performed in ``MNI152NLin6Asym `` space, which is automatically
562
+ added to the list of ``--output-spaces `` if it was not already requested by the user.
563
+ The number of ICA-AROMA components depends on a dimensionality estimate made by
564
+ FSL MELODIC.
568
565
For datasets with a very short TR and a large number of timepoints, this may result
569
566
in an unusually high number of components.
570
567
By default, dimensionality is limited to a maximum of 200 components.
571
568
To override this upper limit one may specify the number of components to be extracted
572
569
with ``--aroma-melodic-dimensionality ``.
573
- Further details on the implementation are given within the workflow generation function (:mod: `fmriprep.workflows.bold.confounds.init_ica_aroma_wf `).
570
+ Further details on the implementation are given within the workflow generation
571
+ function (:mod: `fmriprep.workflows.bold.confounds.init_ica_aroma_wf `).
574
572
575
573
*Note *: *non *-aggressive AROMA denoising is a fundamentally different procedure
576
574
from its "aggressive" counterpart and cannot be performed only by using a set of noise
577
575
regressors (a separate GLM with both noise and signal regressors needs to be used).
578
- Therefore instead of regressors FMRIPREP produces *non *-aggressive denoised 4D NIFTI
576
+ Therefore instead of regressors, * fMRIPrep * produces *non *-aggressive denoised 4D NIFTI
579
577
files in the MNI space:
580
578
581
- ``*bold_space-MNI152NLin2009cAsym_variant -smoothAROMAnonaggr_brainmask.nii.gz ``
579
+ ``*bold_space-MNI152NLin6Asym -smoothAROMAnonaggr_brainmask.nii.gz ``
582
580
583
581
Additionally, the MELODIC mix and noise component indices will
584
582
be generated, so non-aggressive denoising can be manually performed in the T1w space with ``fsl_regfilt ``, *e.g. *::
0 commit comments