MRISliceTransform#

class deepinv.datasets.MRISliceTransform(mask_generator=None, estimate_coil_maps=False)[source]#

Bases: object

FastMRI raw data preprocessing.

Preprocess raw kspace data by generating masks and/or estimating coil maps (applicable only when using with multi-coil MRI physics). To be used with deepinv.datasets.FastMRISliceDataset. See below for input and output shapes.

Parameters:
generate_maps(kspace)[source]#

Estimate coil maps using deepinv.physics.MultiCoilMRI.estimate_coil_maps().

Parameters:

kspace (torch.Tensor) – input kspace of shape (2, N, H, W)

Returns:

estimated coil maps of shape (N, H, W) and complex dtype

Return type:

Tensor

generate_mask(kspace, seed)[source]#

Simulate mask from mask generator.

Parameters:
  • kspace (torch.Tensor) – input fully-sampled kspace of shape (2, (N,) H, W) where (N,) is optional multicoil

  • seed (str, int) – mask generator seed. Useful for specifying same mask per data sample.

Returns:

mask of shape (C, H, W)

Return type:

Tensor