## 2 Concepts and Applications of TMPR
### Transformation Method from Two 2D X-Ray Pixel Images to 3D Real-World Coordinates (TMPR)  
In this section, we explain the detailed method to reconstruct the 3D coordinates from the two X-ray images. When two X-ray images are captured from different views, \(V_{ref}\) is the reference view obtained without rotating the C-arm and \(V_{corr}\) is the corresponding view obtained with rotating the C-arm. The 3D coordinates of \(V_{ref}\) are described with respect to \(C_{ref}\). The 2D X-ray images captured from each view are \(I_{ref}\) and \(I_{corr}\), and are depicted in Figure 3a,d. The projected pixel points of \(P\) in 3D space onto \(I_{ref}\) and \(I_{corr}\) are denoted as \(\mathbf{p}_{ref}\) and \(\mathbf{p}_{corr}\). The coordinates of the principal points in \(I_{ref}\) and \(I_{corr}\) are defined as \(\mathbf{p}_{0}\). Figure 3a shows \(\mathbf{p}_{ref}\) and \(\mathbf{p}_{0}\) in \(I_{ref}\). The 3D coordinates of \(\mathbf{P}_{init}=[X_{init}\ Y_{init}\ Z_{init}]^{T}\) in \(C_{ref}\) corresponding to \(\mathbf{p}_{ref}\) can be derived utilizing (4), as shown in Figure 3a,b. Figure 2: (**a**) Initial 3D coordinate system of the C-arm and a point \(P_{init}\) in the C-arm workspace; (**b**) rotating the C-arm by \(\delta\) when a point \(P_{init}\) is fixed; and (**c**) rotating \(P_{init}\) by \(-\delta\) when the C-arm is fixed. When the C-arm is rotated from \(V_{\textit{ref}}\) to \(V_{\textit{corr}}\) in the order of RAO/LAO by \(\theta\) and in CAUD/CRAN by \(\varphi\), we can calculate the coordinates \(\mathbf{P}_{\textit{rot}}=[X_{\textit{rot}}\ Y_{\textit{rot}}\ Z_{\textit{rot}}]^{ \text{T}}\) in \(C_{\textit{ref}}\) by rotating \(\mathbf{P}_{\textit{init}}\) with respect to the \(P_{\textit{iso}}\) by \(-\theta\) and \(-\varphi\) in the same order, as shown in Figure 3b,c. Equation (6) is a rotational transformation matrix to transform \(\mathbf{P}_{\textit{init}}\) into \(\mathbf{P}_{\textit{rot}}\), which can be calculated from (7) as follows:  
\[\mathbf{R}_{\textit{rot}}= \begin{bmatrix}1&0&0\\ 0&\cos\varphi&\sin\varphi\\ 0&-\sin\varphi&\cos\varphi\end{bmatrix}\begin{bmatrix}\cos\theta&0&\sin\theta \\ 0&1&0\\ -\sin\theta&0&\cos\theta\end{bmatrix}  \tag{6}\]  
\[\mathbf{P}_{\textit{rot}}=\mathbf{R}_{\textit{rot}}\mathbf{P}_{\textit{init}}= \begin{bmatrix} X_{\textit{rot}}(Z_{\textit{init}})\\ Y_{\textit{rot}}(Z_{\textit{init}})\\ Z_{\textit{rot}}(Z_{\textit{init}})\end{bmatrix}  \tag{7}\]  
where \(X_{\textit{rot}}\), \(Y_{\textit{rot}}\), and \(Z_{\textit{rot}}\) of \(\mathbf{P}_{\textit{rot}}\) are functions of \(Z_{\textit{init}}\). We can calculate \(\mathbf{p}_{\textit{rot}}\), which is projected onto \(I_{\textit{corr}}\), using (5) as follows:  
\[\mathbf{p}_{\textit{rot}}= \begin{bmatrix}x_{\textit{rot}}\\ y_{\textit{rot}}\end{bmatrix} =\frac{1}{f(Z_{\textit{rot}}(Z_{\textit{init}})) } \begin{bmatrix}X_{\textit{rot}}(Z_{\textit{init}})\\ Y_{\textit{rot}}(Z_{\textit{init}})\end{bmatrix} + \begin{bmatrix}x_{0}\\ y_{0}\end{bmatrix}  \tag{8}\]  
Similarly to \(\mathbf{P}_{\textit{rot}}\), each element of \(\mathbf{p}_{\textit{rot}}\) is also represented as a function of \(Z_{\textit{init}}\). In (8), both the numerator and denominator of each element of \(\mathbf{p}_{\textit{rot}}\) are the first-order functions of \(Z_{\textit{init}}\). After substituting \(1/f(Z_{\textit{rot}}(Z_{\textit{init}}))\) with \(g\), as shown in (9), \(x_{\textit{rot}}\) can be expressed as a function of \(g\), as shown in (10). Finally, a linear relationship between \(x_{\textit{rot}}\) and \(y_{\textit{rot}}\) can be derived, as shown in (11):  
\[g=\frac{1}{f(Z_{\textit{rot}}(Z_{\textit{init}}))} \tag{9}\]  
\[x_{\textit{rot}}=Ag+B \tag{10}\]  
\[y_{\textit{rot}}=\mathbb{C}g+D=Ex_{\textit{rot}}+F \tag{11}\]  
where in (10) to (11), \(A\), \(B\), \(C\), \(D\), \(E\), and \(F\) are real constants. The line represented by (11) is defined as \(\mathbf{I}_{\textit{proj}}\), and each point on \(\mathbf{I}_{\textit{proj}}\) corresponds to 3D coordinates in \(C_{\textit{ref}}\).