DynamicMultiCoilMRI#

class deepinv.physics.DynamicMultiCoilMRI(*args, transform=None, transform_params=None, **kwargs)[source]#

Bases: MultiCoilMRI, TimeMixin

Dynamic multi-coil MRI for 2D+t or 3D+t (i.e. 4D) data.

The linear operator operates in 2D+t or 3D+t videos and is defined as:

\[y_{n,t} = \operatorname{diag}(p_t) F \operatorname{diag}(s_n) \mathcal{T}_t x_t\]

for \(n=1,\dots,N\) coils and \(t=1,\dots,T\) time steps, where \(p_t\) is the sampling mask at time \(t\), \(F\) is the spatial Fourier transform, \(s_n\) is the sensitivity of the nth coil, and \(\mathcal{T}_t\) is an optional transform per time-step, e.g. to model motion.

The input image has shape (B, 2, T, (D,) H, W) and the output k-space has shape (B, 2, N, T, (D,) H, W), where N is the number of coils, T is number of timesteps and D is optional depth dim (for 3D).

Parameters:
  • mask (torch.Tensor) – dynamic mask with shape (T,H,W), (C,T,H,W), (B,C,T,H,W), or (B,C,T,…,H,W)

  • coil_maps (torch.Tensor) – complex coil maps with shape (B,N,H,W) or (B,N,T,H,W) (time-varying maps), see deepinv.physics.MultiCoilMRI for details.

  • img_size (tuple) – image size used when mask or coil_maps is not specified, see deepinv.physics.MultiCoilMRI for details.

  • three_d (bool) – if True, assume 3D data ((..., D,H,W)) and apply a 3D spatial Fourier transform.

  • transform (deepinv.transform.Transform) – optional transform applied per time-step.

  • transform_params (dict) – optional transform parameters, each of shape (1,T,...) for one trajectory shared across the batch, or (B,T,...) for one trajectory per batch element, in which case transform must be built with index_params_into_batch=True.

  • device (torch.device, str) – computation device.


Example:

>>> import torch
>>> from deepinv.physics import DynamicMultiCoilMRI
>>> x = torch.randn(1, 2, 3, 8, 8)  # (B,2,T,H,W)
>>> mask = torch.ones_like(x)
>>> coil_maps = torch.ones(1, 4, 8, 8, dtype=torch.complex64)
>>> physics = DynamicMultiCoilMRI(mask=mask, coil_maps=coil_maps)
>>> physics(x).shape
torch.Size([1, 2, 4, 3, 8, 8])
to_static(device='cpu')[source]#

Convert dynamic multi-coil MRI to static multi-coil MRI.

This conversion is performed by removing time dimension. The mask is built by retaining all the sampled locations across time, as

\[\tilde{M} = \bigcup_t M_t = \operatorname{max}_t M_t\]

In the case of time-varying coil sensitivity maps, these are averaged across time.

Parameters:

device (str) – device to convert to

Return MultiCoilMRI physics:

equivalent temporal dimension free MulicoilMRI physics

Return type:

MultiCoilMRI

update_parameters(**kwargs)[source]#

Update MRI parameters and transform parameters.

If kwargs contains any transform params (e.g. theta for deepinv.transform.Rotate), then the transform_params dict is updated instead.

Parameters:

kwargs – MRI parameters, see deepinv.physics.MultiCoilMRI.update_parameters(), and/or transform parameters.

Examples using DynamicMultiCoilMRI:#

Motion simulation and motion-compensated reconstruction

Motion simulation and motion-compensated reconstruction