A novel bi-planar calibration method for digital templating in total hip arthroplasty

In total hip arthroplasty and reconstructive orthopedic surgery, pre-operative digital templating is essential for surgical treatment optimization, risk management, and quality control. Calibration is performed before templating to address magnification effects. Conventional methods including fixed calibration factors, individual marker-based calibration and dual-scale marker methods are not reliable. A novel bi-planar calibration method is described aiming to reduce the error below clinical significance. The bi-planar calibration method requires two conventional orthogonal radiographs and a standard radiopaque marker ball. An algorithm computes the hip plane height parallel to the detector in the antero-posterior radiograph. Foreseeable errors (i.e., patient rotation and misplaced markers or lateral offset) are considered in a correction algorithm. Potential effects of errors are quantified in a standard model. Influence of rotation in lateral radiographs and lateral offset of marker on the calibration factor are quantified. Without correction, patient rotation in the lateral radiograph of 30° results in absolute calibration error of 2.2% with 0 mm offset and 6.5% with 60 mm lateral offset. The error is below the threshold of 1.5% for rotation less than 26° with 0 mm offset and 10° with 60 mm offset. The method is supposed to be reliable in precisely predicting the hip plane and thereby the calibration factor. It may be superior to other methods available. In theory, the method allows correction of clinically relevant rotation of at least 30° and marker displacement without impacting the computed calibration factor.

In the United States, over 450,000 total hip replacements (THR) are performed annually, and the numbers are predicted to increase significantly in the future 1 . Pre-operative digital templating is considered the standard for THR and reconstructive surgery 2,3 . It is part of established risk management and quality control measures in arthroplasty. Templating of hip surgery is performed in digital antero-posterior radiographs of the pelvis. Here, the magnification of the radiograph needs to be taken into account and radiographs are calibrated 2,4-8 . As objects are magnified anti-proportional with the distance from the x-ray source, calibration aims to calibrate a specific distance from the x-ray source. This distance is represented as a plane parallel to the detector surface. In hip surgery, the plane of interest is the hip plane. This plane is the plane cutting through the center of both hip joints in antero-posterior radiographs of the pelvis (Fig. 1). Currently, there are three ways to achieve calibration: (1) application of a fixed calibration factor 4,7 , (2) individual marker-based calibration [4][5][6]8,9 and (3) dual-scale marker methods 4,10,11 .
Fixed calibration factor methods are considered outdated and not reliable 9 . They do not take the individual hip plane position into account and thereby have an inherent error. The mean absolute error of the method has been shown to be 1.8% (1.6% and 2.0%) with a maximum error of 12.4% 4,10 .
Marker-based calibration requires automated, semi-automated or manual identification of the marker and its dimensions in the projected radiograph. Subsequently, the calibration factor is computed by the appropriate templating software.
The marker-ball method is the current clinical standard. By placing a spherical radiopaque marker of known size at the supposed height of the hip plane, the magnification of the radiograph can be calibrated 6,7,12 . However, this method is prone to misplacement of the marker and various studies found the error of the method to be unacceptable with mean errors of 8.4% (5.2-12.5) and maximum errors of up to 26.6% [4][5][6]8,9,13  www.nature.com/scientificreports/ Dual-scale calibration is a less common method 4,10,11 . Here, the sagittal diameter of the patient is measured in radiographs and the hip plane position is calculated based on empirical regression models. This method has been shown to have a mean absolute error of 1.1% (maximum 5.6%) and 2.2% (maximum 9.5%) in supine and standing radiographs, respectively 4,14 .
As the conventionally used intercept theorem is not appropriate for calculating calibration factors of spherical markers 6,12 , more complex formulae (i.e. Formula 1 and 2) are used that require computing by software.
Together, it can be concluded that none of the current methods is sufficiently reliable in calibrating radiographs for templating and planning and alternatives are sought 15 . Notably, per calibration error of about 3% (± 1.5%) a deviation of one component size from the optimal size may result in THR 16 . Optimal calibration should achieve reliable calibration errors of equal to or less than 1.5% 16 .
In this technical note, a novel, bi-planar calibration method is described with mathematical formulas, algorithms, and images in the methods section. Potential limitations are identified and analyzed. The main goal of the note is the description and application of the method, represented in the methods section. A simulation model highlights key limitations and quantifies possible effects addressed by the correction algorithm.
This method may be of particular interest for future integration of digital templating being directly translated into navigated and robotic-assisted surgery.

Methods
No human subjects were involved in the present study.
Clinical application, marker placement and radiographs. In a clinical setting, the bi-planar calibration method requires two (approximately) orthogonal radiographs of the pelvis with a single external calibration marker (ECM) in place: (1) a standard standing antero-posterior (a.p.) (low) radiograph of the pelvis. The beam is centered to the pubic symphysis and (2) a lateral standing radiograph of the pelvis.
The marker ball is fixed to the patient in the midline at the height of the pubic symphysis in a position approximately at the pubic symphysis ("belt-buckle position"). Fixation may be achieved with belts or other fixation devices. The belt-buckle position has been shown to be easy to identify and more comfortable for patients during marker placement compared to conventional positions between the legs 4,14 .
The marker stays in the same place relative to the patient during both radiographs (Fig. 2a-c). The order of radiographs taken is not relevant. While a true lateral view centered to the hip centers may not be achieved, the method is supposed to be robust and correct for potential inexact imaging. No special x-ray machine is required.
Finally, measurements and calculations of the proposed method could be integrated and automatized within existing templating software. Alternatively, a dedicated software application could be developed to identify the calibration factor which would be entered into conventional templating software either manually or automatically.
Therefore, the person performing templating would neither need to change the templating process nor be aware of the improved calibration method at all.
Symbols and terms used in the figures and the text are defined in Table 1.
Image analysis. Measurements and calculations described hereby may be automated or semi-automated within autonomous software or integrated into templating software. Figure 3 presents the algorithm for computational calculation of the key variable: the calibration factor of the hip plane (F Hip ). As shown in Fig. 3, three major workflows may be distinguished. The calculation of the calibration factors (F) of the ECM in either image with the output of two variables for subsequent use (i.e. H ECM and d cal ). Additionally, the rotation of the patient and thereby the hip plane in the lateral radiograph is identified and quantified using data from both radiographs. This information is used to correct calculations from the a.p. radiograph and finally  www.nature.com/scientificreports/ merge the information from both image analyses into the primary outcome parameter, the calibration factor of the hip plane (F Hip ) as described in more detail in the following sections.
Image analysis-identification of landmarks and objects, lines and distances. Figures 4 and 5 show sketches of lateral and antero-posterior radiographs, respectively. Here, the relevant measurements are outlined, and symbols/variables defined in Table 1 are visualized. The algorithm of the measurements is depicted in Fig. 6.

Calculation of calibration factors, H ECM and d cal .
In both radiographs, antero-posterior and lateral, the vertical height of the ECM above the detector and thereby the calibration factors (F lat and F ap ) are calculated according to the method described by Boese et al. (Formula 1 and Formula 2 for F lat and F ap , respectively) 6,12 .
Here, r is the radius of the ECM in mm and S is the source-detector-distance of the x-ray device setup in mm.
The projected lateral displacement of the ECM (a and h) from the vertical hip center line (s and u) in any image is considered in the calculation of the lateral and antero-posterior calibration factors (F lat and F ap ). To take the calibration of the projected distances into account, the computational algorithm undergoes repeated iterations of the calculation of the calibration factors until the latest calibration factor differs less than 0.0001 from the previous calculation (e.g. F ap n−1 − F ap n < 0.0001, for n being the number of iterations). There must be at least one iteration. The pre-defined difference may be changed from 0.0001 depending on required precision.
The algorithm is outlined in Fig. 7.
The output of the a.p. radiograph is the height of ECM over the detector (H ECM ). The output of the lateral radiograph is the height of ECM over the hip plane (d cal ).
(1) • Misplacement of the marker resulting in lateral deviation from the center of the hips. This effect is called lateral offset of the marker. • Patient rotation from the strict lateral position during lateral radiographs resulting in oblique imaging.
In Fig. 8 the combined effects of marker misplacement and patient rotation in the lateral radiographs are depicted.

Identification of use errors in radiographs.
Misplacement of the marker is identified in the a.p. radiograph as any horizontal deviation of the ECM center from the central beam (i > 0). It is of relevance in the algorithm for the correction of patient rotation in the lateral image (Fig. 9). Here, the direction of the lateral offset is of relevance. The direction of the lateral offset to the right or left side of the patient in the a.p. radiograph will define in whether the offset it towards the source or the detector plane in the lateral radiograph depending on the direction the patient faces towards in the lateral radiograph (looking left or right). The direction of the lateral offset per definition is defined in Table 2. For example, lateral offset of the ECM towards the right side of the patient will result in offset towards the source in case the patient faces to the left (contralateral) direction during the lateral radiograph.
Patient rotation during the lateral radiograph is identified by imperfect overlay of the two hip centers. Based on the calibrated distance of the hip centers from one another in a.p. radiograph (m cal ) and the lateral radiograph (c cal ), the rotation of the patient (α) can be assessed by Formula (3):    Here, x is the opposite the hypotenuse d and the rotation angle α as shown in Fig. 8. While it cannot be measured in the lateral radiograph, the length of i cal is known from the a.p. radiograph. x can be calculated following Formula (4): Depending on aforementioned direction of rotation and lateral offset, the value of x may be positive or negative; x is multiplied by − 1 for offset away from the source and + 1 by offset to the source; x is multiplied by − 1 for rotation away from the source and + 1 by rotation to the source.
By addition of d cal and x, the projection of d cal without the lateral offset (y) is calculated.
The rotation corrected length of y (y correction ) can be calculated by the following formula: These formulae can be combined into the following formula: The output of the a.p. radiograph is the distance of the ECM over the hip plane (d cal ). By substracting y correction from H ECM (Formula 8) the height of the hip plane above the detector plane can be derived (H Hip ).
The calibration of any (flat) object or plane of known height above the detector plane can be calculated the intercept theorem in Formula (9): (6) y correction = y cos (α) .
(7) y correction = d cal ± (sin (α) × i cal ) cos (α) .  www.nature.com/scientificreports/ Therefore, the calibration factor of the hip plane (F Hip ) is calculated by: The combined formula is therefore: Algorithm for the correction of patient rotation and lateral offset. In Fig. 9, the algorithm for the correction of rotation and lateral offset and calculation of F Hip is presented.
Simulation of rotation and lateral offset on F Hip . In a standard model, reasonable values were entered based on clinical experience and published literature. Settings were applied specified in Table 3. . Figure 6. Algorithm of a.p. and lateral radiograph analysis. www.nature.com/scientificreports/ The simulation was informed with rotation in 1° increments from 0° to 30°. Scenarios with lateral offset of 0, 20 and 60 mm were created. S is set at 1150 mm. The impact of rotation and lateral offset on F Hip as difference from the non-rotated value was calculated as absolute deviation and relative deviation.
Ethical approval. No ethics committee approval was required for this type of study. No clinical data was included. No research was performed on humans or animals.

Results
Simulation of patient rotation effects. The predefined settings resulted in a calibration factor of F Hip = 123.45. Results for rotation and lateral offset dependent simulation of F Hip with otherwise unchanged variables are presented in Table 4.
The clinically relevant absolute error of 1 was reached at 21° rotation without lateral offset, 13° with 20 mm lateral offset and 7° with 60 mm offset. The absolute error with possible impact on implant choice (i.e. 1.5%) was reached at 26°, 18° and 10° in each offset setting. The absolute errors reached 2.2, 3.6 and 6.4 at 30° rotation for each offset setting, respectively.
The errors are shown in Fig. 10.

Discussion
Quality and risk management require pre-operative templating for THR. Adequate image calibration of radiographs is an essential prerequisite for templating 8,9 . Current methods have been shown to be unreliable and lack sufficient precision. The novel bi-planar calibration method presented here may be the first non-tomographybased calibration method to allow for precise and patient-individual calibration of radiographs.
The standard for digital templating in hip surgery is the use of antero-posterior radiographs of the pelvis and additional planes including axial images of the proximal femur and often lateral imaging for spino-pelvic   www.nature.com/scientificreports/ parameters 17 . Therefore, the novel method does not require additional radiographs or additional equipment. Standard marker balls and fixation devices may be used. The error of calibration is defined by the difference from the reference calibration factor of the hip plane. It can be tested in radiographs with implants of known size in the region of interest (e.g., THR implants) as reference. Following a recent publication on effects of calibration errors on implant selection, an error equal to or below 1.5% is negligible 16 . Above 1.5%, a deviation of about one implant size per 3-4% calibration error can be assumed 16 . Therefore, the aim of any calibration method should be a maximum error of 1.5%.
Although current literature reports an error of ± 1 implant size or error of 3% (± 1.5) to be acceptable, a more stringent threshold of 1.5% error aiming for zero component size deviation may be a predicate for future improvements of templating 18 . In particular, integration of templating into a more comprehensive workflow of navigated and robotic-assisted surgery will require a more reliable and more precise templating.
Currently, three methods are considered established in clinical practice. All methods show relevant deviations from the set goal of reliable and valid calibration with an error ≤ 1.5%. The current standard of individual calibration with marker balls has been shown to be unreliable with significant deviations from the reference values. While Franken et al. reported the marker-ball method to achieve a mean error of 2% with a maximum error of 6.5%, these results were not reproducible by other authors 9 . Sinclair found a mean error of 6.8% (max. 26%) and Bayne of 8.9% 5 . Boese and Loweg et al. reported on errors in four studies with mean errors of 5.2%, 5.4%, 10.3% and 12.5%; the maximum errors were 23.3%, 26.5%, 28,6% and 23.3%, respectively 4,6-8,10,14 . There was a consensus in the literature, that marker-ball calibration is unreliable. Additionally, Sinclair, Boese and Loweg et al. found the historical fixed calibration method to be more reliable that the marker ball method.
For the fixed calibration factor method, the same calibration factor is used for all radiographs. This fixed factor can be a predefined, empirical or be based on markers that are always placed in the same place, resulting in a consistent calibration factor. Per definition, these fixed factors have an inherent error by not being individual. The known variance of the hip plane position above the detector is ignored and errors are taken into account 6 . Boese et al. found the absolute mean error of the fixed method to be 2.0% (maximum 12.1%) 14 and Loweg et al. 4 1.6% (maximum 8.2%). Similarly, in a simulation of 398 computed tomography (CT) scans, the error was 2.4% (maximum 6.4%) 10 .
The dual-calibration marker method introduced by King et al. combines empirical CT data with marker-based measurement of the sagittal patient diameter 4,10,11 . More recent advancements have reduced the dual-calibration method to one marker in the same position as in the bi-planar calibration method presented herein 4,10 . While Loweg et al. 4 were able to show superiority of the method over the marker-ball method as well as the fixed method in the supine position, there were still 45% of cases with an error above 1% (absolute mean error 1.1%, maximum 5.6%). Data for standing radiographs was able to show superiority of the dual-scale method over marker balls but not over the fixed calibration method. The mean error was 2.2% (maximum 9.5%) 14 . Overall, these reports consistently show the lack of a sufficiently precise and reliable method for calibration and a need for better methods.
In regards of bi-planar imaging, the EOS system has recently been proposed for marker-based calibration. While this method is similar to the proposed novel approach, it requires the EOS system and thus adds significant cost and complexity 19 . Still, the proposed method can be combined with the EOS system or similar devices.  www.nature.com/scientificreports/ Table 4. Results of simulation. Error is defined as difference of calculated calibration factor and true calculation factor. i is the lateral offset of the marker (i.e. displacement of the marker) in mm. Rotation in degree is the simulated patient rotation in lateral radiographs. www.nature.com/scientificreports/ The theoretical analysis of patient rotation on the bi-planar method demonstrated a maximum error for F Hip of 6.5% for a rotation of 30° in lateral radiographs with 60 mm lateral offset. In clinical reality, adequate patient positioning should be possible with a maximum of 10-15° rotation and less. It can be assumed that significantly rotated images above 15° rotation are identified as such by anatomical landmarks. Additionally, the error of rotation affects only one part of the method. The overall impact of this error has been considered in a simulation of a standard model based on empirical data. Here, a rotation of 30° would result in a calibration error of 1.4%. This is within the set benchmark for acceptability stated above. In a realistic setting with rotation of up to 15°, the overall calibration error of 0.36% is negligible. While a more pronounced effect of rotation is possible in non-standard model combination of variables, it may be safe to assume negligible effects in alternative settings.
Following the description of the method, a proof of concept study in a laboratory setting is recommended before a clinical application can be considered. While calibration is a key step and predominant source of error in templating, various factors may add to errors in templating. Besides image quality, anatomical variations and precision of measurements, intra-operative decision-making may require deviations from a template. Reasons may include but are not limited to: surgical technique, tissue management (e.g. reaming), and bone quality.
Limitations. There are limitations to the novel method. The key limitation of rotational errors due to patient positioning has been analyzed and discussed above. Additionally, use errors may result in misplacement of the marker in relation to the pubic symphysis. However, the identification of the anatomical landmark is part of standard setting of the central beam and should be assumed to be fairly reliable. Deviations from the central beam are corrected by the applied formula and similar to the rotational influence only have negligible effects. Due to the bi-planar depiction, a grossly misplaced marker would be identified as such. Another possible usererror is insufficient calibration of marker-ball distance from central beam in either or both radiographs. Single calibration with the known formula may result in overestimation of the projected distance from the central beam. Therefore, the application repeated corrections are recommended. Three (automated) repetitions render any effect clinically negligible.

Conclusions
The novel bi-planar calibration method may provide the first reliable and adequate calibration of the patientindividual hip plane for total hip replacement and reconstructive surgery. Patient rotation has been identified as possible key limitation with negligible effects on calibration factors for up to 30° of rotation. Clinical studies are now needed to confirm the reliability and validity of the proposed method.

Data availability
Data is stored on file at the University Medical Center Hamburg-Eppendorf. CKB should be contacted if necessary.