Skip to content

Commit 56de253

Browse files
committed
fix: typos, more refs to BIDS specs, acronyms, etc.
1 parent dc9cdb9 commit 56de253

File tree

1 file changed

+47
-27
lines changed

1 file changed

+47
-27
lines changed

docs/methods.rst

Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,27 @@ the problem of susceptibility distortions (SD) into two stages:
88
discovered and preprocessed to estimate a map of B\ :sub:`0` non-uniformity in Hz (:math:`\Delta B_0`).
99
The theory behind these distortions is well described in the literature [Jezzard1995]_ [Hutton2002]_ (Fig. 1).
1010
*SDCFlows* builds on freely-available software to implement three major strategies for estimating
11-
:math:`\Delta B_0` (Eq. 1).
12-
These strategies are described below, and implemented within :py:mod:`sdcflows.fit`\ .
11+
:math:`\Delta B_0` (Eq. :math:`\eqref{eq:fieldmap-1}`).
12+
These strategies are described below, and implemented within :py:mod:`sdcflows.workflows.fit`\ .
1313

1414
#. **Application**:
1515
the B-Spline basis coefficients used to represent the estimated :math:`\Delta B_0` map mapped into the
16-
target EPI scan to be corrected, and a displacement field in NIfTI format that is compatible with ANTs
17-
is interpolated from the B-Spline basis.
18-
The voxel location error along the PE will be proportional to :math:`\Delta B_0 \cdot T_\text{ro}`,
19-
where :math:`T_\text{ro}` is the *total readout time* of the target EPI (Fig. 1).
16+
target :abbr:`EPI (echo-planar imaging)` scan to be corrected, and a displacement field in NIfTI
17+
format that is compatible with ANTs is interpolated from the B-Spline basis.
18+
The voxel location error along the :abbr:`PE (phase-encoding)` will be proportional to :math:`\Delta B_0 \cdot T_\text{ro}`,
19+
where :math:`T_\text{ro}` is the *total readout time* of the target :abbr:`EPI (echo-planar imaging)` (Fig. 1).
20+
The implementation of these workflows is found in the submodule :py:mod:`sdcflows.workflows.apply`\ .
21+
22+
.. figure:: _static/sdcflows-OHBM21-fig1.png
23+
:width: 100%
24+
:align: center
25+
26+
**Figure 1**. Susceptibility distortions in a nutshell
27+
28+
.. admonition:: BIDS Specification
29+
30+
See the section `Echo-planar imaging and *B0* mapping
31+
<https://bids-specification.readthedocs.io/en/latest/04-modality-specific-files/01-magnetic-resonance-imaging-data.html#echo-planar-imaging-and-b0-mapping>`__.
2032

2133
Fieldmap estimation: theory and methods
2234
---------------------------------------
@@ -29,29 +41,25 @@ can be derived from Eq. (2) of [Hutton2002]_:
2941
\label{eq:fieldmap-1}\tag{1}
3042
3143
where
32-
:math:`\Delta_\text{PE} (i, j, k)` is the *voxel-shift map* (VSM) along the *PE* direction,
44+
:math:`\Delta_\text{PE} (i, j, k)` is the *voxel-shift map* (VSM) along the :abbr:`PE (phase-encoding)` direction,
3345
:math:`\gamma` is the gyromagnetic ratio of the H proton in Hz/T
3446
(:math:`\gamma = 42.576 \cdot 10^6 \, \text{Hz} \cdot \text{T}^\text{-1}`),
3547
:math:`\Delta B_0 (i, j, k)` is the *fieldmap variation* in T (Tesla), and
36-
:math:`T_\text{ro}` is the readout time of one slice of the EPI dataset
48+
:math:`T_\text{ro}` is the readout time of one slice of the :abbr:`EPI (echo-planar imaging)` dataset
3749
we want to correct for distortions.
3850

3951
Let :math:`V` represent the *fieldmap* in Hz (or equivalently,
4052
*voxel-shift-velocity map*, as Hz are equivalent to voxels/s), with
4153
:math:`V(i,j,k) = \gamma \cdot \Delta B_0 (i, j, k)`, then, introducing
4254
the voxel zoom along the phase-encoding direction, :math:`s_\text{PE}`,
4355
we obtain the nonzero component of the associated displacements field
44-
:math:`\Delta D_\text{PE} (i, j, k)` that unwarps the target EPI dataset:
56+
:math:`\Delta D_\text{PE} (i, j, k)` that unwarps the target :abbr:`EPI (echo-planar imaging)` dataset:
4557

4658
.. math::
4759
4860
\Delta D_\text{PE} (i, j, k) = V(i, j, k) \cdot T_\text{ro} \cdot s_\text{PE}.
4961
\label{eq:fieldmap-2}\tag{2}
5062
51-
.. image:: _static/sdcflows-OHBM21-fig1.png
52-
:width: 100%
53-
:align: center
54-
5563
.. _sdc_direct_b0 :
5664

5765
Direct B0 mapping sequences
@@ -84,7 +92,7 @@ Phase-difference B0 estimation
8492

8593
The fieldmap variation in T, :math:`\Delta B_0 (i, j, k)`, that is necessary to obtain
8694
:math:`\Delta_\text{PE} (i, j, k)` in Eq. :math:`\eqref{eq:fieldmap-1}` can be
87-
calculated from two subsequient :abbr:`GRE (Gradient-Recalled Echo)` echoes,
95+
calculated from two subsequent :abbr:`GRE (Gradient-Recalled Echo)` echoes,
8896
via eq. (1) of [Hutton2002]_:
8997

9098
.. math::
@@ -117,11 +125,11 @@ continuously smooth with its neighbors (*phase-unwrapping*, [Jenkinson2003]_).
117125
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
118126
.. admonition:: BIDS Specification
119127

120-
See `this section of the BIDS specification
121-
<https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/01-magnetic-resonance-imaging-data.html#case-4-multiple-phase-encoded-directions-pepolar>`__.
128+
See the section `Types of fieldmaps - Case 4: Multiple phase encoded directions ("pepolar")
129+
<https://bids-specification.readthedocs.io/en/latest/04-modality-specific-files/01-magnetic-resonance-imaging-data.html#case-4-multiple-phase-encoded-directions-pepolar>`__.
122130

123131
Alternatively, it is possible to estimate the field by exploiting the symmetry of the
124-
distortion when the PE polarity is reversed.
132+
distortion when the :abbr:`PE (phase-encoding)` polarity is reversed.
125133
*SDCFlows* integrates two implementations based on FSL ``topup`` [Andersson2003]_,
126134
and AFNI ``3dQwarp`` [Cox1997]_.
127135
By default, FSL ``topup`` will be used.
@@ -149,16 +157,18 @@ The implementation is a variation on those developed in [Huntenburg2014]_ and
149157
[Wang2017]_.
150158

151159
The process is divided in two steps.
152-
First, the two images to be aligned (anatomical and one or more EPI sources) are prepared for
153-
registration, including a linear pre-alignment of both, calculation of a 3D EPI *reference* map,
160+
First, the two images to be aligned (anatomical and one or more :abbr:`EPI (echo-planar imaging)` sources) are prepared for
161+
registration, including a linear pre-alignment of both, calculation of a 3D :abbr:`EPI (echo-planar imaging)` *reference* map,
154162
intensity/histogram enhancement, and *deobliquing* (meaning, for images where the physical
155163
coordinates axes and the data array axes are not aligned, the physical coordinates are
156164
rotated to align with the data array).
157-
Such a preprocessing is implemented in :py:func:`init_syn_preprocessing_wf`.
158-
Second, the outputs of the preprocessing workflow are fed into :py:func:`init_syn_sdc_wf`,
165+
Such a preprocessing is implemented in
166+
:py:func:`~sdcflows.workflows.fit.syn.init_syn_preprocessing_wf`.
167+
Second, the outputs of the preprocessing workflow are fed into
168+
:py:func:`~sdcflows.workflows.fit.syn.init_syn_sdc_wf`,
159169
which executes the nonlinear, SyN registration.
160170
To aid the *Mattes* mutual information cost function, the registration scheme is set up
161-
in *multi-channel* mode, and laplacian-filtered derivatives of both anatomical and EPI
171+
in *multi-channel* mode, and laplacian-filtered derivatives of both anatomical and :abbr:`EPI (echo-planar imaging)`
162172
reference are introduced as a second registration channel.
163173
The optimization gradients of the registration process are weighted, so that deformations
164174
effectively possible only along the :abbr:`PE (phase-encoding)` axis.
@@ -168,7 +178,7 @@ The anatomical image is used as *fixed image*, and therefore, the registration p
168178
estimates the transformation function from *unwarped* (anatomically *correct*) coordinates
169179
to *distorted* coordinates.
170180
If fed into ``antsApplyTransforms``, the resulting transform will effectively *unwarp* a distorted
171-
EPI given as input into its *unwarped* mapping.
181+
:abbr:`EPI (echo-planar imaging)` given as input into its *unwarped* mapping.
172182
The estimated transform is then converted into a :math:`B_0` fieldmap in Hz, which can be
173183
stored within the derivatives folder.
174184

@@ -186,7 +196,7 @@ surfaces onto the distorted :abbr:`EPI (echo-planar imaging)` data [Esteban2016]
186196

187197
Estimation tooling
188198
~~~~~~~~~~~~~~~~~~
189-
The workflows provided by :py:mod:`sdcflows.fit` make use of several utilities.
199+
The workflows provided by :py:mod:`sdcflows.workflows.fit` make use of several utilities.
190200
The cornerstone of these tools is the fieldmap representation with B-Splines
191201
(:py:mod:`sdcflows.interfaces.bspline`).
192202
B-Splines are well-suited to plausibly smooth the fieldmap and provide a compact
@@ -198,7 +208,7 @@ updated and then the fieldmap reconstructed.
198208

199209
Unwarping the distorted data
200210
----------------------------
201-
:py:mod:`sdcflows.apply` contains workflows to project fieldmaps represented by B-Spline
211+
:py:mod:`sdcflows.workflows.apply` contains workflows to project fieldmaps represented by B-Spline
202212
basis into the space of the target :abbr:`EPI (echo-planar imaging)` data.
203213

204214
Discovering fieldmaps in a BIDS dataset
@@ -208,11 +218,21 @@ To ease the implementation of higher-level pipelines integrating :abbr:`SDC (sus
208218

209219
Explicit specification with ``B0FieldIdentifier``
210220
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
221+
.. admonition:: BIDS Specification
222+
223+
See the section `Expressing the MR protocol intent for fieldmaps - Using *B0FieldIdentifier* metadata
224+
<https://bids-specification.readthedocs.io/en/latest/04-modality-specific-files/01-magnetic-resonance-imaging-data.html#using-b0fieldidentifier-metadata>`__.
225+
211226
If one or more ``B0FieldIdentifier``\ (s) are set within the input metadata (following BIDS' specifications),
212227
then corresponding estimators will be built from the available input data.
213228

214229
Implicit specification with ``IntendedFor``
215230
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
231+
.. admonition:: BIDS Specification
232+
233+
See the section `Expressing the MR protocol intent for fieldmaps - Using *IntendedFor* metadata
234+
<https://bids-specification.readthedocs.io/en/latest/04-modality-specific-files/01-magnetic-resonance-imaging-data.html#using-intendedfor-metadata>`__.
235+
216236
In the case no ``B0FieldIdentifier``\ (s) are defined, then *SDCFlows* will try to identify as many fieldmap
217237
estimators as possible within the dataset following a set of heuristics.
218238
Then, those estimators may be linked to target :abbr:`EPI (echo-planar imaging)` data by interpreting the
@@ -221,7 +241,7 @@ Then, those estimators may be linked to target :abbr:`EPI (echo-planar imaging)`
221241
Fieldmap-less by registration to a T1-weighted image
222242
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
223243
If none of the two previous options yielded any workable estimation strategy, and provided that
224-
the argument ``fmapless`` is set to ``True``, then :py:func:`sdcflows.utils.wrangler.find_estimators`
244+
the argument ``fmapless`` is set to ``True``, then :py:func:`~sdcflows.utils.wrangler.find_estimators`
225245
will attempt to find :abbr:`BOLD (blood-oxygen level-dependent)` or :abbr:`DWI (diffusion-weighted imaging)`
226246
instances within single sessions that are consistent in :abbr:`PE (phase-encoding)` direction and
227247
*total readout time*, assuming they have been acquired with the same shimming settings.
@@ -231,7 +251,7 @@ If one or more anatomical images are found, and if the search for candidate
231251
yields results, then corresponding fieldmap-less estimators are set up.
232252

233253
It is possible to force the fieldmap-less estimation by passing ``force_fmapless=True`` to the
234-
:py:func:`sdcflows.utils.wrangler.find_estimators` utility.
254+
:py:func:`~sdcflows.utils.wrangler.find_estimators` utility.
235255

236256
References
237257
----------

0 commit comments

Comments
 (0)