# Image Quality Improvement and Memory-Saving in a Permanent-Magnet-Array-Based MRI System
## 4 The Memory-Saving Reconstruction
The reason is that although the memory consumed by the encoding matrix can be reduced significantly by the truncation, the matrix \(\bar{\bar{A}}\), remains dense, which leads to a constant memory consumption for this matrix. Matrix \(\bar{\bar{A}}\) dominates the memory consumption when the truncation percentage is high and its memory consumption saturates the total required memory. Figure 8a,b respectively show the total memory consumption and the individual ones versus the truncation percentage for the three systems that has a matrix size of 46,080 \(\times\) 16,384 when \(N_{\theta}=90\) and \(N_{t}=512\), \(N_{\theta}=180\) and \(N_{t}=128\), and \(N_{\theta}=180\) and \(N_{t}=256\). As shown in Figure 8a, the three cases show similar trends where the total memory consumption drops dramatically when the truncation threshold is 5%, at least 10,000 MB of memory is saved, and slows down when the truncation percentage further increases. This is for the same reason mentioned previously for the case with \(N_{\theta}=90\) and \(N_{t}=512\) that the memory consumption for the encoding matrix (\(\bar{\bar{E}}\)) decreases with an increase in the truncation percentage while that for matrix \(\bar{\bar{A}}\) and the vector array \(\bar{s}\) stay the same, as shown in Figure 8b, where the memory for matrix \(\bar{\bar{A}}\) is relatively high and saturates the total memory consumption when the truncation percentage is high. For the decrease in the memory consumption of the encoding matrix, it is observed that the system that has a high \(N_{\theta}\) requires more memory under the same threshold (\(>\)0) when the size of \(\bar{\bar{E}}\) is the same. Considering the effects of the truncation on the calculation time, image quality, the memory consumption, 5% truncation has the best balance among the three performances. In terms of the effect of the truncation on the computational time and image quality, Figure 9a,b show the calculation time and the NRMSE of the images versus the number of iterations for the systems when \(N_{\theta}=90\) and \(N_{t}=512\). The SNR was set at 20 dB. As shown in Figure 9a, the curves are close to one another, and the computational time of all the systems has a linear relation with the number of iterations, which indicates that the calculation time for each iteration is the same and the effect of the truncation is negligible. In terms of the number of iterations it takes to arrive at a NRMSE minimum, all the systems show an iteration number of about 10, which implies a similar amount of calculation time for the system to have the best image quality. Comparing the curves, it is noticed that the 50%-truncation case has the highest minimum NRMSE, which can be reflected in the reconstructed images. Figure 10 shows the reconstructed images of each case when their NRMSE is minimum. The corresponding NRMSEs and SSIMs are labelled in each image. As can be seen, as the truncation percentage increases, the features become blurry, the NRMSE increases, and the SSIM decreases. \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Threshold** & \(\bar{\bar{A}}=\bar{\bar{E}}^{\text{t}}\bar{\bar{E}}\) & \(\bar{\bar{E}}\) & \(\bar{s}\) & **Total** \\ \hline
0 & 4096 MB & 11,520 MB & 0.7 MB & 15,617 MB \\
5\% & 4096 MB & 338.8 MB & 0.7 MB & 4436 MB \\
10\% & 4096 MB & 170.7 MB & 0.7 MB & 4267 MB \\
20\% & 4096 MB & 84.5 MB & 0.7 MB & 4181 MB \\
50\% & 4096 MB & 45.1 MB & 0.7 MB & 4142 MB \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The memory occupation in image reconstruction (\(N_{\theta}=90\), \(N_{t}=512\)). Figure 8: The memory consumption versus the truncation percentage at different \(N_{\theta}\) and \(N_{t}\). (**a**) the total memory consumption (**b**) the memory consumption for each parameters. Figure 10: The reconstructed images of a human head phantom (a grid size of 0.78125 mm, a discretization of \(128\times 128\), a FoV of \(100\,\mathrm{mm}\times 100\,\mathrm{mm}\)) when the non-linear SEM in Figure 2b1 was used. \(N_{\theta}=90\), \(N_{t}=512\), and the SNRs was set to be 20 dB.