Skip to content

Commit e90299a

Browse files
committed
doc: MNI -> standard space, stylistic changes.
1 parent 926e4bf commit e90299a

File tree

3 files changed

+35
-35
lines changed

3 files changed

+35
-35
lines changed

docs/usage.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Command-Line Arguments
3838
:nodefaultconst:
3939

4040

41+
.. _output_spaces:
42+
4143
Defining standard and nonstandard spaces where data will be resampled
4244
=====================================================================
4345

docs/workflows.rst

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Processing pipeline details
55
===========================
66

7-
``fmriprep`` adapts its pipeline depending on what data and metadata are
7+
*fMRIPrep* adapts its pipeline depending on what data and metadata are
88
available and are used as the input.
99
For example, slice timing correction will be
1010
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
118118
Brain tissue segmentation.
119119

120120

121-
Finally, spatial normalization to MNI-space is performed using ANTs' ``antsRegistration``
121+
Finally, spatial normalization to standard spaces is performed using ANTs' ``antsRegistration``
122122
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+
125126

126127
.. figure:: _static/T1MNINormalization.svg
127128
:scale: 100%
128129

129-
Animation showing T1w to MNI normalization
130+
Animation showing spatial normalization of T1w onto the ``MNI152NLin2009cAsym`` template.
130131

131132
Cost function masking during spatial normalization
132133
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133134

134135
When processing images from patients with focal brain lesions (e.g. stroke, tumor
135136
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]_.
137138
ANTs will use this mask to minimize warping of healthy tissue into damaged
138139
areas (or vice-versa).
139140
Lesion masks should be binary NIfTI images (damaged areas = 1, everywhere else = 0)
140141
in the same space and resolution as the T1 image, and follow the naming convention specified in
141142
`BIDS Extension Proposal 3: Common Derivatives <https://docs.google.com/document/d/1Wwc4A6Mow4ZPPszDIWfCUCRNstn7d_zzaWPcfcHmgI4/edit#heading=h.9146wuepclkt>`_
142143
(e.g. ``sub-001_T1w_label-lesion_roi.nii.gz``).
143144
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*.
145146
Because lesion masks are not currently part of the BIDS specification, it is also necessary to
146147
include a ``.bidsignore`` file in the root of your dataset directory. This will prevent
147148
`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::
149150

150151
*lesion_roi.nii.gz
151152
@@ -159,7 +160,7 @@ aligned to the first image (determined lexicographically by session label).
159160
For two images, the additional cost of estimating an unbiased template is
160161
trivial and is the default behavior, but, for greater than two images, the cost
161162
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
163164
templates aligned to the first image, unless passed the ``--longitudinal``
164165
flag, which forces the estimation of an unbiased template.
165166

@@ -186,17 +187,17 @@ Surface preprocessing
186187
wf = init_surface_recon_wf(omp_nthreads=1,
187188
hires=True)
188189

189-
``fmriprep`` uses FreeSurfer_ to reconstruct surfaces from T1w/T2w
190+
*fMRIPrep* uses FreeSurfer_ to reconstruct surfaces from T1w/T2w
190191
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.
192193
All surface preprocessing may be disabled with the ``--fs-no-reconall`` flag.
193194

194195
.. note::
195196
Surface processing will be skipped if the outputs already exist.
196197

197-
In order to bypass reconstruction in ``fmriprep``, place existing reconstructed
198+
In order to bypass reconstruction in *fMRIPrep*, place existing reconstructed
198199
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
200201
any steps whose outputs already exist.
201202

202203

@@ -258,7 +259,7 @@ will contain some innaccuracies including small amounts of MR signal from
258259
outside the brain.
259260
Based on the tissue segmentation of FreeSurfer (located in ``mri/aseg.mgz``)
260261
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
262263
from the ``aseg.mgz`` file as described in
263264
:mod:`fmriprep.interfaces.freesurfer.grow_mask`.
264265

@@ -468,8 +469,8 @@ If FreeSurfer processing is disabled, FSL ``flirt`` is run with the
468469
After :abbr:`BBR (boundary-based registration)` is run, the resulting affine transform will be compared to the initial transform found by FLIRT.
469470
Excessive deviation will result in rejecting the BBR refinement and accepting the original, affine registration.
470471

471-
EPI to MNI transformation
472-
~~~~~~~~~~~~~~~~~~~~~~~~~
472+
Resampling BOLD runs onto standard spaces
473+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
473474
:mod:`fmriprep.workflows.bold.resampling.init_bold_std_trans_wf`
474475

475476
.. workflow::
@@ -487,22 +488,17 @@ EPI to MNI transformation
487488

488489
This sub-workflow concatenates the transforms calculated upstream (see
489490
`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
491492
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.
494496

495497
Transforms are concatenated and applied all at once, with one interpolation (Lanczos)
496498
step, so as little information is lost as possible.
497499

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:`\times`1:math:`\times`1 [mm] version of the template.
503-
* ``'2mm'``: uses the 2:math:`\times`2:math:`\times`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.
506502

507503

508504
EPI sampled to FreeSurfer surfaces
@@ -562,23 +558,25 @@ ICA-AROMA
562558
~~~~~~~~~
563559
:mod:`fmriprep.workflows.bold.confounds.init_ica_aroma_wf`
564560

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.
568565
For datasets with a very short TR and a large number of timepoints, this may result
569566
in an unusually high number of components.
570567
By default, dimensionality is limited to a maximum of 200 components.
571568
To override this upper limit one may specify the number of components to be extracted
572569
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`).
574572

575573
*Note*: *non*-aggressive AROMA denoising is a fundamentally different procedure
576574
from its "aggressive" counterpart and cannot be performed only by using a set of noise
577575
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
579577
files in the MNI space:
580578

581-
``*bold_space-MNI152NLin2009cAsym_variant-smoothAROMAnonaggr_brainmask.nii.gz``
579+
``*bold_space-MNI152NLin6Asym-smoothAROMAnonaggr_brainmask.nii.gz``
582580

583581
Additionally, the MELODIC mix and noise component indices will
584582
be generated, so non-aggressive denoising can be manually performed in the T1w space with ``fsl_regfilt``, *e.g.*::

fmriprep/workflows/bold/resampling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ def init_bold_std_trans_wf(
177177
use_fieldwarp=False
178178
):
179179
"""
180-
This workflow samples functional images to the MNI template in a "single shot"
181-
from the original BOLD series.
180+
This workflow samples functional images into standard space with a single
181+
resampling of the original BOLD series.
182182
183183
.. workflow::
184184
:graph2use: colored

0 commit comments

Comments
 (0)