# Metal Artifact Reduction in X-ray CT via Ray Profile Correction
## 2 Methods
### Rigid Volume Registration  
For the ray profile correction, we need to find matched prior profiles from the prior CT volume generated in the pre-operative CT scan. This prior CT volume is usually significantly misaligned with the CT volume obtained during or after the surgery. The patient may be in different pose or the CT scan may cover a different range of the spine region (or have a different field-of-view). All these two volumes might have in common is the surgical region itself. One naive approach for finding matched ray profiles would be to exhaustively search the prior CT volume with the ray profiles extracted from the uncorrected CT volume. This approach would be computationally very demanding as the search space is almost infinite. Instead, we align the two volumes and then find the set of matched prior profiles. The challenge in aligning two CT volumes taken at different times is that there can be large discrepancies in the soft internal structures (e.g., tissues). To resolve this problem, we first extract bone structures which are quite robust to deformation and also less contaminated by metal artifacts, in contrast to soft structures (see Figure 2 for a visualization). For the bone structure extraction, assuming there are only low and high density materials, we employ the balanced histogram thresholding (BHT) method [29]. Figure 3 shows two CT volumes obtained before and after surgery along with bone structures extracted using the BHT method. The prior volume is then rigidly registered to the uncorrected one by solving the following minimization problem:  
\[\hat{\mathbf{\theta}}=\operatorname*{argmin}_{\mathbf{\theta}}\sum_{i=1}^{N}w_{i} \cdot|f_{i}^{unc}-T_{\mathbf{\theta}}(f^{pri})_{i}|. \tag{4}\]  
Here, \(f\) is the bone-only CT volume and its superscripts \(unc\) and \(pri\) indicate the uncorrected and the prior CT volumes, respectively, which consist of \(N\) voxels in total. For brevity, \(f\) is a flattened 1D array of a volume in row-major order and \(i\) is an index at location (\(x\), \(y\), \(z\)) in the volume. The \(T_{\mathbf{\theta}}(\cdot)\) is a rigid volume transformation operator with parameter vector, \(\theta\), which includes three translations and three rotations in a 3D Cartesian coordinate system. Using Equation (4), we find the optimal parameter vector, \(\hat{\mathbf{\theta}}\), which has a minimum weighted sum of the voxel-wise absolute difference between the two volumes. The weight term, \(w_{i}\), is there to further penalize the data mismatch term if two voxels came from different anatomical structures (materials). It is formalized as follows:  
\[w_{i}= \begin{cases}1&\text{if }f_{i}^{unc}\text{ and }T_{\mathbf{\theta}}(f^{pri})_{i}\in\text{same material}\\ c&\text{if otherwise}\end{cases}  \tag{5}\]  
Here, there are two material types, low and high, and they are pre-computed using the BHT segmentation method. We give more penalty, \(c(\geq 1)\), if the two voxels are not in the same material. This minimizes the contribution of mis-categorized voxels in the uncorrected volume, such as voxels in the bright band or in implanted metals that are regarded as bone after applying the BHT segmentation. We use a GPU-accelerated Hybrid-PSO (particle swarm optimization) algorithm to solve the minimization problem in Equation (4), which avoids a convergence to a local minima [30; 31]. More specifically, in each generation, we randomly choose half of the particles and randomly adjust either a translation or rotation parameter with uniform probability. In every third generation, we pick half of the worst particles. The first half of these are replaced with completely new random values. Among the remainder, three-fifth of the particles are randomized as we do in each generation and the crossover is applied to the others. These types of randomization strategies have proven effective in finding the  
Figure 1: Overview of the proposed MAR method. global solution in different optimization tasks [31; 32].