def mean_kurtosis_tensor(dki_params, min_kurtosis=-3.0 / 7, max_kurtosis=10):
    """ Computes mean of the kurtosis tensor (MKT) [1]_.

    Parameters
    ----------
    dki_params : ndarray (x, y, z, 27) or (n, 27)
        All parameters estimated from the diffusion kurtosis model.
        Parameters are ordered as follows:
            1) Three diffusion tensor's eigenvalues
            2) Three lines of the eigenvector matrix each containing the first,
               second and third coordinates of the eigenvector
            3) Fifteen elements of the kurtosis tensor
    min_kurtosis : float (optional)
        To keep kurtosis values within a plausible biophysical range, mean
        kurtosis values that are smaller than `min_kurtosis` are replaced with
        `min_kurtosis`. Default = -3./7 (theoretical kurtosis limit for regions
        that consist of water confined to spherical pores [2]_)
    max_kurtosis : float (optional)
        To keep kurtosis values within a plausible biophysical range, mean
        kurtosis values that are larger than `max_kurtosis` are replaced with
        `max_kurtosis`. Default = 10
    Returns
    -------
    mkt : array
        Calculated mean kurtosis tensor.

    Notes
    --------
    The MKT is defined as [1]_:

    .. math::

         MKT \\equiv \\frac{1}{4\\pi} \\int d
         \\Omega_{\\mathnbf{n}} n_i n_j n_k n_l W_{ijkl}


    which can be directly computed from the trace of the kurtosis tensor:

    .. math::

    MKT = \\frac{1}{5} Tr(\\mathbf{W}) = \\frac{1}{5}
    (W_{1111} + W_{2222} + W_{3333} + 2W_{1122} + 2W_{1133} + 2W_{2233})

    References
    ----------
    .. [1] Hansen, B., Lund, T. E., Sangill, R., and Jespersen, S. N. (2013).
           Experimentally and computationally fast method for estimation of
           a mean kurtosis.Magnetic Resonance in Medicine69,  1754–1760.388
           doi:10.1002/mrm.24743
    .. [2] Barmpoutis, A., & Zhuo, J., 2011. Diffusion kurtosis imaging:
           Robust estimation from DW-MRI using homogeneous polynomials.
           Proceedings of the 8th {IEEE} International Symposium on
           Biomedical Imaging: From Nano to Macro, ISBI 2011, 262-265.
           doi: 10.1109/ISBI.2011.5872402
    """
    MKT = 1 / 5 * (dki_params[..., 12] + dki_params[..., 13] + dki_params[
        ..., 14] + 2 * dki_params[..., 21] + 2 * dki_params[..., 22] + 2 *
        dki_params[..., 23])
    if min_kurtosis is not None:
        MKT = MKT.clip(min=min_kurtosis)
    if max_kurtosis is not None:
        MKT = MKT.clip(max=max_kurtosis)
    return MKT
