示例#1
0
def mri_knee_data_8_channel():
    """Raw data for 8 channel MRI of a knee.

    This is an SE measurement of the knee of a healthy volunteer.

    The data has been rescaled so that the reconstruction fits approximately in
    [0, 1].

    See the data source with DOI `10.5281/zenodo.800529`_ or the
    `project webpage`_ for further information.

    See Also
    --------
    mri_knee_inverse_8_channel

    References
    ----------
    .. _10.5281/zenodo.800529: https://zenodo.org/record/800529
    .. _project webpage: http://imsc.uni-graz.at/mobis/internal/\
platform_aktuell.html
    """
    # TODO: Store data in some ODL controlled url
    url = 'https://zenodo.org/record/800529/files/3_rawdata_knee_8ch.mat'
    dct = get_data('3_rawdata_knee_8ch.mat', subset=DATA_SUBSET, url=url)

    # Change axes to match ODL definitions
    data = flip(np.swapaxes(dct['rawdata'], 0, -1) * 9e3, 2)

    return data
示例#2
0
def mri_head_data_32_channel():
    """Raw data for 32 channel MRI of a head.

    This is a T2 weighted TSE scan of a healthy volunteer.

    The data has been rescaled so that the reconstruction fits approximately in
    [0, 1].

    See the data source with DOI `10.5281/zenodo.800527`_ or the
    `project webpage`_ for further information.

    See Also
    --------
    mri_head_inverse_32_channel

    References
    ----------
    .. _10.5281/zenodo.800527: https://zenodo.org/record/800527
    .. _project webpage: http://imsc.uni-graz.at/mobis/internal/\
platform_aktuell.html
    """
    # TODO: Store data in some ODL controlled url
    url = 'https://zenodo.org/record/800527/files/2_rawdata_brainT2_32ch.mat'
    dct = get_data('2_rawdata_brainT2_32ch.mat', subset=DATA_SUBSET, url=url)

    # Change axes to match ODL definitions
    data = flip(np.swapaxes(dct['rawdata'], 0, -1) * 7e3, 2)

    return data
示例#3
0
def walnut_data():
    """Tomographic X-ray data of a walnut.

    Notes
    -----
    See the article `Tomographic X-ray data of a walnut`_ for further
    information.

    See Also
    --------
    walnut_geometry

    References
    ----------
    .. _Tomographic X-ray data of a walnut: https://arxiv.org/abs/1502.04064
    """
    # TODO: Store data in some ODL controlled url
    url = 'http://www.fips.fi/dataset/CT_walnut_v1/FullSizeSinograms.mat'
    dct = get_data('walnut.mat', subset=DATA_SUBSET, url=url)

    # Change axes to match ODL definitions
    data = np.swapaxes(dct['sinogram1200'], 0, 1)[::-1, ::-1]
    data = data.astype('float')

    # Very crude gain normalization
    data = -np.log(data / np.max(data, axis=1)[:, None])
    return data
示例#4
0
def lotus_root_data():
    """Tomographic X-ray data of a lotus root.

    Notes
    -----
    See the article `Tomographic X-ray data of a lotus root filled with
    attenuating objects`_ for further information.

    See Also
    --------
    lotus_root_geometry

    References
    ----------
    .. _Tomographic X-ray data of a lotus root filled with attenuating objects:
       https://arxiv.org/abs/1609.07299
    """
    # TODO: Store data in some ODL controlled url
    url = 'http://www.fips.fi/dataset/CT_Lotus_v1/sinogram.mat'
    dct = get_data('lotus_root.mat', subset=DATA_SUBSET, url=url)

    # Change axes to match ODL definitions
    data = np.swapaxes(dct['sinogram'], 0, 1)[:, :]
    data = data.astype('float')

    return data
示例#5
0
def building(shape=None, gray=False):
    """Photo of the Centre for Mathematical Sciences in Cambridge.

    Returns
    -------
    An image with the following properties:
        image type: color (or gray scales if `gray=True`)
        size: [442, 331] (if not specified by `size`)
        scale: [0, 1]
        type: float64
    """
    # TODO: Store data in some ODL controlled url
    name = 'cms.mat'
    url = URL_CAM + name
    dct = get_data(name, subset=DATA_SUBSET, url=url)
    im = np.rot90(dct['im'], k=3)

    return convert(im, shape, gray=gray)
示例#6
0
def brain_phantom(shape=None):
    """Brain phantom for FDG PET simulations.

    Returns
    -------
    An image with the following properties:
        image type: gray scales
        shape: [1024, 1024] (if not specified by `size`)
        scale: [0, 1]
        type: float64
    """
    # TODO: Store data in some ODL controlled url
    name = 'PET_phantom.mat'
    url = URL_CAM + name
    dct = get_data(name, subset=DATA_SUBSET, url=url)
    im = np.rot90(dct['im'], k=3)

    return convert(im, shape)
示例#7
0
def rings(shape=None, gray=False):
    """Photo of married couple holding hands.

    Returns
    -------
    An image with the following properties:
        image type: color (or gray scales if `gray=True`)
        size: [3264, 2448] (if not specified by `size`)
        scale: [0, 1]
        type: float64
    """
    # TODO: Store data in some ODL controlled url
    name = 'rings.mat'
    url = URL_CAM + name
    dct = get_data(name, subset=DATA_SUBSET, url=url)
    im = np.rot90(dct['im'], k=2)

    return convert(im, shape, gray=gray)
示例#8
0
def resolution_phantom(shape=None):
    """Resolution phantom for tomographic simulations.

    Returns
    -------
    An image with the following properties:
        image type: gray scales
        shape: [1024, 1024] (if not specified by `size`)
        scale: [0, 1]
        type: float64
    """
    # TODO: Store data in some ODL controlled url
    # TODO: This can be also done with ODL's ellipse_phantom
    name = 'phantom_resolution.mat'
    url = URL_CAM + name
    dct = get_data(name, subset=DATA_SUBSET, url=url)
    im = np.rot90(dct['im'], k=3)

    return convert(im, shape)
示例#9
0
def blurring_kernel(shape=None):
    """Blurring kernel for convolution simulations.

    The kernel is scaled to sum to one.

    Returns
    -------
    An image with the following properties:
        image type: gray scales
        size: [100, 100] (if not specified by `size`)
        scale: [0, 1]
        type: float64

    """
    # TODO: Store data in some ODL controlled url
    name = 'motionblur.mat'
    url = URL_CAM + name
    dct = get_data(name, subset=DATA_SUBSET, url=url)

    return convert(255 - dct['im'], shape, normalize='sum')