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 withdeepinv.datasets.FastMRISliceDataset
. See below for input and output shapes.- Parameters:
mask_generator (deepinv.physics.generator.BaseMaskGenerator) – optional mask generator for simulating masked measurements retrospectively.
estimate_coil_maps (bool, int) – if
True
orint
, estimate coil maps usingdeepinv.physics.MultiCoilMRI.estimate_coil_maps()
. Ifint
, pass this as auto-calibration size to ESPIRiT. IfTrue
, use ACS size frommask_generator
.
- 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:
- 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: