**The diffusion tensor model**

A l order tensor models the dependence between diffusion measures and the
diffusivity of water molecules [1]_. Specifically, the diffusion tensor is
the covarience matrix of the displacement of water molecules.
Recall that a l order tensor is an l dimensional array which includes the scalar
(l=0), the vector (l=1) and the matrices (l=2).

If we denote :math:`\vec{g}=[g_1,g_2,g_3]` the measure direction, the
Stejskal Tanner can be generalized as follows:

.. math::

    S(\vec{g}) = S_0 exp \left( -b \sum_{i_1=1}^3 \sum_{i_2=1}^3 . . .
                 \sum_{i_l=1}^3 d_{i_1,i_2,...i_l} g_{i_1} g_{i_2} . . .
                 g_{i_l}  \right)

where :math:`d_{i_1,i_2,...i_l}` is the l order tensor components.
The diffusion profile represented by this tensor can be written as follows:


.. math::

    d(\vec{g}) = \sum_{i_1=1}^3 \sum_{i_2=1}^3 . . .
                 \sum_{i_l=1}^3 d_{i_1,i_2,...i_l} g_{i_1} g_{i_2} . . .
                 g_{i_l}

Without imposing any restriction on this profile, it is possible to write the
following equation:

.. math::

    d(-\vec{g}) = \left\{
                          \begin{array}{ll}
                           d(\vec{g}) & \qquad \mathrm{si} \quad l \ pair \\
                          -d(\vec{g}) & \qquad \mathrm{si} \quad l \ impair \\
                          \end{array}
                  \right.

But if we accept the second sub-case (l odd), we allow negative diffusion values
which is do not fulfill the undelying physics and do not respect the
radial symmetry property of the diffusion process. Thus, only even-order tensor
are allowed.

A l order tensor in 3 dimensions is composed of :math:`3^l` elements. The full
symmetry property associated with a diffusion tensor reduces the number of
independent components. This property comes from the fact that a diffusion
tensor has to link the different components of a vector to the same scalar
:math:`d(\vec{g})`. For instance, when l=2 we have:

.. math::

    d(\vec{g}) &= \sum_{i_1=1}^3 \sum_{i_2=1}^3 d_{i_1,i_2} g_{i_1} g_{i_2} = 
                  \sum_{i_1=1}^3 \sum_{i_2=1}^3 d_{i_1,i_2} g_{i_2} g_{i_1} \nonumber \\
               &= \sum_{i_2=1}^3 \sum_{i_1=1}^3 d_{i_2,i_1} g_{i_1} g_{i_2} =
                  \sum_{i_1=1}^3 \sum_{i_2=1}^3 d_{i_2,i_1} g_{i_1} g_{i_2}

This relation implies :math:`d_{i_1,i_2}=d_{i_2,i_1}` since it is satisfied
for any vector :math:`\vec{g}`. A similar analysis for a l order tensor gives:

.. math::

    d_{i_1,i_2,...i_l} = d_{(i_1,i_2,...i_l)}


where :math:`(i_1,i_2,...i_l)` represents all the possible permutations of
indices. In three dimensions, a symmetric tensor has:

.. math::

	N_l =  \Gamma_3^l  = \frac{(l+1)(l+2)}{2}


independent components (:math:`\Gamma^l_3` is the number of l-combinations with
repetition of 3 elements), where each element :math:`d_k`
(:math:`k \in [1,\dots, N_l]`) is repeated :math:`\mu_k^l` times, with:

.. math::

    \mu_k^l = \left( \begin{array}{l} l \\ n_1^l(k) \\ \end{array} \right)
    \left( \begin{array}{l} l-n_1^l(k) \\ n_2^l(k) \\ \end{array} \right) =
    \frac{l!}{n_1^l(k)!n_2^l(k)!n_3^l(k)!}


:math:`n_1^l(k)$, $n_2^l(k)` and :math:`n_3^l(k)` are respectivelly the number
of index 1, 2 and 3 that defined the kth independant component of the tensor:

.. math::

    d_k = d_{\underbrace{1,...,1}_{n_1^l(k)},\underbrace{2,...,2}_{n_2^l(k)},
    \underbrace{3,...,3}_{n_3^l(k)}}


with :math:`n_1^l(k)+n_2^l(k)+n_3^l(k)=l`. Finally, we can rewrite the
Steskal-Tanner equation:

.. math::

    S(\vec{g}) = S_0 exp \left( -b \sum_{k=1}^{N_l} \mu_k^l d_k (g_1)^{n_1^l(k)} (g_2)^{n_2^l(k)} (g_3)^{n_3^l(k)} \right)

**References**

.. [1] E. Ozarslan et T. Mareci: Generalized diffusion tensor imaging and
       analytical relationships between diffusion tensor imaging and high
       angular resolution diffusion imaging. Magnetic Resonance in Medicine,
       50:955-965, 2003.

