## 2 Materials and Methods
### Matrix Equation for Materials Separation Using the PiXirad Detector  
The method for separating two materials distributions requires two quasi-monochromatic intensity images to be defined using four energy thresholds (\(E_{1},E_{2},F_{3}\) and \(E_{4}\)) without any spectral overlap. In order to separate a larger number of materials, additional energy thresholds are required which necessitates more than one exposure per projection [13]. The transmitted intensity image corresponding to the first energy bandwidth, \(I(\Delta E_{a})\), is created via the subtraction of the measured intensities corresponding to the two energy thresholds \(I(E_{1})\) and \(I(E_{2})\). This subtraction can be represented as  
\[ \begin{array}{c}I(\Delta E_{a})=I(E_{1})-I(E_{2})\\ =\int\limits_{E_{1}}^{E_{c}}S(E)\ \exp\Bigl{(}\sum_{j=1}^{l}-\mu_{j}(E).s_{j} \Bigr{)}dE-\int\limits_{E_{2}}^{E_{c}}S(E)\ \exp\Bigl{(}\sum_{j=1}^{l}-\mu_{j}(E).s_{j} \Bigr{)}dE\\ =\int\limits_{E_{1}}^{E_{2}}S(E)\ \exp\Bigl{(}\sum_{j=1}^{l}-\mu_{j}(E).s_{j} \Bigr{)}dE\\ =\exp\Bigl{(}\sum_{j=1}^{l}-\int_{E_{1}}^{E_{2}}S(E)\mu_{j}(E).dE.s_{j} \Bigr{)}\\ \approx\exp\Bigl{(}\sum_{j=1}^{l}-\mu_{j}(\Delta E_{a}).s_{j}\Bigr{)}\end{array}  \tag{1}\]  
where \(S(E)\) is the spectral density of the incident X-rays, \(E_{c}\) is the cut-off energy of the X-ray spectrum, \(\mu_{j}(E)\) is the linear attenuation coefficient of material \(j\), and \(s_{j}\) is the thickness of material \(j\). We note that Equations (1) and (2) are not normalized by the total intensity and that \(I(\Delta E_{a})\) and \(I(\Delta E_{a})\) are a function of the integrated flux between the relevant energy thresholds. Similarly, the second energy bandwidth, \(I(\Delta E_{b})\), defined by the subtraction between the two other measured energy threshold intensities, \(I(E_{3})\) and \(I(E_{4})\), is given by  
\[ \begin{array}{c}I(\Delta E_{b})=\int\limits_{E_{3}}^{E_{4}}S(E)\ \exp\Bigl{(}\sum_{j=1}^{l}-\mu_{j}(E).s_{j} \Bigr{)}dE=\exp\Bigl{(}\sum_{j=1}^{l}-\int_{E_{3}}^{E_{4}}S(E)\mu_{j}(E).dE.s_ {j}\Bigr{)}\\ \approx\exp\Bigl{(}\sum_{j=1}^{l}-\mu_{j}(\Delta E_{b}).s_{j}\Bigr{)}\end{array}  \tag{2}\]  
By defining narrow energy bandwidths, we assume that we can approximate two quasi-monochromatic X-ray beams represented by \(\Delta E_{a}\) and \(\Delta E_{b}\) for the first and second energy bands respectively as shown in Equations (1) and (2). Note that the effective linear attenuation coefficient at \(\Delta E_{a}\) and \(\Delta E_{b}\) can be defined as  
\[\mu_{j}(\Delta E_{a})=\int\limits_{E_{1}}^{E_{2}}\mu_{j}(E).S(E)\,dE\,\ \ \ \ \ \ \mu_{j}(\Delta E_{b})=\int\limits_{E_{3}}^{E_{4}}\mu_{j}(E).S(E)\,dE \tag{3}\]  
where the integral of \(S(E)\) should be unity within the relevant energy range. We consider two different materials present within the sample denoted as material 1 and material 2, with \(\mu_{1}(E)\) and \(\mu_{2}(E)\) denoting their respective linear attenuation coefficient,and with \(s_{1}\) and \(s_{2}\) respectively their sample thicknesses. Taking the intensity of the incident beam to be unity, we can express \(I(\Delta E_{a})\) and \(I(\Delta E_{b})\) as  
\[I(\Delta E_{a})=\exp(-\mu_{1}(\Delta E_{a}).s_{1}-\mu_{2}(\Delta E_{a}).s_{2}) \tag{4}\]  
and  
\[I(\Delta E_{b})=\exp(-\mu_{1}(\Delta E_{b}).s_{1}-\mu_{2}(\Delta E_{b}).s_{2}) \tag{5}\]  
These equations can be written in matrix form as:  
\[\left[ \begin{array}{c}\log(I(\Delta E_{a}))\\ \log(I(\Delta E_{b}))\end{array} \right]=\left[ \begin{array}{cc}-\mu_{1}( \Delta E_{a})&-\mu_{2}(\Delta E_{a})\\ -\mu_{1}(\Delta E_{b})&-\mu_{2}(\Delta E_{b})\end{array} \right]\left[ \begin{array} []{c}s_{1}\\ s_{2}\end{array} \right] \tag{6}\]  
Inversion of Equation (6) yields the final expression for the thickness of each of the components:  
\[\left[ \begin{array}{c}s_{1}\\ s_{2}\end{array} \right]=\frac{1}{det}\left[ \begin{array}{cc}-\mu_{2}(\Delta E _{b})&\mu_{2}(\Delta E_{a})\\ \mu_{1}(\Delta E_{b})&-\mu_{1}(\Delta E_{a})\end{array} \right]\left[ \begin{array} []{c}\log(I(\Delta E_{a}))\\ \log(I(\Delta E_{b}))\end{array}