deepmr.cartesian2D

Contents

deepmr.cartesian2D#

deepmr.cartesian2D(shape, accel=(1, 1), acs_shape=None)[source]#

Design a 2D (+t) cartesian encoding scheme.

This function only support simple regular undersampling along phase encoding direction, with Parallel Imaging and Partial Fourier acceleration and rectangular FOV. For multi-echo acquisitions, sampling pattern is assumed constant along the echo train.

Parameters:
  • shape (Iterable[int]) – Matrix shape (x, y, echoes=1).

  • accel (Iterable[int], optional) – Acceleration (Ry, Pf). Ranges from (1, 1) (fully sampled) to (ny, 0.75). The default is (1, 1).

  • acs_shape (int, optional) – Matrix size for calibration regions ACSy. The default is None.

Returns:

  • mask (torch.Tensor) – Binary mask indicating the sampled k-space locations of shape (nz, ny).

  • head (Header) – Acquisition header corresponding to the generated sampling pattern.

Example

>>> import deepmr

We can create a 2D Cartesian sampling mask of (128, 128) pixels with Parallel Imaging factor Ry = 2 by:

>>> mask, head = deepmr.cartesian2D(128, accel=2)

Partial Fourier acceleration can be enabled by passing a tuple as the accel argument:

>>> mask, head = deepmr.cartesian2D(128, accel=(1, 0.8))

A rectangular matrix can be specified by passing a tuple as the shape argument:

>>> mask, head = deepmr.cartesian2D((128, 96), accel=2)
>>> mask.shape
torch.Size([96, 128])

Autocalibration region width can be specified via the acs_shape argument:

>>> mask, head = deepmr.cartesian2D(128, accel=2, acs_shape=32)

The generated mask will have an inner (32, 128) fully sampled k-space stripe for coil sensitivity estimation.

Multiple echoes with the same sampling (e.g., for QSM and T2* mapping) can be obtained by providing a 3-element tuple of ints as the shape argument:

>>> mask, head = deepmr.cartesian2D((128, 128, 8), accel=2)
>>> head.TE.shape
torch.Size([8])

corresponding to a 8-echoes undersampled k-spaces.

Notes

The returned head (deepmr.Header()) is a structure with the following fields:

  • shape (torch.Tensor):

    This is the expected image size of shape (nz, ny, nx).

  • t (torch.Tensor):

    This is the readout sampling time (0, t_read) in ms. with shape (nx,). K-space raster time of 1 us is assumed.

  • TE (torch.Tensor):

    This is the Echo Times array. Assumes a k-space raster time of 1 us and minimal echo spacing.