MRITensorflowNUFFT#
- class mrinufft.operators.interfaces.tfnufft.MRITensorflowNUFFT(samples, shape, n_coils=1, density=False, smaps=None, eps=1e-06)[source]#
Bases:
FourierOperatorBaseMRI Transform Operator using Tensorflow NUFFT.
- Parameters:
samples (Tensor) – The samples location of shape
Nsamples x N_dimensions. It should be C-contiguous.shape (tuple) – Shape of the image space.
n_coils (int) – Number of coils.
density (bool or Tensor) –
- Density compensation support.
If a Tensor, it will be used for the density.
If True, the density compensation will be automatically estimated, using the fixed point method.
If False, density compensation will not be used.
smaps (Tensor)
Methods
__init__Backward Operation.
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.
Compute the data consistency.
get_lipschitz_cstReturn the Lipschitz constant of the operator.
make_autogradMake a new Operator with autodiff support.
Forward operation.
Estimate the density compensation using the pipe method.
with_autogradReturn a Fourier operator with autograd capabilities.
with_off_resonance_correctionReturn a new operator with Off Resonnance Correction.
Attributes
autograd_availableavailablebackendcpx_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.
n_samplesReturn the number of samples used by the operator.
ndimNumber of dimensions in image space of the operator.
Norm 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.
- op(data)[source]#
Forward operation.
- Parameters:
data (Tensor)
- Return type:
Tensor
Note
This function uses
tensorflowinternally, and will convert all its array argument to tensorflow tensors. but will respect the device they are allocated on. The outputs will be converted back to the original array module and device.
- adj_op(coeffs)[source]#
Backward Operation.
- Parameters:
coeffs (Tensor)
- Return type:
Tensor
Note
This function uses
tensorflowinternally, and will convert all its array argument to tensorflow tensors. but will respect the device they are allocated on. The outputs will be converted back to the original array module and device.
- property norm_factor#
Norm factor of the operator.
- data_consistency(image_data, obs_data)[source]#
Compute the data consistency.
- Parameters:
data (Tensor) – Image data
obs_data (Tensor) – Observed data
- Returns:
The data consistency error in image space.
- Return type:
Tensor
Note
This function uses
tensorflowinternally, and will convert all its array argument to tensorflow tensors. but will respect the device they are allocated on. The outputs will be converted back to the original array module and device.