def _modified_shepp_logan_ellipsoids(ellipsoids):
    """Modify ellipsoids to give the modified Shepp-Logan phantom.

    Works for both 2d and 3d.
    """
    intensities = [1.0, -0.8, -0.2, -0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
    intensities[2] += 5e-17
    intensities[3] += 5e-17
    assert len(ellipsoids) == len(intensities)
    for ellipsoid, intensity in zip(ellipsoids, intensities):
        ellipsoid[0] = intensity
