A FAST , ACCURATE AND EASY TO IMPLEMENT METHOD FOR POSE RECOGNITION OF AN INTRAMEDULLARY NAIL USING A TRACKED CARM

A C-arm is a mobile X-ray device that is frequently used during orthopaedic surgeries. It consists of a semi-circular, arc-shaped arm that holds an X-ray transmitter at one end and an X-ray detector at the other. Intramedullary nail (IM nail) fixation is a popular orthopaedic surgery in which a metallic rod is placed into the patient’s fractured bone (femur or tibia) and fixed using metal screws. The main challenge of IM-nail fixation surgery is to achieve the X-ray shot in which the distal holes of the IM nail appear as circles (desired view) so that the surgeon can easily insert the screws. Although C-arm X-ray devices are routinely used in IM-nail fixation surgeries, the surgeons or radiation technologists (rad-techs) usually use it in a trial-and-error manner. This method raises both radiation exposure and surgery time. In this study, we have designed and developed an IM-nail distal locking navigation technique that leads to more accurate and faster screw placement with a lower radiation dose and a minimum number of added steps to the operation to make it more accepted within the orthopaedic community. The specific purpose of this study was to develop and validate an automated technique for identifying the current pose of the IM nail relative to the C-arm. An accuracy assessment was performed to test the reliability of the navigation results. Translational accuracy was demonstrated to be better than 1 mm, roll and pitch rotations better than 2o and yaw rotational accuracy better than 2-5 depending on the separate angle. Computation time was less than 3.5 seconds.


INTRODUCTION
Intramedullary nail (IM nail) fixation is a popular technique in orthopaedic trauma surgeries.A rod is placed into the canal of the patient's fractured bone and fixed using metal screws.The action of fixing the IM nail is challenging since the surgeon cannot see the distal holes in the rod after insertion.During a typical IM-nail insertion surgery, both the surgical staff and the patient are exposed to considerable radiation (Neatpisarnvanit et al., 2006).One study reports an average radiation time of 4.6 minutes and average radiation doses of 1.27 mSv to the surgeon and 1.19 mSv to the first assistant (Muller et al., 1998).The purpose of this study is to propose a navigation system for IMnail distal locking surgery that helps to perform precise operation with low time and radiation consumption.Different surgical techniques exist to reduce the amount of radiation dose and operation time, each having advantages and disadvantages.The following provides a brief description about the most popular methods: nail-mounted guide, 3D preoperative imaging; surgical navigation, electromagnetic tracking and previous image analysis methods.(1) The nail-mounted guide technique uses the proximal portion of the IM nail as the reference to register the distal part (Fig. 1).The main source of error in this method is the deformation of the IM-nail during surgery: the range of deformation for a 13-mm-diameter slotted nail can be up to 15 mm in translation, 9 in flexion, and 14 in torsion (Krettek et al., 1998).Considering the different forces applied (from the surgeon, thermal change and the patient's cortical bone reaction forces), this method does not provide reliable results for distal locking guidance.Some studies have tried to address the deformation issue by calibrating and compensating for the deformations (Krettek et al., 1997).Some innovative designs of the IM rod provide a means for locating the holes regardless of the deformation that takes place along the length of the rod (Krettek et al., 1998;Abdlslam et al., 2003).The deformation issue is still a challenge with this technique.(2) Three-dimensional imaging modalities such as CT or MRI have been introduced to provide static information of pathologic or anatomic parts in the preoperative stage.However, their intraoperative performance is limited because of radiation exposure, time consumption and high expense (Zhu et al., 2001).
(3) A computer aided navigation modality for IM-nail insertion surgeries has also been introduced (Viant et al., 1997;Suhm et al., 2000).This method utilizes calibrated fluoroscopic images and registers the position of the image intensifier at the time of exposure (relative to a global coordinate system) by using a calibration phantom as well as an optical tracking system.Several X-ray shots are acquired from the IM-nail and the 3D model of the nail is created subsequently.A silhouette projection of the IM-nail's distal part is created in real time; the operator can then The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XL-5, 2014 ISPRS Technical Commission V Symposium, 23 -25 June 2014, Riva del Garda, Italy continuously change the C-arm view until the virtual distal holes appear as perfect circles.The operator then takes an X-ray image to confirm the recovered pose.Although this method provides a practical solution for time of surgery reduction, it has several limitations such as: the requirement for line of sight for the optical tracking system; cost; and issues regarding projection of the calculated location of the tools onto the X-ray, which is a significant source of error.(4) The Trigen Sureshot Distal Targeting System has been recently introduced (Smith&Nephew, Inc., Memphis, TN, USA).This system utilizes electromagnetic field tracking technology with a sensor on the probe inserted into the nail.Virtual imagery of the distal portion of the nail is then projected onto a screen to provide real-time feedback without the need for fluoroscopy.The main disadvantage of this system is its high expense and additional instrumentation.(5) Some studies have been trying to solve the problem by utilizing the image analysis methods (Leloup et al., 2008;Zheng et al., 2007).They mostly require online calibration procedures, patient attached references and landmarks and long processing time to go through an optimization routine to solve for the required pose.
The limitations and disadvantages of the mentioned techniques, all of which are aimed at reducing or eliminating radiation use for distal locking of IM nails, result in most surgeons still choosing to use the freehand technique.The freehand technique consists of the following steps: aligning the intensifier to acquire an X-ray shot in which the distal holes appear as a complete circle (as reported in Chan et al. (2013), there is 77 s of rad-tech wait time plus 105 s of setup time per fixed nail); utilizing a sharp trocar to point to the centre of the circle; using the trocar to penetrate the lateral cortex; and performing the drilling based on the created reference.Multiple drillings are often needed, but subsequent drillings can follow the first drill hole and repeated drilling can damage the cortex and cause weak fixation (Knudsen 1991).Freehand techniques for finding the distal holes are mainly based on fluoroscopic imaging (C-arms) in a trial-and-error manner.The main challenge here is to find an X-ray shot in which the distal hole appears as a complete circle, which causes considerable irradiation to both the surgeon and the patient: direct radiation exposure to the surgeon in IM-nail insertion surgery is in the range of 3.1 min to 31.4 min per surgery, in which 31%-51% of the total irradiation is just for the distal locking (Leloup et al., 2008).Long-term use of C-arms can lead to cancer or cataracts in the surgical staff (Harstall et al., 2005).
The ideal view of the IM nail is when the distal holes appear as circles.For any C-arm pose that is different than the ideal view, the distal holes will appear as ellipses; the specific shape depends on the viewpoint.Once the ideal view is acquired, the remaining steps associated with screw fixation are straightforward.The overall goal of our research is to design and develop an IM-nail distal locking navigation technique that leads to more accurate and faster screw placement with less radiation dose, with a minimum number of added steps to the operation, to make it more accepted within the orthopaedic community.The specific purpose of this study was to develop and validate an automated technique for identifying the current pose of the IM nail relative to the C-arm.

METHODS
The pose computation is done based on only two biplane X-rays.
The IM-nail's pose is reported to the user (surgeon/radiation technologist) relative to a global coordinate system determined from a previously-developed tracked C-arm system (Amiri et al, 2013).The overall work flow is illustrated in Fig. 2.
Figure 2. Overall work flow.

Coordinate System Definition (Fig. 2) (Table 1)
The image coordinate system () the original coordinate system in which the pixels are represented.The image local coordinate system () is obtained by moving the  coordinate system into the centre of the image and converting the units from pixels to millimetres.For the image global coordinate system (), the origin of the coordinate system is located on the principal point and its z axis is parallel to the image normal (Fig. 3).The global coordinate system () is obtained after performing the calibration procedure using the custom-designed phantom (Amiri et al., 2013).The origin of the local object coordinate system (Obj) is at the centroid of the upper-lower distal holes set on the nail axis (Fig. 1).The X-axis of this coordinate system is along the nail's longitudinal axis, the Y-axis in the direction of a vector from the origin that passes through the center of the upper distal hole and the Z-axis is defined to complete the orthogonal right-handed system.This contribution has been peer-reviewed.doi:10.5194/isprsarchives-XL-5-217-2014

Tracking System
A tracked C-arm (TC-arm) system that has been previously developed by our research group (Amiri et al., 2013) utilizes two inertial measurement units (IMUs) attached to the gantry of the C-arm to measure its orbit, tilt and wig wag, as well as two laser beam sensors to measure up-down and in-out movements of the gantry (Fig. 3).The comprehensive calibration protocol and phantoms provide full three-dimensional spatial information of the camera and image intensifier for any arbitrary image acquired by the TC-arm system.After capturing two bi-planar X-rays, the corresponding calibration files describing each image's intrinsic and extrinsic parameters are interpolated from the previous overall calibration of the imaging space (Fig. 4).

Biplane X-ray Acquisition
The first step is to acquire two calibrated X-ray images of the distal part of the nail.As described earlier, the TC-arm system provides the full description of the calibration information for any acquired image based on a comprehensive offline calibration process.Accordingly, each of the X-ray images (i.e.intensifier-detector set) can be computationally positioned into the equivalent position as at the time of exposure.

Feature Extraction
A simple ray-intersection procedure could be performed at this stage if there were enough information about conjugate features in two acquired X-rays.However, this is not the case.Each acquired IM-nail image does not have enough texture because of homogeneity of the material commonly used in IM-nail manufacturing and their simple, cylindrical design.However, for the purpose of positioning, pseudo-features (calculated points that are not physically present in the X-rays, but can be found in common between the two views) common to both of the X-ray shots, thanks to its specific geometric design, can be extracted.
After image acquisition, a moving average low-pass filter (with window size of 5×5) is applied to reduce the effects of random errors in the image (Fig. 5-A).The Canny edge detection (with threshold of 0.1 and a  value of 1.5) is then performed using the built-in Matlab function to detect the abrupt changes in intensity for the sake of feature extraction (Fig. 5-B).The circular projections of both the upper and lower distal holes are then detected using the circular Hough transform (Hough et al., 1964;Duda et al., 1972).For each projected distal hole, there are three parameters of interest that must be calculated: the location of the centre ( 0 ,  0 ) and the radius .For a given edge pixel (, ) lying on the circular projection of a distal hole, the following transformation is performed so the circle is represented in polar coordinates.
The created 3D Hough image (Fig. 5-C) is then searched for the peak.The coordinates of the peak location correspond to the parameters of interest for the projected distal holes (Fig. 5-D).

Pose Recognition
In order to transform each measured pixel's coordinates from the local image coordinate system (IL) to the global coordinate system (G), the image global (IG) coordinate system is defined as follows (Fig. 3): obtained from the calibration procedure, and the position of each measured distal circle centre are known.Having conjugate points in both images, the corresponding rays can be analytically reconstructed to obtain the object space coordinates.Although each individual upper and lower distal circle might appear as an ellipse rather than a complete circle (even without the occlusion effect), because of their small dimension relative to the principal distance, their projections can be approximated as circles within the X-ray.The image-processing module calculates the centres of all the four projected distal holes (upper and lower holes in each X-ray).This method requires two sets of X-ray imagery taken from two different sides of a plane containing the four holes in the distal part of the IM-nail.This helps us to find the corresponding projected distal-hole centres in the biplane images.The X-rays are cropped by the boundaries in which all the projected distal holes are apparent.
In order to find the corresponding projected distal holes in the two acquired X-rays, the following steps are performed: 1) For each detected distal point (centre of the projected distal circle), we find another distal point which has the minimum Euclidean distance to it; then we define these two points as the projected centres of the upper and lower distal hole sets.
2) The centroid of each upper-lower distal hole set is then calculated (projection of the point  in Fig. 1).3) A line is fit to these 6 points (upper holes, lower holes and centroids of these), by least squares regression, which approximately represents the IM-nail's axis; 4) The line perpendicular to the fit line at its mid-point is constructed; 5) The side of the fit line on which a distal point is located (the same analysis is done for the perpendicular line) is determined by utilizing Eq. 7.For a given point a line passes through points (  ,   ), (  ,   ) and (  ,   );  value in Eq. 7 is formed; if it is greater than zero the distal point is located on one side of the line and vice versa; 6) The  values for the fit and the perpendicular lines are compared to determine in which quadrant a distal point is located.Because of the given imaging configuration, and considering each distal hole, the distal point should appear on different sides of the approximated projection of the IM-nail axis in two biplane X-rays.This is the cue for our automatic point correspondence extraction.As seen in Fig. 6, the proposed image-processing algorithm is independent of the actual orientation of the IM-nail in space.Different angles are simulated for any arbitrary IMnail's orientation by rotating the original X-ray.
The intersection of X-rays for each extracted distal point is performed as shown in Fig. 7.
Although, in theory the reconstructed rays for the projected distal points must intersect at the center of the distal hole in object space, because of possible calibration and random errors, they form two skew rays.In order to minimize the effects of these errors on the pose estimation outcome, the centre of a line segment with the shortest length between the mentioned skew lines (Fig. 7) is calculated.The reconstruction of the corresponding ray for the i th measured point (based on the j th Xray image) can be accomplished by utilizing Eq. 8.
For a pair of conjugate points (in biplane X-rays j=1,2) the centre point of the line with the closest distance to the skew rays can be calculated and considered as the reconstructed object point.The intersection procedure is performed for all 6 conjugate points within biplane X-rays to recover the coordinates of all upper and lower distal hole centres as well as the centroid of each upperlower set.These coordinates are with respect to the global coordinate system, as defined by the C-arm tracking system.
The three-dimensional (3D) model of the IM-nail's distal part can be created by measuring the nail's dimensions, using a digitizing method or obtaining the model directly from the manufacturer.For this analysis, we measured the dimensions with vernier calipers, due to the relatively simple geometry.The coordinates of all upper, lower and centroid points (6 points) are known in the global coordinate system along and in the object's local coordinate system (thanks to the acquired 3D model).Since each extracted feature in the acquired image corresponds to a real geometric component of the IM-nail's distal part, and since the global positions of each of the described features is computed at The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XL-5, 2014ISPRS Technical Commission V Symposium, 23 -25 June 2014, Riva del Garda, Italy This contribution has been peer-reviewed.doi:10.5194/isprsarchives-XL-5-217-2014this stage, transformation parameters between the local (IM-nail coordinate system) and global coordinate systems can be solved by having at least three non-collinear, corresponding points (because of the number of extracted features, we have six conjugate points) using Horn's Method (Horn, 1987).The rigid body transformation parameters (3 rotations + 3 translations) between the object's local coordinate system and the global coordinate system are calculated in a closed form manner.The same pose parameters are therefore produced for each software run (for a specific set of biplane images).These transformation parameters represent the IM-nail's pose relative to the global coordinate system, using the previously-described points.The image processing and pose computation is accomplished with a user-friendly interface (Fig. 8).The user first uploads the biplane X-rays to the software with the corresponding calibration files.Then image processing and conjugate feature extraction is performed and the results are shown to the user.The imageprocessing algorithm is entirely automated, saving a significant amount of time and producing more accurate results for the pseudo-feature extraction.The custom user interface provides a double-check option to the user (surgeon/radiation technologist); if the user does not accept the result, then an enhanced, processed image will be displayed on the monitor so that the pseudofeatures can be manually selected by clicking on them.After feature extraction, the 3D, global position of each feature of interest is computed and the results are shown in relevant sections of the software.Possible errors (e.g. in introducing the images and calibration files) and warnings as well as computation time are also shown in a message box.
Figure 8. User interface showing the biplanar X-ray views, automatically-detected pseudo-features, option to accept the automated result or not, and the resulting calculated translations and rotations of the current view relative to the desired view.In the desired view, the front and back holes line up as circles.

Experimentation
In order to test the robustness of the solution, we backtransformed the points in the local object coordinate system into the global coordinate system using Horn's rotation and translation matrices.The maximum fitting error was 1.91 mm.Considering the nearly linear configuration of the object point, another robustness test was performed by artificially transforming the object points and trying to recover the transformation parameters.After comparing the recovered parameters to the original (arbitrary) ones, Horn's method appeared promising for the described configuration, resulting in the same parameters for the original and transformed sets.
The experiments were performed on an Arcadic Orbic Iso-C Carm (Siemens AG, Munich, Germany) retrofitted with the TCarm system (Amiri et al., 2013(Amiri et al., 2013)).A metal IM-nail (Synthes Expert 10 mm) was inserted into a polyurethane foam cube having an arbitrary orientation in space (Fig. 9), and then several bi-plane X-ray shots were acquired of the IM-nail's distal part using the tracked C-arm.Relevant coding and user interface development was done using Matlab (R2013a) software.
Validation was performed by capturing biplanar images of the IM nail, and comparing the calculated 6 degree of freedom data to that derived by fitting the 3D model of the IM-nail using 2D-3D matching techniques in the image using JointTrack biplane opensource software.

RESULTS
The computed pose parameters with their relevant accuracies for different separation angles of biplane imagery are shown in Table 2. Translation accuracies were better than 1 mm in all three directions; rotational accuracies for roll and pitch were better than 2º; rotational accuracy for yaw was better than 5º (2º for a separation angle of 25º).Computation time was less than 3.5 seconds.

DESCUSSION
This novel analysis technique provides an accurate and robust method for determining the pose of an IM nail in C-arm views.
In terms of reconstruction accuracy, the described method seems very promising and can satisfy the expectations of orthopaedic trauma surgeries.Due to the fact that only two images are required to perform the navigation computations, this method can be simply adapted into current orthopaedic trauma surgeries to have better and more accurate outcomes of IM-nail fixation.The X-ray calibration only needs to be performed once for each Carm, and does not require a patient-attached reference base, important advantages over previous techniques (Leloup et al., 2008;Zheng et al., 2007).The computation time is dramatically lower than the time needed to find the distal holes using current surgical method and can be reduced even further in future implementation of the software in different IDE (Integrated development environment).A magnified image may improve the accuracy even further.As described earlier, each additional minute added to the time of surgery will notably increase the operation expenses.Such a system could reduce operating time and radiation dose by reducing the amount of trial and error that currently takes place.The computation time involved in IM-nail navigation using our method and software is remarkably lower than the time needed for finding the distal holes in current methods of orthopaedic trauma surgery.The main limitation of the validation study is that it was only performed for a single IM nail geometry; other geometries will be tested in the future.The next phase is to validate the performance of the proposed algorithm in the presence of bone and soft tissue artifacts as well as to create a complete system suitable for the operating room, and test it with surgeons and rad-techs.Another limitation associated with the proposed method is the need to have biplane X-rays on either side of the plane, containing the four distal points.

CONCLUSION
Distal locking of intramedullary nails for fracture fixation is challenging and typically done by a trial-and-error technique using C-arm imaging.Our automated technique of identifying the current pose of the C-arm compared to that required to achieve the ideal view should improve accuracy, reduce operating time and radiation dose, and improve patient outcome.

Figure 1 .
Figure 1.Distal part of the IM-nail and the local object coordinate system

Figure 3 .
Figure 3. Configuration of different coordinate systems

Figure 4 .
Figure 4. Calibration parameters: principal distance  (physical distance from X-ray source to projection plane), principal point (   ,    , ) (perpendicular projection of the X-ray source onto the projection plane), pixel size  (resolution), position of the Xray source (   ,    ) (relative to the phantom's global coordinate system), image normal vector  ⃗ and image up vector  ⃗ (the vector that indicates the planar orientation of the X-ray).

Table 1 .
Coordinate system definitions

Table 2 .
Pose recovery results.There is only one value for any given set of biplanar images due to the closed-form solution.*Separation angle = the biplanar angle between the two positions of source-detector sets for two X-ray shots ** True values based on JointTrack biplane fitting of a 3D model of the IM nail to the 2D images *** Using a computer with following specifications: Intel ® core ™ i5 processor, 7.87 GB of random access memory and 64-bit Windows 7 operating system.