mrpro.algorithms.reconstruction.DirectReconstruction
- class mrpro.algorithms.reconstruction.DirectReconstruction[source]
Bases:
Reconstruction
Direct Reconstruction by Adjoint Fourier Transform.
- __init__(kdata: KData | None = None, fourier_op: LinearOperator | None = None, csm: Callable[[IData], CsmData] | CsmData | None = CsmData.from_idata_walsh, noise: KNoise | None = None, dcf: DcfData | None = None)[source]
Initialize DirectReconstruction.
A direct reconstruction uses the adjoint of the acquisition operator and a density compensation to obtain the complex valued images from k-space data.
If csm is not set to
None
, a single coil combined image will reconstructed. The method for estimating sensitivity maps can be adjusted using thecsm
argument.- Parameters:
kdata (
KData
|None
, default:None
) – Ifkdata
is provided andfourier_op
ordcf
areNone
, thenfourier_op
anddcf
are estimated based onkdata
. Otherwisefourier_op
anddcf
are used as provided.fourier_op (
LinearOperator
|None
, default:None
) – Instance of theFourierOp
used for reconstruction. IfNone
, set up based onkdata
.csm (
Callable
[[IData
],CsmData
] |CsmData
|None
, default:CsmData.from_idata_walsh
) – Sensitivity maps for coil combination. IfNone
, no coil combination is carried out, i.e. images for each coil are returned. If aCallable
is provided, coil images are reconstructed using the adjoint of theFourierOp
(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 theCsmData
class e.g.from_idata_walsh
orfrom_idata_inati
.noise (
KNoise
|None
, default:None
) – Noise used for prewhitening. IfNone
, no prewhitening is performeddcf (
DcfData
|None
, default:None
) – K-space sampling density compensation. IfNone
, set up based onkdata
.
- Raises:
ValueError – If the
kdata
andfourier_op
areNone
or ifcsm
is aCallable
butkdata
is None.
- dcf: DcfData | None
Density Compensation Data.
- csm: CsmData | None
Coil Sensitivity Data.
- noise: KNoise | None
Noise Data used for prewhitening.
- fourier_op: LinearOperator
Fourier Operator.
- forward(kdata: KData) IData [source]
Apply the reconstruction.
- Parameters:
kdata (
KData
) – k-space data to reconstruct.- Returns:
the reconstruced image.
- direct_reconstruction(kdata: KData) IData [source]
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: If they have not been set in this instance, no coil combination or density compensation, respectively, will be performed.
- Parameters:
kdata (
KData
) – k-space data- Returns:
image data
- recalculate_csm(kdata: KData, csm_calculation: Callable[[IData], CsmData] = CsmData.from_idata_walsh, noise: KNoise | None | Literal[False] = None) Self [source]
Update (in place) the CSM from KData.
- Parameters:
kdata (
KData
) – k-space data used for adjoint reconstruction (including DCF-weighting if available), which is then used for CSM estimation.csm_calculation (
Callable
[[IData
],CsmData
], default:CsmData.from_idata_walsh
) – Function to calculate csm expecting idata as input and returning csmdata. For examples have a look at theCsmData
.noise (
Union
[KNoise
,None
,Literal
[False
]], default:None
) – Noise measurement for prewhitening. IfNone
,self.noise
(if previously set) is used. IfFalse
, no prewithening is performed even ifself.noise
is set. Use this if thekdata
is already prewhitened.