mrpro.algorithms.reconstruction.RegularizedIterativeSENSEReconstruction

class mrpro.algorithms.reconstruction.RegularizedIterativeSENSEReconstruction(kdata: ~mrpro.data._kdata.KData.KData | None = None, fourier_op: ~mrpro.operators.LinearOperator.LinearOperator | None = None, csm: ~collections.abc.Callable | ~mrpro.data.CsmData.CsmData | None = <bound method CsmData.from_idata_walsh of <class 'mrpro.data.CsmData.CsmData'>>, noise: ~mrpro.data.KNoise.KNoise | None = None, dcf: ~mrpro.data.DcfData.DcfData | None = None, *, n_iterations: int = 5, regularization_data: float | ~torch.Tensor = 0.0, regularization_weight: float | ~torch.Tensor, regularization_op: ~mrpro.operators.LinearOperator.LinearOperator | None = None)[source]

Bases: DirectReconstruction

Regularized iterative SENSE reconstruction.

This algorithm solves the problem \(min_x \frac{1}{2}||W^\frac{1}{2} (Ax - y)||_2^2 + \frac{1}{2}L||Bx - x_0||_2^2\) by using a conjugate gradient algorithm to solve \(H x = b\) with \(H = A^H W A + L B\) and \(b = A^H W y + L x_0\) where \(A\) is the acquisition model (coil sensitivity maps, Fourier operator, k-space sampling), \(y\) is the acquired k-space data, \(W\) describes the density compensation, \(L\) is the strength of the regularization and \(x_0\) is the regularization image (i.e. the prior). \(B\) is a linear operator applied to \(x\).

__init__(kdata: ~mrpro.data._kdata.KData.KData | None = None, fourier_op: ~mrpro.operators.LinearOperator.LinearOperator | None = None, csm: ~collections.abc.Callable | ~mrpro.data.CsmData.CsmData | None = <bound method CsmData.from_idata_walsh of <class 'mrpro.data.CsmData.CsmData'>>, noise: ~mrpro.data.KNoise.KNoise | None = None, dcf: ~mrpro.data.DcfData.DcfData | None = None, *, n_iterations: int = 5, regularization_data: float | ~torch.Tensor = 0.0, regularization_weight: float | ~torch.Tensor, regularization_op: ~mrpro.operators.LinearOperator.LinearOperator | None = None) None[source]

Initialize RegularizedIterativeSENSEReconstruction.

For a unregularized version of the iterative SENSE algorithm the regularization_weight can be set to 0 or IterativeSENSEReconstruction algorithm can be used.

Parameters:
  • kdata – KData. If kdata is provided and fourier_op or dcf are None, then fourier_op and dcf are estimated based on kdata. Otherwise fourier_op and dcf are used as provided.

  • fourier_op – Instance of the FourierOperator used for reconstruction. If None, set up based on kdata.

  • csm – Sensitivity maps for coil combination. If None, no coil combination is carried out, i.e. images for each coil are returned. If a callable is provided, coil images are reconstructed using the adjoint of the FourierOperator (including density compensation) and then sensitivity maps are calculated using the callable. For this, kdata needs also to be provided. For examples have a look at the CsmData class e.g. from_idata_walsh or from_idata_inati.

  • noise – KNoise used for prewhitening. If None, no prewhitening is performed

  • dcf – K-space sampling density compensation. If None, set up based on kdata.

  • n_iterations – Number of CG iterations

  • regularization_data – Regularization data, e.g. a reference image (\(x_0\)).

  • regularization_weight – Strength of the regularization (\(L\)).

  • regularization_op – Linear operator \(B\) applied to the current estimate in the regularization term. If None, nothing is applied to the current estimate.

Raises:

ValueError – If the kdata and fourier_op are None or if csm is a Callable but kdata is None.

direct_reconstruction(kdata: KData) IData

Direct reconstruction of the MR acquisition.

Here we use S^H F^H W to calculate the image data using the coil sensitivity operator S, the Fourier operator F and the density compensation operator W. S and W are optional.

Parameters:

kdata – k-space data

Return type:

image data

forward(kdata: KData) IData[source]

Apply the reconstruction.

Parameters:

kdata – k-space data to reconstruct.

Return type:

the reconstruced image.

recalculate_csm(kdata: ~mrpro.data._kdata.KData.KData, csm_calculation: ~collections.abc.Callable[[~mrpro.data.IData.IData], ~mrpro.data.CsmData.CsmData] = <bound method CsmData.from_idata_walsh of <class 'mrpro.data.CsmData.CsmData'>>, noise: ~mrpro.data.KNoise.KNoise | None | ~typing.Literal[False] = None) Self

Update (in place) the CSM from KData.

Parameters:
  • kdata – KData used for adjoint reconstruction (including DCF-weighting if available), which is then used for CSM estimation.

  • csm_calculation – Function to calculate csm expecting idata as input and returning csmdata. For examples have a look at the CsmData class e.g. from_idata_walsh or from_idata_inati.

  • noise – Noise measurement for prewhitening. If None, self.noise (if previously set) is used. If False, no prewithening is performed even if self.noise is set. Use this if the kdata is already prewhitened.

recalculate_fourierop(kdata: KData) Self

Update (in place) the Fourier Operator, e.g. for a new trajectory.

Also recalculates the DCF.

Parameters:

kdata – KData to determine trajectory and recon/encoding matrix from.

csm: CsmData | None

Coil Sensitivity Data.

dcf: DcfData | None

Density Compensation Data.

fourier_op: LinearOperator

Fourier Operator.

n_iterations: int

Number of CG iterations.

noise: KNoise | None

Noise Data used for prewhitening.

regularization_data: torch.Tensor

Regularization data (i.e. prior) \(x_0\).

regularization_op: LinearOperator

Linear operator \(B\) applied to the current estimate in the regularization term.

regularization_weight: torch.Tensor

Strength of the regularization \(L\).