Reconstruction of the diffusion signal with the kurtosis tensor model#

The diffusion kurtosis model is an expansion of the diffusion tensor model (see Reconstruction of the diffusion signal with the Tensor model). In addition to the diffusion tensor (DT), the diffusion kurtosis model quantifies the degree to which water diffusion in biological tissues is non-Gaussian using the kurtosis tensor (KT) [Jensen2005].

Measurements of non-Gaussian diffusion from the diffusion kurtosis model are of interest because they can be used to characterize tissue microstructural heterogeneity [Jensen2010]. Moreover, DKI can be used to: 1) derive concrete biophysical parameters, such as the density of axonal fibers and diffusion tortuosity [Fierem2011] (see Reconstruction of the diffusion signal with the WMTI model); and 2) resolve crossing fibers in tractography and to obtain invariant rotational measures not limited to well-aligned fiber populations [NetoHe2015].

The diffusion kurtosis model expresses the diffusion-weighted signal as:

\[S(n,b)=S_{0}e^{-bD(n)+\frac{1}{6}b^{2}D(n)^{2}K(n)}\]

where \(\mathbf{b}\) is the applied diffusion weighting (which is dependent on the measurement parameters), \(S_0\) is the signal in the absence of diffusion gradient sensitization, \(\mathbf{D(n)}\) is the value of diffusion along direction \(\mathbf{n}\), and \(\mathbf{K(n)}\) is the value of kurtosis along direction \(\mathbf{n}\). The directional diffusion \(\mathbf{D(n)}\) and kurtosis \(\mathbf{K(n)}\) can be related to the diffusion tensor (DT) and kurtosis tensor (KT) using the following equations:

\[D(n)=\sum_{i=1}^{3}\sum_{j=1}^{3}n_{i}n_{j}D_{ij}\]

and

\[K(n)=\frac{MD^{2}}{D(n)^{2}}\sum_{i=1}^{3}\sum_{j=1}^{3}\sum_{k=1}^{3} \sum_{l=1}^{3}n_{i}n_{j}n_{k}n_{l}W_{ijkl}\]

where \(D_{ij}\) are the elements of the second-order DT, and \(W_{ijkl}\) the elements of the fourth-order KT and \(MD\) is the mean diffusivity. As the DT, KT has antipodal symmetry and thus only 15 Wijkl elements are needed to fully characterize the KT:

\[\begin{split}\begin{matrix} ( & W_{xxxx} & W_{yyyy} & W_{zzzz} & W_{xxxy} & W_{xxxz} & ... \\ & W_{xyyy} & W_{yyyz} & W_{xzzz} & W_{yzzz} & W_{xxyy} & ... \\ & W_{xxzz} & W_{yyzz} & W_{xxyz} & W_{xyyz} & W_{xyzz} & & )\end{matrix}\end{split}\]

In the following example we show how to fit the diffusion kurtosis model on diffusion-weighted multi-shell datasets and how to estimate diffusion kurtosis based statistics.

First, we import all relevant modules:

import numpy as np
import dipy.reconst.dki as dki
import dipy.reconst.dti as dti
from dipy.core.gradients import gradient_table
from dipy.data import get_fnames
from dipy.io.gradients import read_bvals_bvecs
from dipy.io.image import load_nifti
from dipy.segment.mask import median_otsu
from dipy.viz.plotting import compare_maps
from scipy.ndimage import gaussian_filter

DKI requires multi-shell data, i.e. data acquired from more than one non-zero b-value. Here, we use fetch to download a multi-shell dataset which was kindly provided by Hansen and Jespersen (more details about the data are provided in their paper [Hansen2016]). The total size of the downloaded data is 192 MBytes, however you only need to fetch it once.

fraw, fbval, fbvec, t1_fname = get_fnames('cfin_multib')

data, affine = load_nifti(fraw)
bvals, bvecs = read_bvals_bvecs(fbval, fbvec)
gtab = gradient_table(bvals, bvecs)

Function get_fnames downloads and outputs the paths of the data, load_nifti returns the data as a nibabel Nifti1Image object, and read_bvals_bvecs loads the arrays containing the information about the b-values and b-vectors. These later arrays are converted to the GradientTable object required for Dipy’s data reconstruction.

Before fitting the data, we perform some data pre-processing. We first compute a brain mask to avoid unnecessary calculations on the background of the image.

maskdata, mask = median_otsu(data, vol_idx=[0, 1], median_radius=4, numpass=2,
                             autocrop=False, dilate=1)

Since the diffusion kurtosis models involves the estimation of a large number of parameters [TaxCMW2015] and since the non-Gaussian components of the diffusion signal are more sensitive to artefacts [NetoHe2012], it might be favorable to suppress the effects of noise and artefacts before diffusion kurtosis fitting. In this example the effects of noise and artefacts are suppress by using 3D Gaussian smoothing (with a Gaussian kernel with fwhm=1.25) as suggested by pioneer DKI studies (e.g. [Jensen2005], [NetoHe2012]). Although here the Gaussian smoothing is used so that results are comparable to these studies, it is important to note that more advanced noise and artifact suppression algorithms are available in DIPY, e.g. the Marcenko-Pastur PCA denoising algorithm (Denoise images using the Marcenko-Pastur PCA algorithm) and the Gibbs artefact suppression algorithm (Suppress Gibbs oscillations).

fwhm = 1.25
gauss_std = fwhm / np.sqrt(8 * np.log(2))  # converting fwhm to Gaussian std
data_smooth = np.zeros(data.shape)
for v in range(data.shape[-1]):
    data_smooth[..., v] = gaussian_filter(data[..., v], sigma=gauss_std)

Now that we have loaded and pre-processed the data we can go forward with DKI fitting. For this, the DKI model is first defined for the data’s GradientTable object by instantiating the DiffusionKurtosisModel object in the following way:

To fit the data using the defined model object, we call the fit function of this object. For the purpose of this example, we will only fit a single slice of the data:

data_smooth = data_smooth[:, :, 9:10]
mask = mask[:, :, 9:10]
dkifit = dkimodel.fit(data_smooth, mask=mask)
  0%|                                                                                                                                                   | 0/3121 [00:00<?, ?it/s]
  2%|███                                                                                                                                      | 69/3121 [00:00<00:04, 630.85it/s]
  5%|██████▎                                                                                                                                 | 145/3121 [00:00<00:04, 668.50it/s]
  7%|█████████▍                                                                                                                              | 218/3121 [00:00<00:04, 695.16it/s]
 10%|████████████▉                                                                                                                           | 297/3121 [00:00<00:03, 712.33it/s]
 12%|████████████████                                                                                                                        | 369/3121 [00:00<00:03, 701.62it/s]
 14%|███████████████████▌                                                                                                                    | 448/3121 [00:00<00:03, 709.27it/s]
 17%|███████████████████████▌                                                                                                                | 540/3121 [00:00<00:03, 753.05it/s]
 20%|███████████████████████████                                                                                                             | 620/3121 [00:00<00:03, 767.14it/s]
 22%|██████████████████████████████▌                                                                                                         | 701/3121 [00:00<00:03, 772.61it/s]
 25%|██████████████████████████████████▍                                                                                                     | 790/3121 [00:01<00:02, 785.67it/s]
 28%|█████████████████████████████████████▊                                                                                                  | 869/3121 [00:01<00:02, 765.82it/s]
 30%|█████████████████████████████████████████▏                                                                                              | 946/3121 [00:01<00:02, 746.77it/s]
 33%|████████████████████████████████████████████▏                                                                                          | 1021/3121 [00:01<00:02, 730.76it/s]
 35%|███████████████████████████████████████████████▋                                                                                       | 1103/3121 [00:01<00:02, 733.18it/s]
 38%|███████████████████████████████████████████████████▍                                                                                   | 1189/3121 [00:01<00:02, 750.06it/s]
 41%|██████████████████████████████████████████████████████▋                                                                                | 1265/3121 [00:01<00:02, 743.53it/s]
 44%|██████████████████████████████████████████████████████████▊                                                                            | 1359/3121 [00:01<00:02, 768.28it/s]
 46%|██████████████████████████████████████████████████████████████▎                                                                        | 1441/3121 [00:01<00:02, 782.03it/s]
 49%|██████████████████████████████████████████████████████████████████▏                                                                    | 1531/3121 [00:02<00:01, 800.65it/s]
 52%|██████████████████████████████████████████████████████████████████████▏                                                                | 1622/3121 [00:02<00:01, 810.22it/s]
 55%|██████████████████████████████████████████████████████████████████████████▎                                                            | 1718/3121 [00:02<00:01, 830.72it/s]
 58%|██████████████████████████████████████████████████████████████████████████████▌                                                        | 1816/3121 [00:02<00:01, 850.48it/s]
 61%|██████████████████████████████████████████████████████████████████████████████████▎                                                    | 1902/3121 [00:02<00:01, 803.36it/s]
 64%|█████████████████████████████████████████████████████████████████████████████████████▊                                                 | 1983/3121 [00:02<00:01, 786.42it/s]
 66%|█████████████████████████████████████████████████████████████████████████████████████████▍                                             | 2068/3121 [00:02<00:01, 783.89it/s]
 69%|█████████████████████████████████████████████████████████████████████████████████████████████▍                                         | 2160/3121 [00:02<00:01, 800.92it/s]
 72%|█████████████████████████████████████████████████████████████████████████████████████████████████                                      | 2244/3121 [00:02<00:01, 791.10it/s]
 74%|████████████████████████████████████████████████████████████████████████████████████████████████████▌                                  | 2324/3121 [00:03<00:01, 775.37it/s]
 77%|████████████████████████████████████████████████████████████████████████████████████████████████████████▏                              | 2409/3121 [00:03<00:00, 765.30it/s]
 80%|████████████████████████████████████████████████████████████████████████████████████████████████████████████                           | 2497/3121 [00:03<00:00, 776.94it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████▊                       | 2584/3121 [00:03<00:00, 782.47it/s]
 85%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏                   | 2663/3121 [00:03<00:00, 764.51it/s]
 88%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊                | 2747/3121 [00:03<00:00, 773.37it/s]
 91%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋            | 2837/3121 [00:03<00:00, 787.79it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏        | 2916/3121 [00:03<00:00, 772.49it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉     | 3003/3121 [00:03<00:00, 775.95it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍ | 3085/3121 [00:04<00:00, 786.19it/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3121/3121 [00:04<00:00, 769.81it/s]

The fit method creates a DiffusionKurtosisFit object, which contains all the diffusion and kurtosis fitting parameters and other DKI attributes. For instance, since the diffusion kurtosis model estimates the diffusion tensor, all standard diffusion tensor statistics can be computed from the DiffusionKurtosisFit instance. For example, we can extract the fractional anisotropy (FA), the mean diffusivity (MD), the axial diffusivity (AD) and the radial diffusivity (RD) from the DiffusionKurtosisiFit instance. Of course, these measures can also be computed from DIPY’s TensorModel fit, and should be analogous; however, theoretically, the diffusion statistics from the kurtosis model are expected to have better accuracy, since DKI’s diffusion tensor are decoupled from higher order terms effects [Veraar2011], [NetoHe2012]. Below we compare the FA, MD, AD, and RD, computed from both DTI and DKI.

tenmodel = dti.TensorModel(gtab)
tenfit = tenmodel.fit(data_smooth, mask=mask)

fits = [tenfit, dkifit]
maps = ['fa', 'md', 'ad', 'rd']
fit_labels = ['DTI', 'DKI']
map_kwargs = [{'vmax': 0.7}, {'vmax': 2e-3}, {'vmax': 2e-3}, {'vmax': 2e-3}]
compare_maps(fits, maps, fit_labels=fit_labels, map_kwargs=map_kwargs,
             filename='Diffusion_tensor_measures_from_DTI_and_DKI.png')
reconst dki

Diffusion tensor measures obtained from the diffusion tensor estimated from DKI (upper panels) and DTI (lower panels).

DTI’s diffusion estimates present lower values than DKI’s estimates, showing that DTI’s diffusion measurements are underestimated by higher order effects.

In addition to the standard diffusion statistics, the DiffusionKurtosisFit instance can be used to estimate the non-Gaussian measures of mean kurtosis (MK), the axial kurtosis (AK) and the radial kurtosis (RK).

maps = ['mk', 'ak', 'rk']
compare_maps([dkifit], maps, fit_labels=['DKI'],
             map_kwargs={'vmin': 0, 'vmax': 1.5},
             filename='Kurtosis_tensor_standard_measures.png')
reconst dki

DKI standard kurtosis measures.

The non-Gaussian behaviour of the diffusion signal is expected to be higher when tissue water is confined by multiple compartments. MK is, therefore, higher in white matter since it is highly compartmentalized by myelin sheaths. These water diffusion compartmentalization is expected to be more pronounced perpendicularly to white matter fibers and thus the RK map presents higher amplitudes than the AK map.

It is important to note that kurtosis estimates might present negative estimates in deep white matter regions (e.g. the band of dark voxels in the RK map above). These negative kurtosis values are artefactual and might be induced by: 1) low radial diffusivities of aligned white matter - since it is very hard to capture non-Gaussian information in radial direction due to it’s low diffusion decays, radial kurtosis estimates (and consequently the mean kurtosis estimates) might have low robustness and tendency to exhibit negative values [NetoHe2012]; 2) Gibbs artefacts - MRI images might be corrupted by signal oscillation artefact between tissue’s edges if an inadequate number of high frequencies of the k-space is sampled. These oscillations might have different signs on images acquired with different diffusion-weighted and inducing negative biases in kurtosis parametric maps [Perron2015], [NetoHe2018].

One can try to suppress this issue by using the more advance noise and artefact suppression algorithms, e.g., as mentioned above, the MP-PCA denoising (Denoise images using the Marcenko-Pastur PCA algorithm) and Gibbs Unringing (Suppress Gibbs oscillations) algorithms. Alternatively, one can overcome this artefact by computing the kurtosis values from powder-averaged diffusion-weighted signals. The details on how to compute the kurtosis from powder-average signals in dipy are described in follow the tutorial (Mean signal diffusion kurtosis imaging (MSDKI)). Finally, one can use constrained optimization to ensure that the fitted parameters are physically plausible [DelaHa2020], as we will illustrate in the next section. Ideally though, artefacts such as Gibbs ringing should be corrected for as well as possible before using constrained optimization.

Constrained optimization for DKI#

When instantiating the DiffusionKurtosisModel, the model can be set up to use constraints with the option fit_method=’CLS’ (for ordinary least squares) or with fit_method=’CWLS’ (for weighted least squares). Constrained fitting takes more time than unconstrained fitting, but is generally recommended to prevent physically unplausible parameter estimates [DelaHa2020]. For performance purposes it is recommended to use the MOSEK solver (https://www.mosek.com/) by setting cvxpy_solver='MOSEK'. Different solvers can differ greatly in terms of runtime and solution accuracy, and in some cases solvers may show warnings about convergence or recommended option settings.

Note

In certain atypical scenarios, the DKI+ constraints could potentially be too restrictive. Always check the results of a constrained fit with their unconstrained counterpart to verify that there are no unexpected qualitative differences.

dkimodel_plus = dki.DiffusionKurtosisModel(gtab, fit_method='CLS')
dkifit_plus = dkimodel_plus.fit(data_smooth, mask=mask)
  0%|                                                                                                                                                   | 0/3121 [00:00<?, ?it/s]
  0%|▍                                                                                                                                         | 10/3121 [00:00<00:31, 98.24it/s]
  1%|▉                                                                                                                                        | 22/3121 [00:00<00:28, 108.27it/s]
  1%|█▌                                                                                                                                       | 37/3121 [00:00<00:24, 126.25it/s]
  2%|██▍                                                                                                                                      | 55/3121 [00:00<00:21, 145.90it/s]
  2%|███▏                                                                                                                                     | 73/3121 [00:00<00:19, 156.22it/s]
  3%|███▉                                                                                                                                     | 90/3121 [00:00<00:18, 160.29it/s]
  3%|████▋                                                                                                                                   | 107/3121 [00:00<00:18, 162.24it/s]
  4%|█████▍                                                                                                                                  | 126/3121 [00:00<00:17, 166.52it/s]
  5%|██████▎                                                                                                                                 | 145/3121 [00:00<00:17, 168.90it/s]
  5%|███████                                                                                                                                 | 162/3121 [00:01<00:17, 167.36it/s]
  6%|███████▊                                                                                                                                | 180/3121 [00:01<00:17, 168.35it/s]
  6%|████████▌                                                                                                                               | 197/3121 [00:01<00:18, 159.96it/s]
  7%|█████████▍                                                                                                                              | 216/3121 [00:01<00:17, 164.13it/s]
  7%|██████████▏                                                                                                                             | 233/3121 [00:01<00:17, 161.20it/s]
  8%|██████████▉                                                                                                                             | 250/3121 [00:01<00:17, 162.21it/s]
  9%|███████████▊                                                                                                                            | 270/3121 [00:01<00:17, 165.99it/s]
  9%|████████████▌                                                                                                                           | 287/3121 [00:01<00:17, 163.75it/s]
 10%|█████████████▎                                                                                                                          | 306/3121 [00:01<00:16, 165.81it/s]
 10%|██████████████▏                                                                                                                         | 325/3121 [00:02<00:16, 168.18it/s]
 11%|██████████████▉                                                                                                                         | 343/3121 [00:02<00:16, 169.01it/s]
 12%|███████████████▊                                                                                                                        | 363/3121 [00:02<00:16, 171.13it/s]
 12%|████████████████▋                                                                                                                       | 382/3121 [00:02<00:15, 172.00it/s]
 13%|█████████████████▍                                                                                                                      | 400/3121 [00:02<00:16, 169.78it/s]
 13%|██████████████████▎                                                                                                                     | 419/3121 [00:02<00:15, 170.96it/s]
 14%|███████████████████                                                                                                                     | 437/3121 [00:02<00:15, 169.78it/s]
 15%|███████████████████▊                                                                                                                    | 455/3121 [00:02<00:15, 172.10it/s]
 15%|████████████████████▋                                                                                                                   | 474/3121 [00:02<00:15, 172.59it/s]
 16%|█████████████████████▍                                                                                                                  | 493/3121 [00:03<00:15, 172.93it/s]
 16%|██████████████████████▎                                                                                                                 | 512/3121 [00:03<00:15, 173.17it/s]
 17%|███████████████████████▏                                                                                                                | 531/3121 [00:03<00:15, 171.38it/s]
 18%|████████████████████████                                                                                                                | 551/3121 [00:03<00:14, 172.13it/s]
 18%|████████████████████████▊                                                                                                               | 569/3121 [00:03<00:15, 169.90it/s]
 19%|█████████████████████████▌                                                                                                              | 588/3121 [00:03<00:14, 171.03it/s]
 19%|██████████████████████████▍                                                                                                             | 606/3121 [00:03<00:14, 168.06it/s]
 20%|███████████████████████████▏                                                                                                            | 625/3121 [00:03<00:14, 168.97it/s]
 21%|████████████████████████████                                                                                                            | 643/3121 [00:03<00:14, 167.66it/s]
 21%|████████████████████████████▊                                                                                                           | 662/3121 [00:04<00:14, 169.46it/s]
 22%|█████████████████████████████▌                                                                                                          | 679/3121 [00:04<00:14, 169.14it/s]
 22%|██████████████████████████████▍                                                                                                         | 699/3121 [00:04<00:14, 168.73it/s]
 23%|███████████████████████████████▏                                                                                                        | 717/3121 [00:04<00:14, 169.87it/s]
 24%|████████████████████████████████                                                                                                        | 735/3121 [00:04<00:14, 168.37it/s]
 24%|████████████████████████████████▊                                                                                                       | 754/3121 [00:04<00:13, 169.98it/s]
 25%|█████████████████████████████████▋                                                                                                      | 772/3121 [00:04<00:13, 168.35it/s]
 25%|██████████████████████████████████▍                                                                                                     | 790/3121 [00:04<00:13, 169.54it/s]
 26%|███████████████████████████████████▏                                                                                                    | 808/3121 [00:04<00:13, 171.24it/s]
 26%|████████████████████████████████████                                                                                                    | 827/3121 [00:04<00:13, 172.00it/s]
 27%|████████████████████████████████████▊                                                                                                   | 846/3121 [00:05<00:13, 172.52it/s]
 28%|█████████████████████████████████████▋                                                                                                  | 864/3121 [00:05<00:13, 171.83it/s]
 28%|██████████████████████████████████████▍                                                                                                 | 882/3121 [00:05<00:13, 170.21it/s]
 29%|███████████████████████████████████████▎                                                                                                | 901/3121 [00:05<00:13, 170.73it/s]
 29%|████████████████████████████████████████                                                                                                | 920/3121 [00:05<00:12, 171.74it/s]
 30%|████████████████████████████████████████▉                                                                                               | 939/3121 [00:05<00:12, 172.33it/s]
 31%|█████████████████████████████████████████▋                                                                                              | 957/3121 [00:05<00:12, 170.00it/s]
 31%|██████████████████████████████████████████▍                                                                                             | 975/3121 [00:05<00:12, 168.58it/s]
 32%|███████████████████████████████████████████▎                                                                                            | 995/3121 [00:05<00:12, 170.80it/s]
 32%|███████████████████████████████████████████▊                                                                                           | 1014/3121 [00:06<00:12, 171.66it/s]
 33%|████████████████████████████████████████████▋                                                                                          | 1032/3121 [00:06<00:12, 171.33it/s]
 34%|█████████████████████████████████████████████▍                                                                                         | 1050/3121 [00:06<00:12, 169.34it/s]
 34%|██████████████████████████████████████████████▏                                                                                        | 1067/3121 [00:06<00:12, 167.50it/s]
 35%|███████████████████████████████████████████████                                                                                        | 1087/3121 [00:06<00:11, 169.74it/s]
 35%|███████████████████████████████████████████████▊                                                                                       | 1106/3121 [00:06<00:11, 170.98it/s]
 36%|████████████████████████████████████████████████▋                                                                                      | 1125/3121 [00:06<00:11, 171.80it/s]
 37%|█████████████████████████████████████████████████▍                                                                                     | 1144/3121 [00:06<00:11, 172.38it/s]
 37%|██████████████████████████████████████████████████▎                                                                                    | 1163/3121 [00:06<00:11, 170.91it/s]
 38%|███████████████████████████████████████████████████▏                                                                                   | 1182/3121 [00:07<00:11, 171.74it/s]
 38%|███████████████████████████████████████████████████▉                                                                                   | 1201/3121 [00:07<00:11, 172.33it/s]
 39%|████████████████████████████████████████████████████▋                                                                                  | 1219/3121 [00:07<00:11, 171.85it/s]
 40%|█████████████████████████████████████████████████████▌                                                                                 | 1238/3121 [00:07<00:11, 170.38it/s]
 40%|██████████████████████████████████████████████████████▎                                                                                | 1256/3121 [00:07<00:10, 170.57it/s]
 41%|███████████████████████████████████████████████████████▏                                                                               | 1276/3121 [00:07<00:10, 174.38it/s]
 41%|████████████████████████████████████████████████████████                                                                               | 1295/3121 [00:07<00:10, 174.18it/s]
 42%|████████████████████████████████████████████████████████▊                                                                              | 1313/3121 [00:07<00:10, 171.29it/s]
 43%|█████████████████████████████████████████████████████████▌                                                                             | 1331/3121 [00:07<00:10, 171.30it/s]
 43%|██████████████████████████████████████████████████████████▎                                                                            | 1349/3121 [00:08<00:10, 171.88it/s]
 44%|███████████████████████████████████████████████████████████▏                                                                           | 1368/3121 [00:08<00:10, 172.44it/s]
 44%|███████████████████████████████████████████████████████████▉                                                                           | 1386/3121 [00:08<00:10, 172.85it/s]
 45%|████████████████████████████████████████████████████████████▋                                                                          | 1404/3121 [00:08<00:10, 170.31it/s]
 46%|█████████████████████████████████████████████████████████████▌                                                                         | 1422/3121 [00:08<00:10, 169.67it/s]
 46%|██████████████████████████████████████████████████████████████▎                                                                        | 1442/3121 [00:08<00:09, 172.50it/s]
 47%|███████████████████████████████████████████████████████████████▏                                                                       | 1460/3121 [00:08<00:09, 170.16it/s]
 47%|███████████████████████████████████████████████████████████████▉                                                                       | 1479/3121 [00:08<00:09, 171.23it/s]
 48%|████████████████████████████████████████████████████████████████▊                                                                      | 1498/3121 [00:08<00:09, 171.98it/s]
 49%|█████████████████████████████████████████████████████████████████▌                                                                     | 1516/3121 [00:08<00:09, 169.75it/s]
 49%|██████████████████████████████████████████████████████████████████▍                                                                    | 1536/3121 [00:09<00:09, 170.98it/s]
 50%|███████████████████████████████████████████████████████████████████▏                                                                   | 1554/3121 [00:09<00:09, 171.76it/s]
 50%|████████████████████████████████████████████████████████████████████                                                                   | 1573/3121 [00:09<00:08, 172.35it/s]
 51%|████████████████████████████████████████████████████████████████████▊                                                                  | 1592/3121 [00:09<00:08, 172.76it/s]
 52%|█████████████████████████████████████████████████████████████████████▋                                                                 | 1610/3121 [00:09<00:08, 169.16it/s]
 52%|██████████████████████████████████████████████████████████████████████▍                                                                | 1629/3121 [00:09<00:08, 171.64it/s]
 53%|███████████████████████████████████████████████████████████████████████▏                                                               | 1647/3121 [00:09<00:08, 169.52it/s]
 53%|████████████████████████████████████████████████████████████████████████                                                               | 1666/3121 [00:09<00:08, 170.78it/s]
 54%|████████████████████████████████████████████████████████████████████████▊                                                              | 1684/3121 [00:09<00:08, 168.91it/s]
 55%|█████████████████████████████████████████████████████████████████████████▌                                                             | 1701/3121 [00:10<00:08, 169.12it/s]
 55%|██████████████████████████████████████████████████████████████████████████▎                                                            | 1719/3121 [00:10<00:08, 170.75it/s]
 56%|███████████████████████████████████████████████████████████████████████████▏                                                           | 1737/3121 [00:10<00:08, 168.94it/s]
 56%|███████████████████████████████████████████████████████████████████████████▉                                                           | 1756/3121 [00:10<00:08, 170.40it/s]
 57%|████████████████████████████████████████████████████████████████████████████▊                                                          | 1775/3121 [00:10<00:07, 171.41it/s]
 57%|█████████████████████████████████████████████████████████████████████████████▌                                                         | 1793/3121 [00:10<00:07, 169.89it/s]
 58%|██████████████████████████████████████████████████████████████████████████████▍                                                        | 1812/3121 [00:10<00:07, 170.38it/s]
 59%|███████████████████████████████████████████████████████████████████████████████▏                                                       | 1831/3121 [00:10<00:07, 171.38it/s]
 59%|████████████████████████████████████████████████████████████████████████████████                                                       | 1850/3121 [00:10<00:07, 172.08it/s]
 60%|████████████████████████████████████████████████████████████████████████████████▊                                                      | 1869/3121 [00:11<00:07, 172.57it/s]
 60%|█████████████████████████████████████████████████████████████████████████████████▌                                                     | 1887/3121 [00:11<00:07, 169.11it/s]
 61%|██████████████████████████████████████████████████████████████████████████████████▍                                                    | 1905/3121 [00:11<00:07, 168.90it/s]
 62%|███████████████████████████████████████████████████████████████████████████████████▏                                                   | 1923/3121 [00:11<00:07, 167.60it/s]
 62%|████████████████████████████████████████████████████████████████████████████████████                                                   | 1942/3121 [00:11<00:06, 169.44it/s]
 63%|████████████████████████████████████████████████████████████████████████████████████▊                                                  | 1961/3121 [00:11<00:06, 170.72it/s]
 63%|█████████████████████████████████████████████████████████████████████████████████████▌                                                 | 1979/3121 [00:11<00:06, 168.08it/s]
 64%|██████████████████████████████████████████████████████████████████████████████████████▍                                                | 1999/3121 [00:11<00:06, 170.63it/s]
 65%|███████████████████████████████████████████████████████████████████████████████████████▏                                               | 2017/3121 [00:11<00:06, 168.83it/s]
 65%|████████████████████████████████████████████████████████████████████████████████████████                                               | 2037/3121 [00:12<00:06, 173.01it/s]
 66%|████████████████████████████████████████████████████████████████████████████████████████▉                                              | 2055/3121 [00:12<00:06, 170.63it/s]
 66%|█████████████████████████████████████████████████████████████████████████████████████████▋                                             | 2073/3121 [00:12<00:06, 171.39it/s]
 67%|██████████████████████████████████████████████████████████████████████████████████████████▍                                            | 2092/3121 [00:12<00:05, 172.09it/s]
 68%|███████████████████████████████████████████████████████████████████████████████████████████▎                                           | 2111/3121 [00:12<00:05, 172.58it/s]
 68%|████████████████████████████████████████████████████████████████████████████████████████████▏                                          | 2130/3121 [00:12<00:05, 172.92it/s]
 69%|████████████████████████████████████████████████████████████████████████████████████████████▉                                          | 2148/3121 [00:12<00:05, 173.92it/s]
 69%|█████████████████████████████████████████████████████████████████████████████████████████████▋                                         | 2167/3121 [00:12<00:05, 175.11it/s]
 70%|██████████████████████████████████████████████████████████████████████████████████████████████▌                                        | 2186/3121 [00:12<00:05, 174.69it/s]
 71%|███████████████████████████████████████████████████████████████████████████████████████████████▎                                       | 2204/3121 [00:13<00:05, 171.61it/s]
 71%|████████████████████████████████████████████████████████████████████████████████████████████████▏                                      | 2223/3121 [00:13<00:05, 172.25it/s]
 72%|████████████████████████████████████████████████████████████████████████████████████████████████▉                                      | 2241/3121 [00:13<00:05, 164.37it/s]
 72%|█████████████████████████████████████████████████████████████████████████████████████████████████▋                                     | 2259/3121 [00:13<00:05, 165.32it/s]
 73%|██████████████████████████████████████████████████████████████████████████████████████████████████▍                                    | 2276/3121 [00:13<00:05, 162.51it/s]
 74%|███████████████████████████████████████████████████████████████████████████████████████████████████▎                                   | 2295/3121 [00:13<00:04, 165.85it/s]
 74%|████████████████████████████████████████████████████████████████████████████████████████████████████                                   | 2314/3121 [00:13<00:04, 168.20it/s]
 75%|████████████████████████████████████████████████████████████████████████████████████████████████████▊                                  | 2331/3121 [00:13<00:04, 163.53it/s]
 75%|█████████████████████████████████████████████████████████████████████████████████████████████████████▌                                 | 2349/3121 [00:13<00:04, 162.94it/s]
 76%|██████████████████████████████████████████████████████████████████████████████████████████████████████▎                                | 2366/3121 [00:14<00:04, 160.70it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████████████████████████                                | 2384/3121 [00:14<00:04, 161.86it/s]
 77%|███████████████████████████████████████████████████████████████████████████████████████████████████████▉                               | 2402/3121 [00:14<00:04, 164.29it/s]
 78%|████████████████████████████████████████████████████████████████████████████████████████████████████████▋                              | 2421/3121 [00:14<00:04, 165.40it/s]
 78%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▍                             | 2438/3121 [00:14<00:04, 164.26it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▏                            | 2456/3121 [00:14<00:04, 164.35it/s]
 79%|███████████████████████████████████████████████████████████████████████████████████████████████████████████                            | 2476/3121 [00:14<00:03, 169.92it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▉                           | 2495/3121 [00:14<00:03, 171.06it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▋                          | 2514/3121 [00:14<00:03, 170.03it/s]
 81%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▌                         | 2534/3121 [00:15<00:03, 173.84it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████▍                        | 2553/3121 [00:15<00:03, 173.81it/s]
 82%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████▎                       | 2572/3121 [00:15<00:03, 173.79it/s]
 83%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████                       | 2590/3121 [00:15<00:03, 165.40it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊                      | 2607/3121 [00:15<00:03, 162.67it/s]
 84%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌                     | 2625/3121 [00:15<00:03, 163.37it/s]
 85%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍                    | 2645/3121 [00:15<00:02, 169.15it/s]
 85%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏                   | 2662/3121 [00:15<00:02, 165.06it/s]
 86%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉                   | 2679/3121 [00:15<00:02, 166.27it/s]
 86%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋                  | 2699/3121 [00:15<00:02, 172.60it/s]
 87%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌                 | 2718/3121 [00:16<00:02, 172.93it/s]
 88%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎                | 2736/3121 [00:16<00:02, 170.40it/s]
 88%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏               | 2754/3121 [00:16<00:02, 170.38it/s]
 89%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉               | 2772/3121 [00:16<00:02, 169.16it/s]
 89%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋              | 2791/3121 [00:16<00:01, 169.99it/s]
 90%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌             | 2810/3121 [00:16<00:01, 171.26it/s]
 91%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎            | 2829/3121 [00:16<00:01, 172.00it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏           | 2847/3121 [00:16<00:01, 169.76it/s]
 92%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉           | 2865/3121 [00:16<00:01, 169.80it/s]
 92%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋          | 2883/3121 [00:17<00:01, 171.72it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌         | 2902/3121 [00:17<00:01, 172.33it/s]
 94%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎        | 2920/3121 [00:17<00:01, 172.27it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████        | 2938/3121 [00:17<00:01, 169.92it/s]
 95%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊       | 2955/3121 [00:17<00:00, 168.58it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌      | 2973/3121 [00:17<00:00, 171.65it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍     | 2991/3121 [00:17<00:00, 169.56it/s]
 96%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏    | 3010/3121 [00:17<00:00, 170.82it/s]
 97%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████    | 3029/3121 [00:17<00:00, 171.71it/s]
 98%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊   | 3047/3121 [00:18<00:00, 170.27it/s]
 98%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌  | 3065/3121 [00:18<00:00, 172.55it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 3083/3121 [00:18<00:00, 172.76it/s]
 99%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏| 3101/3121 [00:18<00:00, 170.32it/s]
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉| 3120/3121 [00:18<00:00, 171.36it/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3121/3121 [00:18<00:00, 169.16it/s]

We can now compare the kurtosis measures obtained with the constrained fit to the measures obtained before, where we see that many of the artefactual voxels have now been corrected. In particular outliers caused by pure noise – instead of for example acquisition artefacts – can be corrected with this method.

compare_maps([dkifit_plus], ['mk', 'ak', 'rk'], fit_labels=['DKI+'],
             filename='Kurtosis_tensor_standard_measures_plus.png')
reconst dki

DKI standard kurtosis measures obtained with constrained optimization.

When using constrained optimization, the expected range of the kurtosis measures is also naturally constrained, and so does not typically require additional clipping.

Finally, constrained optimization obviates the need for smoothing in many cases:

dkifit_noisy = dkimodel.fit(data[:, :, 9:10], mask=mask)
dkifit_noisy_plus = dkimodel_plus.fit(data[:, :, 9:10], mask=mask)

compare_maps([dkifit_noisy, dkifit_noisy_plus], ['mk', 'ak', 'rk'],
             fit_labels=['DKI', 'DKI+'], map_kwargs={'vmin': 0, 'vmax': 1.5},
             filename='Kurtosis_tensor_standard_measures_noisy.png')
reconst dki
  0%|                                                                                                                                                   | 0/3121 [00:00<?, ?it/s]
  2%|███▎                                                                                                                                     | 76/3121 [00:00<00:04, 694.86it/s]
  5%|██████▎                                                                                                                                 | 146/3121 [00:00<00:06, 490.21it/s]
  6%|████████▊                                                                                                                               | 202/3121 [00:00<00:05, 513.21it/s]
  9%|███████████▋                                                                                                                            | 268/3121 [00:00<00:05, 561.23it/s]
 11%|███████████████                                                                                                                         | 345/3121 [00:00<00:04, 628.84it/s]
 14%|██████████████████▌                                                                                                                     | 427/3121 [00:00<00:03, 688.36it/s]
 16%|█████████████████████▊                                                                                                                  | 500/3121 [00:00<00:03, 700.26it/s]
 19%|█████████████████████████▍                                                                                                              | 584/3121 [00:00<00:03, 710.39it/s]
 21%|████████████████████████████▋                                                                                                           | 657/3121 [00:01<00:03, 716.04it/s]
 23%|███████████████████████████████▉                                                                                                        | 732/3121 [00:01<00:03, 719.81it/s]
 26%|███████████████████████████████████                                                                                                     | 805/3121 [00:01<00:03, 703.39it/s]
 28%|██████████████████████████████████████▏                                                                                                 | 876/3121 [00:01<00:03, 686.55it/s]
 31%|█████████████████████████████████████████▉                                                                                              | 962/3121 [00:01<00:03, 717.19it/s]
 33%|████████████████████████████████████████████▊                                                                                          | 1036/3121 [00:01<00:02, 723.58it/s]
 36%|███████████████████████████████████████████████▉                                                                                       | 1109/3121 [00:01<00:02, 716.26it/s]
 38%|███████████████████████████████████████████████████▎                                                                                   | 1187/3121 [00:01<00:02, 718.29it/s]
 40%|██████████████████████████████████████████████████████▍                                                                                | 1259/3121 [00:01<00:02, 713.15it/s]
 43%|█████████████████████████████████████████████████████████▌                                                                             | 1332/3121 [00:01<00:02, 717.47it/s]
 45%|█████████████████████████████████████████████████████████████▏                                                                         | 1414/3121 [00:02<00:02, 719.22it/s]
 48%|████████████████████████████████████████████████████████████████▊                                                                      | 1499/3121 [00:02<00:02, 744.77it/s]
 51%|████████████████████████████████████████████████████████████████████▍                                                                  | 1582/3121 [00:02<00:02, 749.08it/s]
 53%|███████████████████████████████████████████████████████████████████████▊                                                               | 1660/3121 [00:02<00:01, 738.14it/s]
 56%|███████████████████████████████████████████████████████████████████████████▍                                                           | 1743/3121 [00:02<00:01, 743.64it/s]
 59%|███████████████████████████████████████████████████████████████████████████████                                                        | 1828/3121 [00:02<00:01, 755.11it/s]
 62%|███████████████████████████████████████████████████████████████████████████████████▏                                                   | 1923/3121 [00:02<00:01, 789.31it/s]
 64%|██████████████████████████████████████████████████████████████████████████████████████▉                                                | 2011/3121 [00:02<00:01, 793.91it/s]
 67%|██████████████████████████████████████████████████████████████████████████████████████████▊                                            | 2100/3121 [00:02<00:01, 799.87it/s]
 70%|██████████████████████████████████████████████████████████████████████████████████████████████▎                                        | 2180/3121 [00:03<00:01, 788.64it/s]
 72%|█████████████████████████████████████████████████████████████████████████████████████████████████▋                                     | 2259/3121 [00:03<00:01, 784.43it/s]
 75%|█████████████████████████████████████████████████████████████████████████████████████████████████████▏                                 | 2338/3121 [00:03<00:01, 765.38it/s]
 77%|████████████████████████████████████████████████████████████████████████████████████████████████████████▍                              | 2415/3121 [00:03<00:00, 746.71it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▋                           | 2490/3121 [00:03<00:00, 728.22it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████▊                        | 2563/3121 [00:03<00:00, 727.82it/s]
 85%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊                    | 2653/3121 [00:03<00:00, 746.38it/s]
 88%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎                | 2734/3121 [00:03<00:00, 744.84it/s]
 90%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋             | 2813/3121 [00:03<00:00, 738.05it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍         | 2899/3121 [00:04<00:00, 752.56it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉      | 2980/3121 [00:04<00:00, 767.77it/s]
 98%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏  | 3057/3121 [00:04<00:00, 765.55it/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3121/3121 [00:04<00:00, 727.00it/s]

  0%|                                                                                                                                                   | 0/3121 [00:00<?, ?it/s]C:\Users\skoudoro\AppData\Local\Continuum\Anaconda3\envs\py310\lib\site-packages\cvxpy\problems\problem.py:1403: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
C:\Users\skoudoro\Devel\dipy\dipy\core\optimize.py:517: UserWarning: Solver failed to produce an optimum: optimal_inaccurate.
  warnings.warn(msg)

  0%|▍                                                                                                                                         | 10/3121 [00:01<08:01,  6.46it/s]
  0%|▍                                                                                                                                         | 11/3121 [00:02<15:43,  3.30it/s]
  1%|█▏                                                                                                                                        | 27/3121 [00:02<04:18, 11.99it/s]
  1%|█▌                                                                                                                                        | 35/3121 [00:05<09:28,  5.43it/s]
  2%|██                                                                                                                                        | 48/3121 [00:07<07:47,  6.57it/s]
  2%|██▎                                                                                                                                       | 53/3121 [00:08<08:59,  5.69it/s]
  2%|██▌                                                                                                                                       | 58/3121 [00:10<10:28,  4.88it/s]
  2%|███▎                                                                                                                                      | 75/3121 [00:10<05:12,  9.73it/s]
  3%|███▉                                                                                                                                      | 89/3121 [00:12<05:22,  9.41it/s]
  3%|████▏                                                                                                                                     | 94/3121 [00:14<09:06,  5.54it/s]
  4%|████▉                                                                                                                                    | 112/3121 [00:14<05:05,  9.86it/s]
  4%|█████▋                                                                                                                                   | 130/3121 [00:15<03:11, 15.64it/s]
  5%|██████▍                                                                                                                                  | 147/3121 [00:15<02:10, 22.80it/s]
  5%|███████▏                                                                                                                                 | 165/3121 [00:15<01:30, 32.58it/s]
  6%|████████                                                                                                                                 | 183/3121 [00:15<01:06, 44.29it/s]
  6%|████████▊                                                                                                                                | 202/3121 [00:15<00:49, 58.85it/s]
  7%|█████████▋                                                                                                                               | 220/3121 [00:15<00:39, 73.48it/s]
  8%|██████████▍                                                                                                                              | 237/3121 [00:15<00:32, 88.01it/s]
  8%|███████████                                                                                                                             | 255/3121 [00:15<00:27, 103.52it/s]
  9%|███████████▉                                                                                                                            | 274/3121 [00:15<00:23, 118.76it/s]
  9%|████████████▋                                                                                                                           | 292/3121 [00:16<00:21, 129.60it/s]
 10%|█████████████▌                                                                                                                          | 311/3121 [00:16<00:19, 140.75it/s]
 11%|██████████████▎                                                                                                                         | 328/3121 [00:16<00:19, 146.45it/s]
 11%|███████████████                                                                                                                         | 347/3121 [00:16<00:18, 153.52it/s]
 12%|███████████████▉                                                                                                                        | 365/3121 [00:16<00:17, 156.65it/s]
 12%|████████████████▋                                                                                                                       | 384/3121 [00:16<00:16, 161.56it/s]
 13%|█████████████████▌                                                                                                                      | 403/3121 [00:16<00:16, 165.10it/s]
 13%|██████████████████▎                                                                                                                     | 421/3121 [00:16<00:16, 164.54it/s]
 14%|███████████████████▏                                                                                                                    | 441/3121 [00:16<00:15, 168.57it/s]
 15%|████████████████████                                                                                                                    | 459/3121 [00:17<00:15, 167.39it/s]
 15%|████████████████████▊                                                                                                                   | 478/3121 [00:17<00:15, 169.26it/s]
 16%|█████████████████████▌                                                                                                                  | 496/3121 [00:17<00:15, 167.87it/s]
 16%|██████████████████████▎                                                                                                                 | 513/3121 [00:17<00:15, 166.51it/s]
 17%|███████████████████████▏                                                                                                                | 532/3121 [00:17<00:15, 168.11it/s]
 18%|████████████████████████                                                                                                                | 551/3121 [00:17<00:15, 169.80it/s]
 18%|████████████████████████▊                                                                                                               | 569/3121 [00:17<00:15, 168.23it/s]
 19%|█████████████████████████▌                                                                                                              | 588/3121 [00:17<00:14, 169.88it/s]
 19%|██████████████████████████▍                                                                                                             | 606/3121 [00:17<00:14, 168.85it/s]
 20%|███████████████████████████▎                                                                                                            | 626/3121 [00:18<00:14, 170.24it/s]
 21%|████████████████████████████                                                                                                            | 645/3121 [00:18<00:14, 171.27it/s]
 21%|████████████████████████████▉                                                                                                           | 663/3121 [00:18<00:14, 169.28it/s]
 22%|█████████████████████████████▋                                                                                                          | 680/3121 [00:18<00:14, 168.39it/s]
 22%|██████████████████████████████▎                                                                                                         | 697/3121 [00:18<00:14, 167.93it/s]
 23%|███████████████████████████████▏                                                                                                        | 715/3121 [00:18<00:14, 169.71it/s]
 23%|███████████████████████████████▉                                                                                                        | 733/3121 [00:18<00:14, 168.12it/s]
 24%|████████████████████████████████▊                                                                                                       | 752/3121 [00:18<00:13, 169.83it/s]
 25%|█████████████████████████████████▌                                                                                                      | 769/3121 [00:18<00:14, 167.44it/s]
 25%|██████████████████████████████████▎                                                                                                     | 787/3121 [00:18<00:13, 170.08it/s]
 26%|███████████████████████████████████                                                                                                     | 806/3121 [00:19<00:13, 171.20it/s]
 26%|███████████████████████████████████▉                                                                                                    | 824/3121 [00:19<00:13, 169.17it/s]
 27%|████████████████████████████████████▋                                                                                                   | 843/3121 [00:19<00:13, 170.55it/s]
 28%|█████████████████████████████████████▌                                                                                                  | 861/3121 [00:19<00:13, 168.83it/s]
 28%|██████████████████████████████████████▎                                                                                                 | 879/3121 [00:19<00:13, 169.31it/s]
 29%|███████████████████████████████████████▏                                                                                                | 898/3121 [00:19<00:13, 170.65it/s]
 29%|███████████████████████████████████████▉                                                                                                | 917/3121 [00:19<00:12, 171.58it/s]
 30%|████████████████████████████████████████▊                                                                                               | 936/3121 [00:19<00:12, 172.22it/s]
 31%|█████████████████████████████████████████▌                                                                                              | 954/3121 [00:19<00:12, 170.84it/s]
 31%|██████████████████████████████████████████▍                                                                                             | 974/3121 [00:20<00:12, 171.68it/s]
 32%|███████████████████████████████████████████▎                                                                                            | 993/3121 [00:20<00:12, 172.29it/s]
 32%|███████████████████████████████████████████▊                                                                                           | 1012/3121 [00:20<00:12, 172.71it/s]
 33%|████████████████████████████████████████████▌                                                                                          | 1030/3121 [00:20<00:12, 172.08it/s]
 34%|█████████████████████████████████████████████▎                                                                                         | 1048/3121 [00:20<00:12, 170.53it/s]
 34%|██████████████████████████████████████████████▏                                                                                        | 1068/3121 [00:20<00:11, 173.51it/s]
 35%|██████████████████████████████████████████████▉                                                                                        | 1086/3121 [00:20<00:11, 170.87it/s]
 35%|███████████████████████████████████████████████▊                                                                                       | 1105/3121 [00:20<00:11, 171.72it/s]
 36%|████████████████████████████████████████████████▌                                                                                      | 1123/3121 [00:20<00:11, 169.58it/s]
 37%|█████████████████████████████████████████████████▎                                                                                     | 1140/3121 [00:21<00:11, 169.57it/s]
 37%|██████████████████████████████████████████████████▏                                                                                    | 1159/3121 [00:21<00:11, 171.68it/s]
 38%|██████████████████████████████████████████████████▉                                                                                    | 1178/3121 [00:21<00:11, 172.30it/s]
 38%|███████████████████████████████████████████████████▋                                                                                   | 1196/3121 [00:21<00:11, 172.20it/s]
 39%|████████████████████████████████████████████████████▌                                                                                  | 1214/3121 [00:21<00:11, 169.92it/s]
 39%|█████████████████████████████████████████████████████▏                                                                                 | 1231/3121 [00:21<00:11, 168.33it/s]
 40%|██████████████████████████████████████████████████████                                                                                 | 1251/3121 [00:21<00:11, 169.81it/s]
 41%|██████████████████████████████████████████████████████▉                                                                                | 1270/3121 [00:21<00:10, 171.08it/s]
 41%|███████████████████████████████████████████████████████▋                                                                               | 1288/3121 [00:21<00:10, 169.12it/s]
 42%|████████████████████████████████████████████████████████▌                                                                              | 1307/3121 [00:22<00:10, 170.50it/s]
 42%|█████████████████████████████████████████████████████████▎                                                                             | 1325/3121 [00:22<00:10, 169.49it/s]
 43%|██████████████████████████████████████████████████████████                                                                             | 1342/3121 [00:22<00:10, 169.08it/s]
 44%|██████████████████████████████████████████████████████████▊                                                                            | 1359/3121 [00:22<00:10, 167.56it/s]
 44%|███████████████████████████████████████████████████████████▌                                                                           | 1378/3121 [00:22<00:10, 169.50it/s]
 45%|████████████████████████████████████████████████████████████▍                                                                          | 1397/3121 [00:22<00:10, 170.78it/s]
 45%|█████████████████████████████████████████████████████████████▋                                                                          | 1415/3121 [00:24<00:52, 32.71it/s]
 46%|██████████████████████████████████████████████████████████████▍                                                                         | 1433/3121 [00:24<00:39, 42.83it/s]
 46%|███████████████████████████████████████████████████████████████▏                                                                        | 1451/3121 [00:24<00:30, 55.08it/s]
 47%|████████████████████████████████████████████████████████████████                                                                        | 1470/3121 [00:24<00:23, 69.90it/s]
 48%|████████████████████████████████████████████████████████████████▊                                                                       | 1488/3121 [00:24<00:19, 84.23it/s]
 48%|█████████████████████████████████████████████████████████████████▌                                                                      | 1505/3121 [00:24<00:16, 97.56it/s]
 49%|█████████████████████████████████████████████████████████████████▉                                                                     | 1525/3121 [00:24<00:14, 113.96it/s]
 49%|███████████████████████████████████████████████████████████████████▏                                                                    | 1542/3121 [00:26<00:50, 31.36it/s]
 50%|████████████████████████████████████████████████████████████████████                                                                    | 1561/3121 [00:26<00:37, 41.91it/s]
 51%|████████████████████████████████████████████████████████████████████▊                                                                   | 1578/3121 [00:26<00:29, 52.89it/s]
 51%|█████████████████████████████████████████████████████████████████████▎                                                                  | 1592/3121 [00:28<01:02, 24.35it/s]
 52%|██████████████████████████████████████████████████████████████████████                                                                  | 1609/3121 [00:28<00:46, 32.41it/s]
 52%|██████████████████████████████████████████████████████████████████████▋                                                                 | 1621/3121 [00:29<01:16, 19.72it/s]
 52%|███████████████████████████████████████████████████████████████████████▎                                                                | 1637/3121 [00:29<00:55, 26.90it/s]
 53%|████████████████████████████████████████████████████████████████████████                                                                | 1655/3121 [00:29<00:39, 37.22it/s]
 54%|████████████████████████████████████████████████████████████████████████▉                                                               | 1674/3121 [00:29<00:28, 50.42it/s]
 54%|█████████████████████████████████████████████████████████████████████████▋                                                              | 1691/3121 [00:30<00:22, 63.51it/s]
 55%|██████████████████████████████████████████████████████████████████████████▌                                                             | 1710/3121 [00:30<00:17, 80.40it/s]
 55%|███████████████████████████████████████████████████████████████████████████▎                                                            | 1728/3121 [00:30<00:14, 95.21it/s]
 56%|███████████████████████████████████████████████████████████████████████████▌                                                           | 1747/3121 [00:30<00:12, 110.98it/s]
 57%|████████████████████████████████████████████████████████████████████████████▎                                                          | 1765/3121 [00:30<00:10, 124.38it/s]
 57%|█████████████████████████████████████████████████████████████████████████████                                                          | 1782/3121 [00:30<00:09, 134.32it/s]
 58%|█████████████████████████████████████████████████████████████████████████████▊                                                         | 1800/3121 [00:30<00:09, 144.82it/s]
 58%|██████████████████████████████████████████████████████████████████████████████▋                                                        | 1819/3121 [00:30<00:08, 152.90it/s]
 59%|███████████████████████████████████████████████████████████████████████████████▍                                                       | 1837/3121 [00:30<00:08, 156.20it/s]
 59%|████████████████████████████████████████████████████████████████████████████████▎                                                      | 1856/3121 [00:30<00:07, 161.24it/s]
 60%|█████████████████████████████████████████████████████████████████████████████████                                                      | 1874/3121 [00:31<00:07, 162.88it/s]
 61%|█████████████████████████████████████████████████████████████████████████████████▉                                                     | 1894/3121 [00:31<00:07, 166.33it/s]
 61%|██████████████████████████████████████████████████████████████████████████████████▋                                                    | 1913/3121 [00:31<00:07, 168.50it/s]
 62%|███████████████████████████████████████████████████████████████████████████████████▌                                                   | 1931/3121 [00:31<00:07, 169.04it/s]
 62%|████████████████████████████████████████████████████████████████████████████████████▎                                                  | 1949/3121 [00:31<00:06, 167.75it/s]
 63%|█████████████████████████████████████████████████████████████████████████████████████                                                  | 1966/3121 [00:31<00:06, 166.84it/s]
 64%|█████████████████████████████████████████████████████████████████████████████████████▉                                                 | 1986/3121 [00:31<00:06, 168.79it/s]
 64%|██████████████████████████████████████████████████████████████████████████████████████▋                                                | 2005/3121 [00:31<00:06, 170.35it/s]
 65%|███████████████████████████████████████████████████████████████████████████████████████▌                                               | 2023/3121 [00:31<00:06, 168.62it/s]
 65%|████████████████████████████████████████████████████████████████████████████████████████▎                                              | 2042/3121 [00:32<00:06, 170.15it/s]
 66%|█████████████████████████████████████████████████████████████████████████████████████████                                              | 2060/3121 [00:32<00:06, 168.78it/s]
 67%|█████████████████████████████████████████████████████████████████████████████████████████▉                                             | 2080/3121 [00:32<00:06, 170.47it/s]
 67%|██████████████████████████████████████████████████████████████████████████████████████████▋                                            | 2098/3121 [00:32<00:05, 170.89it/s]
 68%|███████████████████████████████████████████████████████████████████████████████████████████▌                                           | 2116/3121 [00:32<00:05, 168.99it/s]
 68%|████████████████████████████████████████████████████████████████████████████████████████████▎                                          | 2135/3121 [00:32<00:05, 170.41it/s]
 69%|█████████████████████████████████████████████████████████████████████████████████████████████▏                                         | 2153/3121 [00:32<00:05, 167.63it/s]
 70%|█████████████████████████████████████████████████████████████████████████████████████████████▉                                         | 2171/3121 [00:32<00:05, 167.74it/s]
 70%|██████████████████████████████████████████████████████████████████████████████████████████████▋                                        | 2190/3121 [00:32<00:05, 169.53it/s]
 71%|███████████████████████████████████████████████████████████████████████████████████████████████▌                                       | 2208/3121 [00:33<00:05, 168.04it/s]
 71%|████████████████████████████████████████████████████████████████████████████████████████████████▎                                      | 2226/3121 [00:33<00:05, 165.96it/s]
 72%|█████████████████████████████████████████████████████████████████████████████████████████████████▏                                     | 2246/3121 [00:33<00:05, 169.82it/s]
 73%|█████████████████████████████████████████████████████████████████████████████████████████████████▉                                     | 2264/3121 [00:33<00:05, 170.38it/s]
 73%|██████████████████████████████████████████████████████████████████████████████████████████████████▋                                    | 2282/3121 [00:33<00:04, 168.77it/s]
 74%|███████████████████████████████████████████████████████████████████████████████████████████████████▍                                   | 2300/3121 [00:33<00:04, 167.51it/s]
 74%|████████████████████████████████████████████████████████████████████████████████████████████████████▏                                  | 2317/3121 [00:33<00:04, 167.74it/s]
 75%|█████████████████████████████████████████████████████████████████████████████████████████████████████                                  | 2336/3121 [00:33<00:04, 170.77it/s]
 75%|█████████████████████████████████████████████████████████████████████████████████████████████████████▊                                 | 2354/3121 [00:33<00:04, 171.08it/s]
 76%|██████████████████████████████████████████████████████████████████████████████████████████████████████▋                                | 2373/3121 [00:34<00:04, 171.89it/s]
 77%|███████████████████████████████████████████████████████████████████████████████████████████████████████▍                               | 2392/3121 [00:34<00:04, 172.44it/s]
 77%|████████████████████████████████████████████████████████████████████████████████████████████████████████▏                              | 2410/3121 [00:34<00:04, 170.70it/s]
 78%|█████████████████████████████████████████████████████████████████████████████████████████████████████████                              | 2430/3121 [00:34<00:04, 171.91it/s]
 78%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▉                             | 2448/3121 [00:34<00:03, 171.53it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▋                            | 2466/3121 [00:34<00:03, 169.47it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▍                           | 2485/3121 [00:34<00:03, 170.75it/s]
 80%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▎                          | 2503/3121 [00:34<00:03, 167.41it/s]
 81%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████                          | 2522/3121 [00:34<00:03, 170.58it/s]
 81%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▊                         | 2540/3121 [00:35<00:03, 168.78it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████▋                        | 2559/3121 [00:35<00:03, 170.26it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████▌                       | 2578/3121 [00:35<00:03, 171.30it/s]
 83%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎                      | 2596/3121 [00:35<00:03, 169.03it/s]
 84%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████                      | 2615/3121 [00:35<00:02, 170.86it/s]
 84%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉                     | 2633/3121 [00:35<00:02, 168.99it/s]
 85%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋                    | 2652/3121 [00:35<00:02, 170.42it/s]
 86%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍                   | 2670/3121 [00:35<00:02, 168.67it/s]
 86%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎                  | 2688/3121 [00:35<00:02, 169.28it/s]
 87%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████                  | 2706/3121 [00:35<00:02, 171.02it/s]
 87%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊                 | 2725/3121 [00:36<00:02, 171.85it/s]
 88%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋                | 2743/3121 [00:36<00:02, 169.64it/s]
 88%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍               | 2762/3121 [00:36<00:02, 170.87it/s]
 89%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏              | 2780/3121 [00:36<00:01, 171.15it/s]
 90%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████              | 2799/3121 [00:36<00:01, 172.07it/s]
 90%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊             | 2817/3121 [00:36<00:01, 169.81it/s]
 91%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋            | 2836/3121 [00:36<00:01, 170.99it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍           | 2854/3121 [00:36<00:01, 169.05it/s]
 92%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏          | 2872/3121 [00:36<00:01, 169.89it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████          | 2890/3121 [00:37<00:01, 170.74it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊         | 2909/3121 [00:37<00:01, 171.65it/s]
 94%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌        | 2927/3121 [00:37<00:01, 169.50it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍       | 2945/3121 [00:37<00:01, 170.66it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏      | 2963/3121 [00:37<00:00, 169.18it/s]
 96%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉      | 2982/3121 [00:37<00:00, 170.27it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊     | 3000/3121 [00:37<00:00, 168.54it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌    | 3019/3121 [00:37<00:00, 170.10it/s]
 97%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍   | 3038/3121 [00:37<00:00, 168.24it/s]
 98%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏  | 3056/3121 [00:38<00:00, 169.97it/s]
 98%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉  | 3074/3121 [00:39<00:01, 34.60it/s]
 99%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌ | 3087/3121 [00:41<00:01, 20.46it/s]
 99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏| 3102/3121 [00:41<00:00, 26.85it/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋| 3113/3121 [00:44<00:00, 10.76it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3121/3121 [00:50<00:00,  4.74it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3121/3121 [00:50<00:00, 62.42it/s]

DKI standard kurtosis measures obtained on unsmoothed data with constrained optimization.

Mean kurtosis tensor and kurtosis fractional anisotropy#

As pointed by previous studies [Hansen2013], axial, radial and mean kurtosis depends on the information of both diffusion and kurtosis tensor. DKI measures that only depend on the kurtosis tensor include the mean of the kurtosis tensor [Hansen2013], and the kurtosis fractional anisotropy [GlennR2015]. These measures are computed and illustrated below:

compare_maps([dkifit_plus], ['mkt', 'kfa'], fit_labels=['DKI+'],
             map_kwargs=[{'vmin': 0, 'vmax': 1.5}, {'vmin': 0, 'vmax': 1}],
             filename='Measures_from_kurtosis_tensor_only.png')
reconst dki

DKI measures obtained from the kurtosis tensor only.

As reported by [Hansen2013], the mean of the kurtosis tensor (MKT) produces similar maps than the standard mean kurtosis (MK). On the other hand, the kurtosis fractional anisotropy (KFA) maps shows that the kurtosis tensor have different degrees of anisotropy than the FA measures from the diffusion tensor.

References#

[Jensen2005] (1,2)

Jensen JH, Helpern JA, Ramani A, Lu H, Kaczynski K (2005). Diffusional Kurtosis Imaging: The Quantification of Non_Gaussian Water Diffusion by Means of Magnetic Resonance Imaging. Magnetic Resonance in Medicine 53: 1432-1440

[Jensen2010]

Jensen JH, Helpern JA (2010). MRI quantification of non-Gaussian water diffusion by kurtosis analysis. NMR in Biomedicine 23(7): 698-710

[Fierem2011]

Fieremans E, Jensen JH, Helpern JA (2011). White matter characterization with diffusion kurtosis imaging. NeuroImage 58: 177-188

[Veraar2011]

Veraart J, Poot DH, Van Hecke W, Blockx I, Van der Linden A, Verhoye M, Sijbers J (2011). More Accurate Estimation of Diffusion Tensor Parameters Using Diffusion Kurtosis Imaging. Magnetic Resonance in Medicine 65(1): 138-145

[NetoHe2012] (1,2,3,4)

Neto Henriques R, Ferreira H, Correia M, (2012). Diffusion kurtosis imaging of the healthy human brain. Master Dissertation Bachelor and Master Programin Biomedical Engineering and Biophysics, Faculty of Sciences. https://repositorio.ul.pt/bitstream/10451/8511/1/ulfc104137_tm_Rafael_Henriques.pdf

[Hansen2013] (1,2,3)

Hansen B, Lund TE, Sangill R, and Jespersen SN (2013). Experimentally and computationally393fast method for estimation of a mean kurtosis. Magnetic Resonance in Medicine 69, 1754–1760.394doi:10.1002/mrm.24743

[GlennR2015]

Glenn GR, Helpern JA, Tabesh A, Jensen JH (2015). Quantitative assessment of diffusional387kurtosis anisotropy. NMR in Biomedicine28, 448–459. doi:10.1002/nbm.3271

[NetoHe2015]

Neto Henriques R, Correia MM, Nunes RG, Ferreira HA (2015). Exploring the 3D geometry of the diffusion kurtosis tensor - Impact on the development of robust tractography procedures and novel biomarkers, NeuroImage 111: 85-99

[Perron2015]

Perrone D, Aelterman J, Pižurica A, Jeurissen B, Philips W, Leemans A, (2015). The effect of Gibbs ringing artifacts on measures derived from diffusion MRI. Neuroimage 120, 441-455. https://doi.org/10.1016/j.neuroimage.2015.06.068.

[TaxCMW2015]

Tax CMW, Otte WM, Viergever MA, Dijkhuizen RM, Leemans A (2014). REKINDLE: Robust extraction of kurtosis INDices with linear estimation. Magnetic Resonance in Medicine 73(2): 794-808.

[Hansen2016]

Hansen, B, Jespersen, SN (2016). Data for evaluation of fast kurtosis strategies, b-value optimization and exploration of diffusion MRI contrast. Scientific Data 3: 160072 doi:10.1038/sdata.2016.72

[NetoHe2018]

Neto Henriques R (2018). Advanced Methods for Diffusion MRI Data Analysis and their Application to the Healthy Ageing Brain (Doctoral thesis). https://doi.org/10.17863/CAM.29356

[DelaHa2020] (1,2)

Dela Haije et al. “Enforcing necessary non-negativity constraints for common diffusion MRI models using sum of squares programming”. NeuroImage 209, 2020, 116405.

Total running time of the script: (2 minutes 11.477 seconds)

Gallery generated by Sphinx-Gallery