Diffusion MRI
Diffusion MRI is a specific Magnetic Resonance Imaging (MRI) modality that produces in vivo images of biological tissues weighted with the local microstructural characteristics of water diffusion.
More precisely, the image-intensities at each position are attenuated, depending on the strength (b-value) and direction of the so-called magnetic diffusion gradient, as well as on the local microstructure in which the water molecules diffuse. The more attenuated the image is at a given position, the more diffusion there is in the direction of the diffusion gradient. In order to measure the tissue's complete diffusion profile, one needs to repeat the MR scans, applying different directions (and possibly strengths) of the diffusion gradient for each scan.
Traditionally, in Diffusion-weighted imaging (DWI), three gradient-directions are applied, sufficient to estimate the trace of the diffusion tensor or 'average diffusivity', a putative measure of edema. Clinically, trace-weighted images have proven to be very useful to diagnose vascular strokes in the brain, by early detection (within a couple of minutes) of the hypoxic edema.
More extended diffusion tensor imaging (DTI) scans comprise at least six gradient directions, sufficient to compute the diffusion tensor. The diffusion model is a rather simple model of the diffusion process, assuming homogeneity and linearity of the diffusion within each image-voxel. From the diffusion tensor diffusion anisotropy measures, such as the Fractional Anisotropy (FA), can be computed. Moreover, the principal direction of the diffusion tensor can be used to infer the white-matter connectivity of the brain (i.e. tractography; trying to see which part of the brain is connected to which other part).
Recently, more advanced models of the diffusion process have been proposed that aim to overcome the weaknesses of the diffusion tensor model. Amongst others, these include q-space imaging and generalized diffusion tensor imaging.

# Diffusion-weighted imaging
Diffusion-weighted imaging is a specific MRI modality that produces in vivo magnetic resonance images of biological tissues weighted with the local characteristics of water diffusion.
DWI is a modification of regular MRI techniques, and is an approach which utilizes the measurement of Brownian (or random walk) motion of molecules.  Regular MRI acquisition utilizes the behaviour of protons in water to generate contrast between clinically relevant features of a particular subject.  The versatile nature of MRI is due to this capability of producing contrast, called weighting. In a typical T_1-weighted image, water molecules in a sample are excited with the imposition of a strong magnetic field.  This causes the millions of water molecules to precess simultaneously, and it is this precession of protons which produces signals in MRI. In T_2-weighted images, contrast is produced by measuring the loss of coherence or synchrony between the water protons.  When water is in an environment where it can freely tumble, relaxation tends to take longer.  In certain clinical situations, this can generate contrast between an area of pathology and the surrounding healthy tissue.
In diffusion-weighted images, instead of a homogenous magnetic field, the homogeneity is varied linearly by a pulsed field gradient.  Since precession is proportional to the magnet strength, the protons begin to precess at different rates, resulting in dispersion of the phase and signal loss. Another gradient pulse is applied in the same direction but with opposite magnitude to refocus or rephase the spins.  The refocusing will not be perfect for protons that have moved during the time interval between the pulses, and the signal measured by the MRI machine is reduced.  This reduction in signal due to the application of the pulse gradient can be related to the amount of diffusion that is occurring through the following equation:
where  S_0  is the signal intensity without the diffusion weighting, S is the signal with the gradient,  \gamma is the gyromagnetic ratio, G is the strength of the gradient pulse,  \delta is the duration of the pulse,  \Delta is the time between the two pulses, and finally,  D is the diffusion constant.
By rearranging the formula to isolate the diffusion-coefficient, it is possible to obtain an idea of the properties of diffusion occurring within a particular voxel (volume picture element). These values, called apparent diffusion coefficient (ADC) can then be mapped as an image, using diffusion as the contrast.
The first successful clinical application of DWI was in imaging the brain following stroke in adults.  Areas which were injured during a stroke showed up "darker" on an ADC map compared to healthy tissue.  At about the same time as it became evident to researchers that DWI could be used to assess the severity of injury in adult stroke patients, they also noticed that ADC values varied depending on which way the pulse gradient was applied.  This orientation-dependant contrast is generated by diffusion anisotropy, meaning that the diffusion in parts of the brain has directionality.  This may be useful for determining structures in the brain which could restrict the flow of water in one direction, such as the myleinated axons of nerve cells (which is affected by multiple sclerosis).  However, in an imaging the brain following a stroke, it may actually prevent the injury from being seen.  To compensate for this, it is necessary to apply a tensor to fully characterize the motion of water in all directions. This tensor is called a diffusion tensor:
 \bar{D} = \begin{vmatrix}
D_{xx} & D_{xy} & D_{xz} \\
D_{yx} & D_{yy} & D_{yz} \\
D_{zx} & D_{zy} & D_{zz}
\end{vmatrix}
Diffusion-weighted images are very useful to diagnose vascular strokes in the brain, to study the diseases of the white matter or to (try to) infer the connectivity of the brain (i.e. tractography; try to see which part of the cortex is connected to another one, and so on).

# Diffusion tensor imaging
Diffusion tensor imaging (DTI) is a magnetic resonance imaging (MRI) technique that enables the measurement of the restricted diffusion of water in tissue.  The principal application is in the imaging of white matter
where the location, orientation, and anisotropy of the tracts can be measured. The architecture of the axons in parallel bundles, and their myelin sheaths, facilitate the diffusion of the water molecules preferentially along their main direction.  Such preferentially oriented diffusion is called anisotropic diffusion.
The imaging of this property is an extension of diffusion MRI. If we apply diffusion gradients (i.e. magnetic field variations in the MRI magnet) in at least 6 directions, it is possible to calculate, for each voxel, a tensor (i.e. a symmetric positive definite 3 3 matrix) that describes the 3-dimensional shape of diffusion.  The fiber direction is indicated by the tensors main eigenvector. This vector can be color-coded, yielding a cartography of the tracts' position and direction (red for left-right, blue for superior-inferior, and green for anterior-posterior). The brightness is weighted by the fractional anisotropy which is a scalar measure of the degree of anisotropy in a given voxel. Mean Diffusivity (MD) or Trace is a scalar measure of the total diffusion within a voxel.  These measures are commonly used clinically to localize white matter lesions that do not show up on other forms of clinical MRI.
Diffusion tensor imaging data can be used to perform tractography within white matter. Fiber tracking algorithms can be used to track a fiber along its whole length (e.g. the corticospinal tract, through which the motor information transit from the motor cortex to the spinal cord and the peripheral nerves).
Some clinical applications of DTI are in the tract-specific localization of white matter lesions such as trauma, the localization of tumors in relation to the white matter tracts (infiltration, deflection), the localization of the main white matter tracts for neurosurgical planning, and the assessment of white matter in development, pathology and degeneration.   DTI also has applications in the characterization of skeletal and cardiac muscle.
Applications in research cover e.g. connectionistic investigation of neural networks in vivo.