deepmr.fft.nufft

Contents

deepmr.fft.nufft#

deepmr.fft.nufft(image, coord, shape=None, basis_adjoint=None, device='cpu', threadsperblock=128, width=4, oversamp=1.25)[source]#

N-dimensional Non-Uniform Fast Fourier Transform.

Parameters:
  • image (torch.Tensor) – Input image of shape (..., ncontrasts, ny, nx) (2D) or (..., ncontrasts, nz, ny, nx) (3D).

  • coord (torch.Tensor) – K-space coordinates of shape (ncontrasts, nviews, nsamples, ndims). Coordinates must be normalized between (-0.5 * shape, 0.5 * shape).

  • shape (int | Iterable[int], optional) – Cartesian grid size of shape (ndim,). If scalar, isotropic matrix is assumed. The default is None (grid size equals to input data size, i.e. osf = 1).

  • basis_adjoint (torch.Tensor, optional) – Adjoint low rank subspace projection operator of shape (ncoeffs, ncontrasts); can be None. The default is None.

  • device (str, optional) – Computational device (cpu or cuda:n, with n=0, 1,...nGPUs). The default is cpu.

  • threadsperblock (int) – CUDA blocks size (for GPU only). The default is 128.

  • width (int | Iterable[int], optional) – Interpolation kernel full-width of shape (ndim,). If scalar, isotropic kernel is assumed. The default is 2.

  • oversamp (float | Iterable[float], optional) – Grid oversampling factor of shape (ndim,). If scalar, isotropic oversampling is assumed. The default is 1.125.

Returns:

kspace – Output Non-Cartesian kspace of shape (..., ncontrasts, nviews, nsamples).

Return type:

torch.Tensor

Notes

Non-uniform coordinates axes ordering is assumed to be (x, y) for 2D signals and (x, y, z) for 3D. Conversely, axes ordering for grid shape, kernel width and Kaiser Bessel parameters are assumed to be (z, y, x).

Coordinates tensor shape is (ncontrasts, nviews, nsamples, ndim). If there are less dimensions (e.g., single-shot or single contrast trajectory), assume singleton for the missing ones:

  • coord.shape = (nsamples, ndim) -> (1, 1, nsamples, ndim)

  • coord.shape = (nviews, nsamples, ndim) -> (1, nviews, nsamples, ndim)