tfmri.linalg.LinearOperatorMRI

class LinearOperatorMRI(image_shape, extra_shape=None, mask=None, trajectory=None, density=None, sensitivities=None, phase=None, fft_norm='ortho', sens_norm=True, dynamic_domain=None, dtype=tf.complex64, name=None)[source]

Bases: tensorflow_mri.python.util.linalg_imaging.LinearOperator

Linear operator representing an MRI encoding matrix.

The MRI operator, \(A\), maps a [batch of] images, \(x\) to a [batch of] measurement data (k-space), \(b\).

\[A x = b\]

This object may represent an undersampled MRI operator and supports Cartesian and non-Cartesian k-space sampling. The user may provide a sampling mask to represent an undersampled Cartesian operator, or a trajectory to represent a non-Cartesian operator.

This object may represent a multicoil MRI operator by providing coil sensitivities. Note that mask, trajectory and density should never have a coil dimension, including in the case of multicoil imaging. The coil dimension will be handled automatically.

The domain shape of this operator is extra_shape + image_shape. The range of this operator is extra_shape + [num_coils] + image_shape, for Cartesian imaging, or extra_shape + [num_coils] + [num_samples], for non-Cartesian imaging. [num_coils] is optional and only present for multicoil operators. This operator supports batches of images and will vectorize operations when possible.

Parameters
  • image_shape – A tf.TensorShape or a list of ints. The shape of the images that this operator acts on. Must have length 2 or 3.

  • extra_shape

    An optional tf.TensorShape or list of ints. Additional dimensions that should be included within the operator domain. Note that extra_shape is not needed to reconstruct independent batches of images. However, it is useful when this operator is used as part of a reconstruction that performs computation along non-spatial dimensions, e.g. for temporal regularization. Defaults to None.

  • mask – An optional tf.Tensor of type tf.bool. The sampling mask. Must have shape [..., *S], where S is the image_shape and ... is the batch shape, which can have any number of dimensions. If mask is passed, this operator represents an undersampled MRI operator.

  • trajectory

    An optional tf.Tensor of type float32 or float64. Must have shape [..., M, N], where N is the rank (number of spatial dimensions), M is the number of samples in the encoded space and ... is the batch shape, which can have any number of dimensions. If trajectory is passed, this operator represents a non-Cartesian MRI operator.

  • density

    An optional tf.Tensor of type float32 or float64. The sampling densities. Must have shape [..., M], where M is the number of samples and ... is the batch shape, which can have any number of dimensions. This input is only relevant for non-Cartesian MRI operators. If passed, the non-Cartesian operator will include sampling density compensation. If None, the operator will not perform sampling density compensation.

  • sensitivities

    An optional tf.Tensor of type complex64 or complex128. The coil sensitivity maps. Must have shape [..., C, *S], where S is the image_shape, C is the number of coils and ... is the batch shape, which can have any number of dimensions.

  • phase

    An optional tf.Tensor of type float32 or float64. A phase estimate for the image. If provided, this operator will be phase-constrained.

  • fft_norm

    FFT normalization mode. Must be None (no normalization) or 'ortho'. Defaults to 'ortho'.

  • sens_norm – A boolean. Whether to normalize coil sensitivities. Defaults to True.

  • dynamic_domain – A str. The domain of the dynamic dimension, if present. Must be one of 'time' or 'frequency'. May only be provided together with a non-scalar extra_shape. The dynamic dimension is the last dimension of extra_shape. The 'time' mode (default) should be used for regular dynamic reconstruction. The 'frequency' mode should be used for reconstruction in x-f space.

  • dtype – A tf.dtypes.DType. The dtype of this operator. Must be complex64 or complex128. Defaults to complex64.

  • name

    An optional str. The name of this operator.

Initialize the LinearOperator. (deprecated arguments)

Deprecated: SOME ARGUMENTS ARE DEPRECATED: (graph_parents). They will be removed in a future version. Instructions for updating: Do not pass graph_parents. They will no longer be used.

This is a private method for subclass use. Subclasses should copy-paste this ``__init__`` documentation.

Parameters
  • dtype – The type of the this LinearOperator. Arguments to matmul and solve will have to be this type.

  • graph_parents – (Deprecated) Python list of graph prerequisites of this LinearOperator Typically tensors that are passed during initialization

  • is_non_singular – Expect that this operator is non-singular.

  • is_self_adjoint – Expect that this operator is equal to its hermitian transpose. If dtype is real, this is equivalent to being symmetric.

  • is_positive_definite – Expect that this operator is positive definite, meaning the quadratic form x^H A x has positive real part for all nonzero x. Note that we do not require the operator to be self-adjoint to be positive-definite. See: https://en.wikipedia.org/wiki/Positive-definite_matrix#Extension_for_non-symmetric_matrices

  • is_square – Expect that this operator acts like square [batch] matrices.

  • name – A name for this LinearOperator.

  • parameters – Python dict of parameters used to instantiate this LinearOperator.

Raises
  • ValueError

    If any member of graph_parents is None or not a Tensor.

  • ValueError – If hints are set incorrectly.

property dynamic_axis

The dynamic axis of this operator.

property dynamic_domain

The dynamic domain of this operator.

property image_shape

The image shape.

property is_cartesian

Whether this is a Cartesian MRI operator.

property is_dynamic

Whether this is a dynamic MRI operator.

property is_multicoil

Whether this is a multicoil MRI operator.

property is_non_cartesian

Whether this is a non-Cartesian MRI operator.

property is_phase_constrained

Whether this is a phase-constrained MRI operator.

property num_coils

The number of coils.

property rank

The number of spatial dimensions.