Patient's Motion During Acquisition
It can also be interesting to see the effect of the patient's motion during an MRI scan. For this, Koma provides the ability to add motion
to the phantom. In this tutorial, we will show how to add a Translate
motion to a 2D brain phantom.
First, let's load the 2D brain phantom used in the previous tutorials:
obj = brain_phantom2D()
Head Translation
In this example, we will add a Translate
of 2 cm in x, with duration of 200 ms (v = 0.1 m/s):
obj.motion = Translate(2e-2, 0.0, 0.0, TimeRange(t_start=0.0, t_end=200e-3))
If we simulate an EPI sequence with acquisition duration (183.989 ms) comparable with the motion's duration (200 ms), we will observe motion-induced artifacts in the reconstructed image.
The severity of the artifacts can vary depending on the acquisition duration and $k$-space trajectory.
Motion-Corrected Reconstruction
To correct for the motion-induced artifacts we can perform a motion-corrected reconstruction. This can be achieved by multiplying each sample of the acquired signal $S(t)$ by a phase shift $\Delta\phi_{\mathrm{corr}}$ proportional to the displacement $\boldsymbol{u}(t)$ [Godenschweger, 2016]:
\[S_{\mathrm{MC}}\left(t\right)=S\left(t\right)\cdot\mathrm{e}^{\mathrm{i}\Delta\phi_{\mathrm{corr}}}=S\left(t\right)\cdot\mathrm{e}^{\mathrm{i}2\pi\boldsymbol{k}\left(t\right)\cdot\boldsymbol{u}\left(t\right)}\]
In practice, we would need to estimate or measure the motion before performing a motion-corrected reconstruction, but for this example, we will directly use the displacement functions $\boldsymbol{u}(\boldsymbol{x}, t)$ defined by obj.motion::MotionList
. Since translations are rigid motions ($\boldsymbol{u}(\boldsymbol{x}, t)=\boldsymbol{u}(t)$ no position dependence), we can obtain the required displacements by calculating $\boldsymbol{u}(\boldsymbol{x}=\boldsymbol{0},\ t=t_{\mathrm{adc}})$.
sample_times = get_adc_sampling_times(seq1)
displacements = hcat(get_spin_coords(obj.motion, [0.0], [0.0], [0.0], sample_times)...)
We can now get the necessary phase shift for each sample:
_, kspace = get_kspace(seq1)
ΞΞ¦ = 2Ο*sum(kspace .* displacements, dims=2);
And apply it to the acquired signal to correct its phase:
acq1.kdata[1] .*= exp.(im*ΞΞ¦)
Finally, we compare the original image βΆοΈ and the motion-corrected reconstruction βΈοΈ:
This page was generated using Literate.jl.