## 2 Theory
### Joint Reconstruction of an Image and a Motion Model
```
1:Input:\(m\) the \(k\)-space data, and \(s\) the motion sensor signals
2:Output: The image \(\rho\) and the motion model \(\alpha\)
3:Initialisation of the motion model: \(\alpha=0\)
4:for resolution level = coarse to fine do
5:for Gauss-Newton iteration \(=1,2,\ldots,N\)do
6:\(\min_{\rho}||E(u_{\alpha})\rho-m||^{2}+\lambda||\rho||^{2}\)
7:\(\epsilon=m-E(u_{\alpha})\rho\)\(\triangleright\)\(\epsilon\) is the residual term
8:\(\min_{\delta\alpha}||E(u_{\alpha+\delta\alpha})\rho-m||^{2}+\mu R(\alpha+ \delta\alpha)\)
9:\(=\min_{\delta\alpha}||f(\alpha,s,\rho)\delta\alpha-\epsilon||^{2}+\mu R( \alpha+\delta\alpha)\)\(\triangleright\)\(J\) is the Jacobian matrix
10:\(\alpha=\alpha+\delta\alpha\)
11:endfor
12:endfor
```  
**Algorithm 1** Joint reconstruction with GRICS. For the generalized reconstruction problem, we set \(\lambda=1\). For the model optimization, we choose \(\mu=0.5\). The coil sensitivity maps are computed from the central lines of \(k\)-space data with 24 calibration lines and smoothed with second-order splines with a smoothing factor \(\lambda_{s}=1000\) for both magnitude and phase. Examples of GRICS reconstruction are presented in Figures 1 and 2. Figure 1 illustrates a non-rigid motion-compensated breast MRI reconstruction, where we can see an improvement in the reconstruction quality compared to the uncorrected reconstruction. Figure 2 demonstrates a rigid motion-compensated brain MRI reconstruction. The patient was instructed not to move; hence, there was no significant difference between the uncorrected and motion-corrected images. The overall maximum amplitude of motion was: \(1.55\) degrees for rotation and \(0.7\) mm for translation, indicating that the motion was minimal. Figure 1: Comparison between a reconstruction without motion correction and the GRICS reconstruction. GRICS minimizes the motion artifact, dataset \(D_{1}\). Figure 2: Comparison between a reconstruction without motion correction and GRICS reconstruction. Sixteen motion states were considered, dataset \(D_{4}\). This MRI acquisition was conducted without obvious motion. For quantitative comparison, we determined the sharpness index [25] of the images. The index was equal to \(1.693\times 10^{3}\) for the uncorrected reconstruction and \(1.734\times 10^{3}\) for the corrected reconstruction. The most computationally intensive part of Algorithm 1 lies in the conjugate gradient linear solvers. In particular, the application of the operator \(E^{H}E\), where \(E^{H}\) is the Hermitian transpose of the operator \(E\)-, comprises an outer loop on motion states and an inner loop on coil receivers. Algorithm 2 briefly presents the structure of this part of the kernel for the reconstruction problem. The operator \(E^{H}E\) reads  
\[E^{H}E=\sum_{t=1}^{N_{t}}T_{t}^{H}\left(\sum_{c=1}^{N_{c}}C_{c}^{H}F^{H}S_{t}^{ H}S_{t}FC_{c}\right)T_{t} \tag{2}\]  
For the motion model problem, we have a similar intense computational part with the application of the operator \(J^{H}J\), where \(J\) is the Jacobian matrix. Demo codes in MATLAB can be downloaded here: [[http://freddy.odille.free.fr/2023/02/motion-corrected-mri-reconstruction/](http://freddy.odille.free.fr/2023/02/motion-corrected-mri-reconstruction/)]([http://freddy.odille.free.fr/2023/02/motion-corrected-mri-reconstruction/](http://freddy.odille.free.fr/2023/02/motion-corrected-mri-reconstruction/)) (accessed on 6 May 2024). ```
1:Data:\(N_{t}\) the number of motion states, \(N_{c}\) the number of coils, \(T\) the spatial transformation operator, \(F\) the FFT operator, \(S\) the sampling operator, \(C\) the coil sensitivity operator, \(u\) the displacement field
2:\(y=0\)
3:for\(t=1,2,\ldots,N_{t}\)do
4:\(x_{t}=T(u_{t})x\)
5:\(y_{t}=0\)
6:for coil \(c=1,2,\ldots,N_{c}\)do
7:\(y_{t}=y_{t}+C_{c}^{H}(F^{H}S_{t}^{H}S_{t}F)C_{c}x_{t}\)
8:endfor
9:\(y=y+T(u_{t})^{Hy}y_{t}\)
10:endfor
```  
**Algorithm 2** Bottleneck of the reconstruction step (function \(x\mapsto E^{H}Ex\)).