# Measuring Identification and Quantification Errors in Spectral CT Material Decomposition
## Materials and Methods
### Material Decomposition  
Material decomposition is the process of converting spectral attenuation (energy information) into information about the constituent materials contributing to that attenuation. This typically involves obtaining material properties inverting the mass attenuation equation for one of its variants (i.e., volume fraction [52], Compton-photoelectric [20], or \(\rho Z\)[53; 54]). The weighted average X-ray attenuation of a compound or mixture of the constituent materials is given by  
\[\upmu_{E}=\sum_{i=1}^{m}\rho_{m}\left(\frac{\upmu}{\rho}\right)_{mE} \tag{2}\]  
In this equation, \(\upmu_{E}\) is the linear attenuation of some composite material for a given energy range \(E\). The material properties desired are the densities of the constituent materials (indexed by \(m\)). These are proportionally connected to the linear attenuation through the mass attenuation of the respective materials \(\left(\upmu/\rho\right)_{mE}\) for the given energy ranges. Since attenuation varies differently over energy for different materials, such material properties can be deduced when using multiple energies. The MARS small animal spectral CT scanner incorporates a heuristic image space material decomposition algorithm (MARS-MD) for converting reconstructed energy bins into sparse material images [55; 56; 57]. This algorithm follows a three-step process for assigning materials to each voxel: (1) each voxel classified as either high, low, or insignificantly attenuating; (2) a calculation of uniquely constrained least squares decomposition for each feasible pair of materials falling into the respective attenuation category; and (3) a classification of the result which has the smallest regression error. The output of this process is that every voxel is assigned the 1-2 materials with the most significant contribution to the voxel's attenuation. The algorithm was calibrated using mass attenuation coefficients estimated from the reconstructed phantom data. For more details on this algorithm we direct the reader to our draft paper [57]. Using this algorithm, the spectral data analyzed in this study was decomposed at a voxel level into sparse combinations of gadolinium, hydroxyapatite, fat, and water. We are exploiting the single high-Z property of the MD algorithm to generate a quantitative metric in decomposed material images which can be used to both measure and monitor changes in detectability and correct identification of multiple high-Z materials over a wide range of concentrations. To measure the amount of misidentification between different materials, a metric was generated for quantitative evaluation of post-MD volumes of the calibration phantom which provides sensitivity (true positive rate) and specificity (true negative rate) for correct material identification at various material concentrations. As the composite material contains high-Z material in solution form (i.e., in water), all voxels of high-Z material density images should also be identified as water on the water density image. Therefore, water density image was taken as a reference for our metrics. In addition, voxels in all material images with value >0 were masked for further processing. In our metric, sensitivity refers to the test's ability to quantify successful voxel identification in the target material's region of interest (ROI). Manual selection of a ROI comprising 1409 voxels (N) over each of the given solution inserts of the target material image was compared with the corresponding voxels in the water density image, as shown in Figure 3. Corresponding voxels with values equal to 1 in both images (target material and water density) were identified as successful voxels (voxels that are identified as the correct material). The percentage of successful voxels identification in the target material's ROI provides the true positive voxels (_TP_) such that  
\[TP= \{v:v\;in\;R,\;TM\_v=W\_v\} \tag{3}\]  
Here \(v\) is a voxel and \(R\) shows the ROI, \(TM\_v\) is the target material image voxel, and \(W\_v\) is the water material image voxel.