DKI#

Diffusion kurtosis imaging (DKI) adds a kurtosis tensor W to the diffusion tensor, which measures how far the diffusion in each direction departs from a Gaussian: log(S) = log(S0) - b g^T D g + b^2 MD^2 W(g) / 6 (Jensen et al. 2005). Kurtosis shows as the curvature of the log signal in b, so DKI needs at least two non-zero shells. Citing lists the papers.

The data on this page

The examples on this page run on a small synthetic image, written to the current folder by the code below: dwi.nii.gz with its gradient files dwi.bval and dwi.bvec, and a mask, mask.nii.gz. It has 12 x 12 x 2 voxels of 2 mm, two b=0 images and 30 directions at each of b=1000 and 2000 s/mm^2. Two bundles cross in its middle, one along x and one along y; the other voxels hold isotropic diffusion. To use your own data, use your files instead.

import numpy as np

from larmor.io import save_volume, write_bvals_bvecs
from larmor.sd import AnisotropicRF
from larmor.types import GradientTable, Volume

rng = np.random.default_rng(0)
directions = rng.normal(size=(60, 3))
directions /= np.linalg.norm(directions, axis=1, keepdims=True)
bvals = np.r_[0, 0, [1000] * 30, [2000] * 30]
bvecs = np.r_[np.zeros((2, 3)), directions]
gtab = GradientTable(bvals, bvecs)

fibre = AnisotropicRF([1.7e-3, 0.3e-3, 0.3e-3], mean_kurtosis=0.5)
along_x, along_y = fibre.signal(bvals, gtab.bvecs, np.eye(3)[:2]).T
isotropic = np.exp(-bvals * 0.8e-3)

signal = np.broadcast_to(isotropic, (12, 12, 2, len(bvals))).copy()
signal[:, 4:8] = along_x
signal[4:8, :] = along_y
signal[4:8, 4:8] = (along_x + along_y) / 2
data = 1000 * signal + rng.normal(0, 10, signal.shape)

affine = np.diag([2.0, 2.0, 2.0, 1.0])
save_volume(Volume(data.astype(np.float32), affine), "dwi.nii.gz")
write_bvals_bvecs(gtab, "dwi.bval", "dwi.bvec", ref_path="dwi.nii.gz")
save_volume(Volume(np.ones((12, 12, 2), np.uint8), affine), "mask.nii.gz")

Fitting the tensors#

from larmor.dwi import DKIModel
from larmor.io import load_dwi, load_volume, save_volume

dwi, gtab = load_dwi("dwi.nii.gz", "dwi.bval", "dwi.bvec")
fit = DKIModel().fit(dwi, gtab, mask=load_volume("mask.nii.gz"))

save_volume(dwi.with_data(fit.mk), "mk.nii.gz")
print(f"MK in the bundles: {fit.mk[0, 5, 0]:.2f}")

The result, a DKIFit, holds the maps of a DTI fit (fa, md, ad, rd, pe, eigen_vals, dt) and the kurtosis maps: mean, axial and radial kurtosis (mk, ak, rk), kurtosis anisotropy (ka), the kurtosis tensor kt (15 elements) and the fitted signal at b=0, s0. Maps are zero outside the mask.

lar dki dwi.nii.gz dki --bvals dwi.bval --bvecs dwi.bvec -m mask.nii.gz

The command writes the DTI maps (dki_fa.nii.gz, dki_md.nii.gz, dki_ad.nii.gz, dki_rd.nii.gz, dki_pe.nii.gz) and the kurtosis maps dki_mk.nii.gz, dki_ak.nii.gz, dki_rk.nii.gz and dki_ka.nii.gz.

Options#

  • Fit method. Weighted least squares by default, with weights from the predicted signal (Veraart et al. 2013); ordinary least squares with DKIModel(fit_method="ols") or --fit ols.

  • Constraints. By default the fit is constrained to physically plausible tensors: D(n) >= 0, K(n) >= 0 and K(n) <= 3 / (b_max D(n)) along 256 directions n, b_max the largest b-value (Tabesh et al. 2011). A voxel whose unconstrained fit already meets them keeps it. DKIModel(constrained=False) or --unconstrained fits without them. Voxels with a diffusivity near 0, at the edge of the mask for example, can still give very large kurtosis values.

  • S0. Before the fit, each voxel’s b=0 signal is checked against its diffusion-weighted signal; implausible b=0 values are replaced from neighbouring voxels, as estimate_s0() describes.

  • Mask and threads. As for DTI.

See also#

References#

  • Jensen JH, Helpern JA, Ramani A, Lu H, Kaczynski K. Diffusional kurtosis imaging: the quantification of non-Gaussian water diffusion by means of magnetic resonance imaging. Magn Reson Med 53 (2005) 1432-1440.

  • Tabesh A, Jensen JH, Ardekani BA, Helpern JA. Estimation of tensors and tensor-derived measures in diffusional kurtosis imaging. Magn Reson Med 65 (2011) 823-836.

  • Veraart J, Sijbers J, Sunaert S, Leemans A, Jeurissen B. Weighted linear least squares estimation of diffusion MRI parameters: strengths, limitations, and pitfalls. NeuroImage 81 (2013) 335-346.