# End-to-End Deep Learning CT Image Reconstruction for Metal Artifact Reduction
## 2 Materials and Methods
### Data Generation  
To simulate the training data, we use the XCAT phantom, which provides highly detailed whole-body anatomies [30]. The phantom includes female and male models of different ages, providing a wide variety of patient geometries. Further customization of anatomies by changing organ sizes is possible. We create 40 different XCAT models for training and 10 additional models for testing, resulting in 3964 and 991 slices of size \(512\times 512\) pixel with an in-plane resolution of \(1\times 1\) mm\({}^{2}\) and a slice thickness of 2 mm, respectively. Because we choose liver interventions as a use case, we generate abdominal XCATs that include the whole liver. Organ masks can be easily obtained within the XCAT framework. Utilizing these organ masks, we insert metal structures inside the veins of the XCAT phantoms, emulating contrast agents or interventional instruments, such as catheters. Metal objects are only placed inside thicker blood vessels and have a uniform size, independent of the blood vessel size. This is realized by first eroding the blood vessel masks of the XCAT phantom, using a disk with a radius of 3 pixels as a structuring element. The erosion is performed to exclude the smallest blood vessels. To obtain the final metal mask, we skeletonize the mask and then increase the thickness via dilation using a disk with a radius of 3 pixels. An example is shown in Figure 2, with the metal mask in red, the initial blood vessels in white, and the liver in green. Most of the metal structures are placed inside the liver or in the portal vein beneath the liver. Figure 1: Deep learning architectures for metal artifact reduction. (**a**) iCTU-Net end-to-end CT reconstruction network architecture. (**b**) Sinogram domain U-Net. (**c**) Image domain U-Net. (**d**) U-Net network architecture used in the three networks in (**a**–**c**). Our data generation pipeline is shown in Figure 3, which starts with the generation of the ground truth data in the first row. First, we create sinograms by forward projecting the XCAT image data using a parallel beam geometry with 736 projection beams and 360 projection angles. A polychromatic X-ray spectrum and the energy-dependence of the absorption coefficients are considered in the forward projection:  
\[I=\sum_{i=1}^{N}I_{0}\cdot\eta(E_{i})\cdot e^{-\int_{L}\mu(x,E_{i})\mathrm{d}x}, \tag{1}\]  
with weights of the energy spectrum \(\eta(E_{i})\). An incident flux of \(I_{0}=4\cdot 10^{6}\) photons is used, which is slightly increased compared to clinical levels [31], to combat photon starvation due to the presence of the metal objects. The X-ray energy spectrum is generated using the SpekCalc software with a tube peak voltage of 100 kVp and 1 mm aluminium filter [32]. We use 91 energy bins from 10 keV to 100 keV with a uniform size of 1 keV. The organ masks provided by the XCAT framework make it possible to assign an energy-dependent attenuation coefficient \(\mu(x,E_{i})\) to each organ. The sinograms are then reconstructed via a FBP. Since the energy dependence of the attenuation coefficients is accounted in the forward projection, beam hardening is present in the ground truth data. To simulate data affected by metal, we utilize the previously mentioned metal mask to insert the attenuation coefficient of iron. Afterwards, metal sinograms are created via forward projection using Equation (1). Noise is then added, the projection data is normalized, and the negative logarithm is applied:  
\[p_{n}=-\ln\left(\frac{Poisson(I)+\mathcal{N}(0,\sigma^{2})}{\sum_{i=1}^{N}I_{0 }\cdot\eta(E_{i})}\right). \tag{2}\]  
The photon production, attenuation, and detection is described by a Poisson distribution. Electronic noise of the detector is simulated with a Gaussian distribution \(\mathcal{N}\) with a mean value of zero and \(\sigma^{2}=40\)[33; 34]. A subsequent FBP results in an image containing metal artifacts.