## 2 Materials and Methods
### Roll Angle Prediction  
As illustrated in Figure 1a,b, the ICE catheter sensor head features three radiopaque markers which are clearly visible on fluoroscopy imaging (Figure 1b). Using the first marker in the AP (X-Y plane) and LAO90(X-Z plane) planes (Figure 1c), we can track the tip of catheter (P\({}_{1}\)) in both planes and determine the three positional degrees of freedom for the tip (X\({}_{1}\), Y\({}_{1}\), and Z\({}_{1}\)). Additionally, by calculating the angle of P\({}_{1}\) around the center of one of the other markers (we chose P\({}_{2}\) for this study) in the AP and LAO90 planes, we can determine the two angular degrees of freedom, Yaw (\(\uppsi\)) and Pitch (\(\uptheta\)), respectively. However, to determine the roll angle (\(\upvarphi\)), a third plane perpendicular to the \(x\)-axis (Y-Z plane) is required. Unfortunately, this plane is not visible on bi-plane fluoroscopy.  
Through analysis of data obtained from bi-plane fluoroscopy, an empirical nonlinear correlation between the current 5-DOF data (X\({}_{1}\), Y\({}_{1}\), Z\({}_{1}\), \(\psi\), and \(\theta\)) and the remaining 6 th degree of freedom (\(\varphi\)) was discovered. The goal of this research is to model this correlation in order to predict the value of \(\varphi\). Based on the above-mentioned description, the relationship between \(\varphi\) and the variables X\({}_{1}\), Y\({}_{1}\), Z\({}_{1}\), \(\psi\), and \(\theta\) is expressed mathematically as follows:  
\[\varphi=f_{1}\left(X_{1},Y_{1},Z_{1},\,\psi,\,\theta\right) \tag{1}\]  
In order to calculate \(\psi\) and \(\theta\), the coordinates of P\({}_{1}\) and P\({}_{2}\) in both planes are utilized. \(\psi\) represents the angle of P\({}_{1}\) around P\({}_{2}\) on the AP plane, while \(\theta\) represents the angle of P\({}_{1}\) around P\({}_{2}\) on the LAO90 plane. Mathematically, \(\psi\) is a function of X\({}_{1}\), X\({}_{2}\), Y\({}_{1}\), and Y\({}_{2}\), ( here we name it \(g_{1}(X_{1},\,X_{2},\,Y_{1},\,Y_{2})\)) and \(\theta\) is a function of X\({}_{1}\), X\({}_{2}\), Z\({}_{1}\), and Z\({}_{2}\) ( here we name it \(g_{2}(X_{1},\,X_{2},\,Z_{1},\,Z_{2})\)). This results in the following equation:  
\[\varphi=f_{1}\left(X_{1},\,Y_{1},Z_{1},g_{1}(X_{1},X_{2},\,Y_{1},\,Y_{2}),\,g_ {2}(X_{1},\,X_{2},\,Z_{1},\,Z_{2})\right) \tag{2}\]  
where \(g_{1}\) and \(g_{2}\) are defined as follows:  
\[\psi=g_{1}(X_{1},\,X_{2},\,Y_{1},\,Y_{2})=\text{Atan2}((Y_{1}\text{-}Y_{2}), \,(X_{1}\text{-}X_{2})) \tag{3}\]  
\[\theta=g_{2}(X_{1},\,X_{2},\,Z_{1},\,Z_{2})=\text{Atan2}((Z_{1}\text{-}Z_{2}), \,(X_{1}\text{-}X_{2})) \tag{4}\]  
The _Atan2(a,b)_ function is an arctangent function that differs from the _Atan(.)_ function in that it can handle all possible values of \(a\) and \(b\), including negative values and zero. Unlike the _Atan_ function, which is limited to the first and fourth quadrants, the _Atan2_ function can determine the angle of a point in all four quadrants.  
Based on the above definition, it can be inferred that \(\varphi\) is solely a function of the positional coordinates of P1 and P2 in both planes, and can be expressed as follows:  
\[\varphi=f_{2}\left(X_{1},\,Y_{1},Z_{1},\,X_{2},\,Y_{2},\,Z_{2}\right) \tag{5}\]  
where \(f_{2}\) is a nonlinear function that can be implemented by any universal approximator. In this study, we have employed a neural network-based universal approximator, which is detailed in the subsequent section.