mr_shepp_logan

Contents

mr_shepp_logan#

snake.core.phantom.shepp_logan.mr_shepp_logan(N, E=None, B0=3, zlims=(-1, 1))[source]#

Generate a Shepp-Logan phantom with MR tissue parameters.

Parameters:
  • N (int or array_like) – Matrix size, (N, N, N), or (L, M, N).

  • E (array_like, optional) –

    ex13 numeric matrix defining e ellipses. The columns of E are:

    • x-coordinate of the center of the ellipsoid (in [-1, 1])

    • y-coordinate of the center of the ellipsoid (in [-1, 1])

    • z-coordinate of the center of the ellipsoid (in [-1, 1])

    • x principal axis of the ellipsoid

    • y principal axis of the ellipsoid

    • z principal axis of the ellipsoid

    • Angle of the ellipsoid (in rad)

    • spin density, M0

    • Parameter A for T1 determination

    • Parameter C for T1 determination

    • Explicit T1 value (in sec, or np.nan if model is used)

    • T2 value (in sec)

    • chi (change in magnetic susceptibility)

    If spin density is negative, M0, T1, and T2 will be subtracted instead of cummulatively added.

  • B0 (float, optimal) – Field strength (in Tesla).

  • zlims (tuple, optional) – Only for 3D. Specify bounds along z. Often we only want the middle portion of a 3D phantom, e.g., zlim=(-.5, .5).

Returns:

  • M0 (array_like) – The proton density.

  • T1 (array_like) – The T1 values.

  • T2 (array_like) – The T2 values.

  • T2star (array_like) – The T2 star values. The T2star values are calculated using magnetic susceptibility and T2.

  • labels (array_like) – An integer-labelled partition of the phantom.

Return type:

tuple[ndarray[Any, dtype[_ScalarType_co]], …]

Notes

Implements the phantoms described in [1].

If parameters A, C are given and T1 is None, T1 is determined according to the equation:

T1 = A*B0^C

The original source code [2]

References