tfmri.image.phantom

phantom(phantom_type='modified_shepp_logan', shape=[256, 256], num_coils=None, dtype=tf.float32, return_sensitivities=False)[source]

Generates a phantom image.

Available 2D phantoms are:

  • shepp_logan: The original Shepp-Logan phantom 1.

  • modified_shepp_logan: A variant of the Shepp-Logan phantom in which the contrast is improved for better visual perception 2.

Available 3D phantoms are:

  • kak_roberts: A simplified 3D extension of the Shepp-Logan phantom 3.

  • modified_kak_roberts: A variant of the Kak-Roberts phantom in which the contrast is improved for better visual perception 4.

  • koay_sarlls_ozarslan: Same as modified_kak_roberts.

Parameters
  • phantom_type – A string. If 2D, must be one of {'shepp_logan', 'modified_shepp_logan'}. If 3D, must be one of {'kak_roberts', 'modified_kak_roberts', 'koay_sarlls_ozarslan'}. Defaults to modified_shepp_logan for 2D phantoms and modified_kak_roberts for 3D phantoms.

  • shape – A list of ints. The shape of the generated phantom. Must have length 2 or 3.

  • num_coils

    An int. The number of coils for parallel imaging phantoms. If None, no coil array will be simulated. Defaults to None.

  • dtype – A string or tf.DType. The data type of the generated phantom.

  • return_sensitivities

    A boolean. If True, returns a tuple containing the phantom and the coil sensitivities. If False, returns the phantom. Defaults to False.

Returns

A Tensor of type dtype containing the generated phantom. Has shape shape if num_coils is None, or shape [num_coils, *shape] if num_coils is not None.

If return_sensitivities is True, returns a tuple of two tensors with equal shape and type, the first of which is the phantom and the second the coil sensitivities.

Raises

ValueError – If the requested ND phantom is not defined.

References

1

Shepp, L. A., & Logan, B. F. (1974). The Fourier reconstruction of a head section. IEEE Transactions on nuclear science, 21(3), 21-43.

2

Toft, P. (1996). The radon transform. Theory and Implementation (Ph. D. Dissertation)(Copenhagen: Technical University of Denmark).

3

Kak, A. C., & Slaney, M. (2001). Principles of computerized tomographic imaging. Society for Industrial and Applied Mathematics.

4

Koay, C. G., Sarlls, J. E., & Özarslan, E. (2007). Three‐dimensional analytical magnetic resonance imaging phantom in the Fourier domain. Magnetic Resonance in Medicine, 58(2), 430-436.