MRISubspace#
- class mrinufft.operators.subspace.MRISubspace(fourier_op, subspace_basis, use_gpu=False)[source]#
Bases:
FourierOperatorBaseFourier Operator with subspace projection.
This is a wrapper around the Fourier Operator to project data onto a low-rank subspace (e.g., dynamic and multi-contrast MRI).
- Parameters:
fourier_op (object of class FourierBase) – the fourier operator to wrap
subspace_basis (np.ndarray) – Low rank subspace basis of shape
(K, T), where K is the rank of the subspace and T is the number of time frames or contrasts in the original image series. Also supports Cupy arrays and Torch tensors.use_gpu (bool, optional) – Whether to use the GPU. Default is False. Ignored if the Fourier operator internally use only GPU (e.g., Cupy) or CPU (e.g., Numpy)
Notes
This extension adds a new axis for both image and k-space data:
Image:
(B, C, XYZ)->(B, S, C, XYZ)K-Space:
(B, C, K)->(B, T, C, K)
with
Srepresenting the subspace index andTrepresenting time domain or contrast space (for dynamic and multi-contrast MR, respectively).Similarly, k-space trajectory is expected to have the following shape:
(<N_frames or N_contrasts>, N_shots, N_samples, dim). The flatten version is also accepted:(<N_frames or N_contrasts>, N_shots * N_samples, dim)Methods
__init__Compute Adjoint Operation with subspace projection.
cgConjugate Gradient method to solve the inverse problem.
check_shapeValidate the shapes of the image or k-space data against operator shapes.
compute_densityCompute the density compensation weights and set it.
compute_smapsCompute the sensitivity maps and set it.
data_consistencyCompute the gradient data consistency.
get_lipschitz_cstReturn the Lipschitz constant of the operator.
make_autogradMake a new Operator with autodiff support.
Compute Forward Operation time/contrast-domain backprojection.
with_autogradReturn a Fourier operator with autograd capabilities.
with_off_resonance_correctionReturn a new operator with Off Resonnance Correction.
Attributes
autograd_availablecpx_dtypeReturn complex floating precision of the operator.
densityDensity compensation of the operator.
dtypeReturn floating precision of the operator.
interfacesn_batchsNumber of coils for the operator.
n_coilsNumber of coils for the operator.
Return the number of samples used by the operator.
ndimNumber of dimensions in image space of the operator.
norm_factorNormalization factor of the operator.
samplesReturn the samples used by the operator.
shapeShape of the image space of the operator.
smapsSensitivity maps of the operator.
uses_densityReturn True if the operator uses density compensation.
uses_senseReturn True if the operator uses sensitivity maps.
backendavailableExamples using
mrinufft.operators.subspace.MRISubspace#- op(data, *args)[source]#
Compute Forward Operation time/contrast-domain backprojection.
- Parameters:
data (numpy.ndarray) – N-D subspace-projected image. Also supports Cupy arrays and Torch tensors.
- Returns:
Time/contrast-domain k-space data.
- Return type:
- adj_op(coeffs, *args)[source]#
Compute Adjoint Operation with subspace projection.
- Parameters:
coeffs (numpy.ndarray) – Time/contrast-domain k-space data. Also supports Cupy arrays and Torch tensors.
- Returns:
Inverse Fourier transform of the subspace-projected k-space.
- Return type:
- property n_samples#
Return the number of samples used by the operator.