Migration Measurement of Pins in Postoperative Recovery of the Proximal Femur Fractures Based on 3D Point Cloud Matching

Background and objectives: Internal fixation is one of the most effective methods for the treatment of proximal femur fractures. The migration of implants after the operation can seriously affect the reduction of treatment and even cause complications. Traditional diagnosis methods can not directly measure the extent of displacement. Methods: Based on the analysis of Hansson pins, this paper proposes a measurement method based on three-dimensional matching, which uses computerized tomography (CT) images of different periods of patients after the operation to analyze the implants’ migration in three-dimensional space with the characteristics of fast speed and intuitive results. Results and conclusions: The measurement results show that the method proposed in this paper has more minor errors, more flexible coordinate system conversion, and more explicit displacement analysis than the traditional method of manually finding references in CT images and measuring displacement.


Introduction
Proximal femur fractures commonly occur worldwide, especially in the elderly [1]. With increasing incidence, the number of patients is expected to double by 2025 compared to 1990 [2]. Among these patients, the female population is two times more than the male population [3]. In nearly half of those hip fractures, intracapsular fractures of the femoral neck were observed [4].
Currently, for treating Garden I and Garden II stable femoral neck fractures, the use of internal fixation has become a consensus among orthopedic surgeons [5][6][7]. With internal fixation, the risk of infection, dislocation, femoral fracture, and laxity is lower than with total hip arthroplasty (THA) [8]. Additionally, internal fixation surgery provides minimal invasiveness and significantly reduces postoperative hospitalization time [9]. Various options are currently available for stabilizing the internal fixation of femoral neck fractures, including cannulated screws, dynamic hip screws, proximal femoral locking plates, and other implants. The published literature suggests that implant failure is one of the main reasons for reoperation after internal femoral fixation [10]. Consequently, selecting the appropriate internal fixation solution for the patient to ensure postoperative implant stability with a minimum of movement is critical to the success of the procedure.
The current approach to studying the stability of internal fixation solutions is mainly biomechanical simulation. Researchers have used stress testers to simulate human gait behavior by applying pressure to synthetic bones or cadaveric femora with internal fixation and calculating the implant displacement as a stability criterion [11][12][13][14]. The use of finite element models is also one of the standard methods to simulate implants' mechanical properties such as stress, strain, the load to failure, and displacement [15][16][17]. The majority of the published literature evaluating internal fixation solutions utilizes simulation models created with a limited number of parameters. These models, therefore, only simulate the forces and displacements of the femur and implant in a particular situation. Nevertheless, during the patient's postoperative recovery, the femur is subjected to a complex combination of forces that vary with the movement's posture. Conventional biomechanical simulation results, accordingly, do not provide a comprehensive evaluation of the implant.
Besides, femoral neck fractures require a lengthy recovery period after surgery, especially in the elderly, who have slow bone healing. Computerized tomography (CT) medical images are simple to obtain and can be acquired at all postoperative time points. It can provide the most direct information about the implant's displacement under realistic postoperative motion conditions of the patient, which is not easy to achieve with traditional mechanical simulation and finite element methods. To obtain the displacement data of the target object inside the patient, the plastic surgeon primarily selects rigid references in the radiographic images and measures the target object's position relative to the reference object in different image sequences, respectively. The position coordinates are used to calculate the displacement of the target object in the different image sequences. Such a method is complicated to operate and vulnerable to the subjective factors of the surgeon. In this paper, we take Hansson pins as the object of study and propose a method for the fine registration of rigid references at the fracture site using point cloud information from the 3D reconstruction. The method uses the converted point cloud coordinates to calculate the implant's displacement and rotation during the postoperative recovery process, and the output uses a 3D model to visualize the displacement results. The importance and originality of this study are that this research addresses the limitations of traditional methods, such as biomechanical simulations' limitation in simulating patient behavior, and the inability to quantify the displacement rapidly and accurately during diagnosis using CT medical images. The experimental results show that, compared with the traditional method of manual displacement measurement, this method can significantly simplify manual displacement measurement and reduce the measurement time without decreasing the measurement accuracy.

Patients
We analyzed 10 cases from March 2012 to January 2015 provided by Hyogo Prefectural Awaji Medical Center. All the cases were associated with intracapsular fracture and the age of the patients ranged from 65 to 85. As shown in Figure 1, an intracapsular fracture refers to the femoral neck fracture that occurs within the capsule of the hip joint. Due to the lack of periosteum and limited callus formation, the processing of healing is slow. Among the cases in this research, the Hansson pin (Hansson Pin System, Stryker) [18] was used to fix the femur's neck. The Hansson pin is a 6.5-mm diameter unthreaded Due to the lack of periosteum and limited callus formation, the processing of healing is slow. Among the cases in this research, the Hansson pin (Hansson Pin System, Stryker) [18] was used to fix the femur's neck. The Hansson pin is a 6.5-mm diameter unthreaded nail with various specifications and has a length ranging from 70 mm to 120 mm. Each pin can be divided into two parts, the outer sleeve and the inner movable hook pin. Typically surgeons use two pins for fixing and screwing out the hook pins when fixing (Figure 2). Due to the lack of periosteum and limited callus formation, the processing of healing is slow. Among the cases in this research, the Hansson pin (Hansson Pin System, Stryker) [18] was used to fix the femur's neck. The Hansson pin is a 6.5-mm diameter unthreaded nail with various specifications and has a length ranging from 70 mm to 120 mm. Each pin can be divided into two parts, the outer sleeve and the inner movable hook pin. Typically surgeons use two pins for fixing and screwing out the hook pins when fixing ( Figure  2). We used AP X-rays and computed tomography (CT) to record the patient's intracapsular fracture status and the Hansson pin's position at three different times. The time points of recording were preoperative, postoperative, and after one year of recovery, respectively. 3D reconstruction was then performed to assess the patient's recovery status as well as to calculate the change in Hansson's pin position.

Image-Based Measurement Method
The traditional method of measuring the migration of a Hansson pin is similar to measuring a broken bone's displacement after a fracture. A CT scan is performed on the We used AP X-rays and computed tomography (CT) to record the patient's intracapsular fracture status and the Hansson pin's position at three different times. The time points of recording were preoperative, postoperative, and after one year of recovery, respectively. 3D reconstruction was then performed to assess the patient's recovery status as well as to calculate the change in Hansson's pin position.

Image-Based Measurement Method
The traditional method of measuring the migration of a Hansson pin is similar to measuring a broken bone's displacement after a fracture. A CT scan is performed on the target position. The two-dimensional image measurement software is used to find the landmarks in the CT images, then the landmarks are used to establish a coordinates system. Generally, the surgeon selects the area containing the greater trochanter, lesser trochanter, gluteal tuberosity, and other regions with a protuberance structure as references.
Typically, CT images are displayed on a monitor as a two-dimensional image that can be viewed as an image formed by three-dimensional spatial perspective projections. The figure's information is subject to angular errors. In most cases, a three-dimensional coordinate system needs to be reconstructed. By locating the endpoint coordinates of pins in different sequences of CT images, Equation (1) can be used to calculate the displacement.
where (x 1 , y 1 , z 1 ) and (x 2 , y 2 , z 2 ) represent the coordinates of the same point in the two measurements, respectively.

Preprocessing of CT Images
The generated 3D model based on the CT scan can be affected by the patient's posture and position relative to the CT scanner during the CT recording. Besides, changes in skeletal health and initial orientation during the 3D reconstruction can also model the where ( , , ) and ( , , ) represent the coordinates of the same point in the two measurements, respectively.

Preprocessing of CT Images
The generated 3D model based on the CT scan can be affected by the patient's posture and position relative to the CT scanner during the CT recording. Besides, changes in skeletal health and initial orientation during the 3D reconstruction can also model the spatial position. These lead to the inability to directly calculate the position changes of the Hansson pins between the postoperation period and the one-year recovery period ( Figure 3). To convert the three-dimensional models of pins postoperatively and one year after recovery into a uniform coordinate system for comparison, the reference should be selected as a relatively permanent structure, i.e., the reference does not change significantly during the one-year recovery process. Consequently, we chose the femur as the reference. According to the time sequence, the pins and femurs were reconstructed and transformed into 3D point clouds, respectively, based on the postoperative CT images and the CT images after the one-year recovery. In this paper, several model reconstruction techniques are employed to improve alignment accuracy and reduce the matching time. First, as shown in Figure 4, only the femur portion that did not contain the femoral head and the pins was used as a reference since the femoral neck fracture could cause a change of the femoral head position, and the pin position could also affect the matching accuracy. To convert the three-dimensional models of pins postoperatively and one year after recovery into a uniform coordinate system for comparison, the reference should be selected as a relatively permanent structure, i.e., the reference does not change significantly during the one-year recovery process. Consequently, we chose the femur as the reference. According to the time sequence, the pins and femurs were reconstructed and transformed into 3D point clouds, respectively, based on the postoperative CT images and the CT images after the one-year recovery. In this paper, several model reconstruction techniques are employed to improve alignment accuracy and reduce the matching time. First, as shown in Figure 4, only the femur portion that did not contain the femoral head and the pins was used as a reference since the femoral neck fracture could cause a change of the femoral head position, and the pin position could also affect the matching accuracy. Moreover, partial femur data also reduce the number of points in the model and reduce the calculation time during coordinate conversion. Besides, to reduce the point cloud noise during the alignment process, we filled the model's interior during the model reconstruction process. Figure 5 presents the process of calculation. Another technique that has been used is to roughly place the axis of the femoral part used for alignment in the z-direction of space during model reconstruction. In this way, the obtained model can be directly fine aligned. After applying the rotation matrix obtained from the alignment on the pins, the calculation of the implant shift can be performed. Moreover, partial femur data also reduce the number of points in the model and reduce the calculation time during coordinate conversion. Besides, to reduce the point cloud noise during the alignment process, we filled the model's interior during the model reconstruction process. Figure 5 presents the process of calculation. Another technique that has been used is to roughly place the axis of the femoral part used for alignment in the z-direction of space during model reconstruction. In this way, the obtained model can be directly fine aligned. After applying the rotation matrix obtained from the alignment on the pins, the calculation of the implant shift can be performed.  Another technique that has been used is to roughly place the axis of the femoral part used for alignment in the z-direction of space during model reconstruction. In this way, the obtained model can be directly fine aligned. After applying the rotation matrix obtained from the alignment on the pins, the calculation of the implant shift can be performed.

Iterative Closest Point
The iterative closest point (ICP) algorithm is an iterative optimization method based on the least-square method that is used to solve the rigid transformation of the optimal registration of two sets of point clouds [19]. This algorithm aims to find the rotation and translation parameters between the point cloud to be matched and the reference point cloud using the specific geometric features. These parameters are used to transform the matched point cloud data. The iterations continue until the transformed results meet the requirements for convergence accuracy. The ICP algorithm execution process in this paper is shown in Figure 6.
Step 1: Take the two sets of point clouds P and Q as the initial point set of fine registration, where P is the point cloud to be matched and Q is the reference point cloud. P's center is flattened to coincide with the center of Q, and the translation vector is t 0 .
Step 2: For each point p i in P, we search for the corresponding point q i in Q, from the corresponding points pairs, and then use the direction vector threshold to eliminate the wrong corresponding point pair. The product function is defined as The basic algorithm of the ICP is as follows: R n is defined as the rotation matrix after the Nth matching, and t is the translation vector.
Then we compute the rotation matrix that minimizes the mean square of the distance.
registration of two sets of point clouds [19]. This algorithm aims to find the rotation translation parameters between the point cloud to be matched and the reference p cloud using the specific geometric features. These parameters are used to transform matched point cloud data. The iterations continue until the transformed results mee requirements for convergence accuracy. The ICP algorithm execution process in this p is shown in Figure 6. The basic algorithm of the ICP is as follows: is defined as the rotation matrix the Nth matching, and is the translation vector.
Step 1: Take the two sets of point clouds and as the initial point set of fine istration, where is the point cloud to be matched and is the reference point cl 's center is flattened to coincide with the center of , and the translation vector is Step 2: For each point in , we search for the corresponding point in , f the corresponding points pairs, and then use the direction vector threshold to elimi the wrong corresponding point pair. The product function is defined as Then we compute the rotation matrix that minimizes the mean square of the dista Figure 6. Process of performing alignment using the ICP algorithm.
Step 3: Point cloud P rotates according to the optimal solution in Equation (3), as follows.
The rotation matrix R can be solved by analyzing the covariance matrix between the corresponding point clouds.
Step 4: Determine whether the error E(R,t) is less than the preset value. If it is true, the iterations are stopped and failing, in which case Steps 2 and 3 are repeated until the iterations are completed. Then, the result can be expressed as The ICP algorithm based on neighborhood features is widely used. Compared with the traditional algorithm, it can improve the point search rate and improve the matching points' accuracy. The time cost of point cloud matching using the ICP algorithm depends on the femur part's points number. It also depends on the computing power of the CPU. In this paper, the hardware information we used is shown in Table 1. In this stage, we used a 3D Slicer [20] to reconstruct the 3D model. The 3D Slicer is a free open-source software for medical image analysis, visualization, and image-guided therapy research, which can be used on a variety of operating systems. We adopted the threshold tool and build-in Otsu algorithm to generate 3D models of the femur and the Hansson pin, respectively. Otsu is an algorithm to calculate the binarization segmentation threshold of an image proposed by Japanese scholar Otsu in 1979 [21]. Among the 3D models, the skeleton model's minimum threshold range was 150, and the minimum threshold range of the pins were 1400. We applied these parameters and the 3D models were reconstructed. Figure 7 lists the models used in the next stage. Figure 7a,b presents how the pins and femur models were constructed, respectively, and that they share the same coordinate system. With the processing of 10 sets data, we obtained 10 sets of models. Then, fine registration was performed using the ICP method.

= ⋅
The ICP algorithm based on neighborhood features is widely used. Compared with the traditional algorithm, it can improve the point search rate and improve the matching points' accuracy. The time cost of point cloud matching using the ICP algorithm depends on the femur part's points number. It also depends on the computing power of the CPU. In this paper, the hardware information we used is shown in Table 1. In this stage, we used a 3D Slicer [20] to reconstruct the 3D model. The 3D Slicer is a free open-source software for medical image analysis, visualization, and image-guided therapy research, which can be used on a variety of operating systems. We adopted the threshold tool and build-in Otsu algorithm to generate 3D models of the femur and the Hansson pin, respectively. Otsu is an algorithm to calculate the binarization segmentation threshold of an image proposed by Japanese scholar Otsu in 1979 [21]. Among the 3D models, the skeleton model's minimum threshold range was 150, and the minimum threshold range of the pins were 1400. We applied these parameters and the 3D models were reconstructed. Figure 7 lists the models used in the next stage. Figure 7a,b presents how the pins and femur models were constructed, respectively, and that they share the same coordinate system. With the processing of 10 sets data, we obtained 10 sets of models. Then, fine registration was performed using the ICP method. According to the different iterations' registration results listed in Table 2, the registration accuracy remained stable when the iteration exceeded 125. The improvement in registration accuracy is less than 0.1% for an increase of 25 iterations. After the alignment was completed, we used the obtained rotation matrix and translation vectors to calculate the pin and femur positions. According to the different iterations' registration results listed in Table 2, the registration accuracy remained stable when the iteration exceeded 125. The improvement in registration accuracy is less than 0.1% for an increase of 25 iterations. After the alignment was completed, we used the obtained rotation matrix and translation vectors to calculate the pin and femur positions. To verify the effectiveness and accuracy of the method proposed in this paper, we manually aligned the femur and pins models and measured the displacement of the pin endpoints. By repeating the operation three times, as we mentioned above, and calculating the average value, we obtained the reference values of actual pin migration used to verify the traditional method's accuracy and the accuracy of the method proposed in this paper. Figure 8 explains that we imported two groups of 3D reconstruction models before and after a one-year recovery period into the Rhinoceros software [22], matched the two models artificially, and measured the displacement data of the corresponding point of the pins. Measurement by the Traditional Method The first step in creating a coordinate system is to locate the centerline of the medullary cavity, which hardly changes its relative position without significant damage to the corpus femoris. In the software RadiAnt [23], we performed multiplanar reconstruction  The first step in creating a coordinate system is to locate the centerline of the medullary cavity, which hardly changes its relative position without significant damage to the corpus femoris. In the software RadiAnt [23], we performed multiplanar reconstruction to CT images to obtain three mutually perpendicular planes. By moving two of the planes, we found the medullary cavity's projection, and located the centerline of the medullary cavity, line L, according to the position information in two mutually perpendicular planes. The process of locating line L is shown in Figure 9. The midline of the medullary cavity was defined as the z-axis, with its positive direction pointing to the greater trochanter.

Measurement by the Traditional Method
The first step in creating a coordinate system is to locate the centerline of the medullary cavity, which hardly changes its relative position without significant damage to the corpus femoris. In the software RadiAnt [23], we performed multiplanar reconstruction to CT images to obtain three mutually perpendicular planes. By moving two of the planes, we found the medullary cavity's projection, and located the centerline of the medullary cavity, line , according to the position information in two mutually perpendicular planes. The process of locating line is shown in Figure 9. The midline of the medullary cavity was defined as the -axis, with its positive direction pointing to the greater trochanter.
(a) (b) (c)  In Figure 10a shows the process of creating the x-axis in the left femur. We located the farthest point A from the z-axis in the lesser trochanter region. The line that goes through point A and vertical to the z-axis is the x-axis, with the positive direction pointing to point A. Additionally, the intersection point O of the x-axis and z-axis is the coordinate origin. We defined the line passing through the origin and perpendicular to the x-axis and z-axis as the y-axis. The positive direction of the y-axis is the direction of the cross product of the z-axis and the x-axis. Similarly, the coordinate system in the right femoral model, as shown in Figure 10c, was established. In Figure 10a shows the process of creating the -axis in the left femur. We located the farthest point A from the -axis in the lesser trochanter region. The line that goes through point A and vertical to the -axis is the -axis, with the positive direction pointing to point A. Additionally, the intersection point O of the -axis and -axis is the coordinate origin. We defined the line passing through the origin and perpendicular to theaxis and -axis as the -axis. The positive direction of the -axis is the direction of the cross product of the -axis and the -axis. Similarly, the coordinate system in the right femoral model, as shown in Figure 10c, was established.  Figure 11 presents the established coordinate system, the process of measuring the proximal pin's coordinates, and the distal pin's endpoints.    Figure 11 presents the established coordinate system, the process of measurin proximal pin's coordinates, and the distal pin's endpoints.  We eliminated the femur part and quantitatively calculated the pins' movem the three-dimensional space. As shown in Figure 13, the principal component a was used to calculate the direction vector for obtaining relative angles, draw bounding box for the pins, and obtaining the endpoint coordinates. Meanwhile, th length of pins listed in Table 3 was used to calibrate the length scale of the poin data.  We eliminated the femur part and quantitatively calculated the pins' movement in the three-dimensional space. As shown in Figure 13, the principal component analysis was used to calculate the direction vector for obtaining relative angles, drawing the bounding box for the pins, and obtaining the endpoint coordinates. Meanwhile, the actual length of pins listed in Table 3 was used to calibrate the length scale of the point cloud data .  6  75  90  female  8  7  85  100  female  7  8  85  90  female  7  9  80  90  female  7  10 80 90 female 6 Figure 13. Visualization of pins' movement and calculation of moving distance and rotati   1  80  90  female  79  2  85  95  female  76  3  80  95  female  81  4  90  100  female  65  5  80  90  female  78  6  75  90  female  85  7  85  100  female  79  8  85  90  female  77  9  80  90  female  73  10  80  90  female  67 After femur registration, each femur model's alignment effect was evaluated on the basis of the distance from each point in the converted femur point cloud to the nearest point in the benchmark point cloud. This subsection used the maximum value, the average value, the proportion of points whose distance was less than 2 mm, and the proportion of points whose distance was less than 0.5 mm as evaluation criteria.
Additionally, for a more precise analysis of the Hansson pin's movement in the femur, we transformed the aligned model into a new coordinate system. Figure 14 describes the new coordinate system of the proximal pin and the distal pin after transformation. The red pin depicts the point cloud of the Hansson pin postoperatively, and the green pin depicts the point cloud of the Hansson pin one year after surgery.
According to the 3D point cloud of the postoperative proximal pin in Figure 14a, we fit its central axis, the blue axis, as the z-axis of the new coordinate system, pointing to the top of the Hansson pin as the positive direction. The center of the point cloud of the pin served as the origin of the coordinate system. Passing the origin, the y-axis was established parallel to the hook pin, and the positive direction was defined as the direction of the pin elongation. Furthermore, the y-axis vector and z-axis vector's cross product was used as the vector of the red x-axis. Moreover, the direction was determined by the result of the cross product. Similarly, a new coordinate system for the distal pin in Figure 14b was built. age value, the proportion of points whose distance was less than 2 mm, and the proportion of points whose distance was less than 0.5 mm as evaluation criteria.
Additionally, for a more precise analysis of the Hansson pin's movement in the femur, we transformed the aligned model into a new coordinate system. Figure 14  According to the 3D point cloud of the postoperative proximal pin in Figure 14a, we fit its central axis, the blue axis, as the -axis of the new coordinate system, pointing to the top of the Hansson pin as the positive direction. The center of the point cloud of the pin served as the origin of the coordinate system. Passing the origin, the -axis was established parallel to the hook pin, and the positive direction was defined as the direction of the pin elongation. Furthermore, the -axis vector and -axis vector's cross product was used as the vector of the red -axis. Moreover, the direction was determined by the result of the cross product. Similarly, a new coordinate system for the distal pin in Figure  14 b was built. Table 2 describes the result of registration with different iterations. From the proportion of points whose distance to the corresponding point was less than 0.5 mm, when the iterations reached 125, the optimal result could be obtained. Table 4 shows the time used when the iterations were set to 125 for the 3 cases in the table that were randomly selected from the 10 cases. The time increased by five milliseconds for each additional point.   Table 2 describes the result of registration with different iterations. From the proportion of points whose distance to the corresponding point was less than 0.5 mm, when the iterations reached 125, the optimal result could be obtained. Table 4 shows the time used when the iterations were set to 125 for the 3 cases in the table that were randomly selected from the 10 cases. The time increased by five milliseconds for each additional point.  Figure 15 presents the data preprocessing results, and the 10 groups of models based on the CT images. The models' main directions in each group were the same and could be used directly for fine registration. Figure 16 displays the results after the position transformation using the matrix obtained from the registration. The red model can be regarded that the green model in Figure 15 transformed their coordinate systems to the coordinate systems of white models.  Figure 15 presents the data preprocessing results, and the 10 groups of models based on the CT images. The models' main directions in each group were the same and could be used directly for fine registration.  Figure 16 displays the results after the position transformation using the matrix obtained from the registration. The red model can be regarded that the green model in Figure  15 transformed their coordinate systems to the coordinate systems of white models.   Figure 15 presents the data preprocessing results, and the 10 groups of models based on the CT images. The models' main directions in each group were the same and could be used directly for fine registration.  Figure 16 displays the results after the position transformation using the matrix obtained from the registration. The red model can be regarded that the green model in Figure  15 transformed their coordinate systems to the coordinate systems of white models.  As shown in Figure 17, the pins and the bounding boxes of each group were transformed into the same coordination system. The green lines in the image represent the distance traveled by the top vertexes of the pins, and the blue lines describe the moving distance of the lower vertexes of the pins. What is more, the movement of each pin can be perceived from various perspectives. The data we obtained are listed in Table 5, and all data are retained with two significant digits. Figure 17, the pins and the bounding boxes of each group were transformed into the same coordination system. The green lines in the image represent the distance traveled by the top vertexes of the pins, and the blue lines describe the moving distance of the lower vertexes of the pins. What is more, the movement of each pin can be perceived from various perspectives. The data we obtained are listed in Table 5, and all data are retained with two significant digits.   Table 6 shows the displacement of the Hansson pin in each direction in the new coordinate system that is discussed in Section 2.5.3.    Table 6 shows the displacement of the Hansson pin in each direction in the new coordinate system that is discussed in Section 2.5.3.

Results of Evaluation
In this paper, we defined the corresponding points in the post-alignment point cloud and the reference point cloud with distances less than 0.5 mm as coincident points, indicated by blue dots in Figure 16. The average and maximum distances of the corresponding points in all experimental cases are listed in Table 7. Besides, the proportion of corresponding points at a distance of less than 2 mm and the percentage of overlapping points were used to evaluate the degree of overlap between the two point clouds. Table 8 shows that in the first case, the coordinates of the Hansson pins' endpoints and the pins' length calculated using these coordinates were measured for the same patient at two different times using the conventional method. The results show that the length of pins computed using this method had an error between 0.6 mm and 1 mm, which proves that the error of the method proposed in this paper is limited.  Table 9 compares the results obtained using the conventional method, the method proposed in this paper, and the manual measurement in the first case. Compared with the traditional method, our method has a clear advantage and improvement in the measurement results' accuracy.  Figure 18 illustrates the comparison of the results' absolute error values using the conventional method and our method. Where Figure 18a

Discussion
The incidence of proximal femoral fractures has increased significantly with the population's aging, which has occurred far more among women than men [17]. The preferred treatment for stable femoral neck fractures is internal fixation, where pins or screws are the main components use for internal fixation [24]. Implant stability is critical to the success of internal fixation procedures and femoral healing. Traditional methods of evaluating implant stability mainly use biological simulation and finite element analysis, which have limitations and cannot comprehensively evaluate the stability of implants. CT medical images can provide displacement data of the implant inside the patient's body and can most directly evaluate the stability of the implant under real force conditions. However, the current clinical practice mainly relies on the manual measurement of displacement data by surgeons, which imposes a significant workload on surgeons, and the accuracy of the measurement results is highly dependent on the experience of surveyors. In

Discussion
The incidence of proximal femoral fractures has increased significantly with the population's aging, which has occurred far more among women than men [17]. The preferred treatment for stable femoral neck fractures is internal fixation, where pins or screws are the main components use for internal fixation [24]. Implant stability is critical to the success of internal fixation procedures and femoral healing. Traditional methods of evaluating implant stability mainly use biological simulation and finite element analysis, which have limitations and cannot comprehensively evaluate the stability of implants. CT medical images can provide displacement data of the implant inside the patient's body and can most directly evaluate the stability of the implant under real force conditions. However, the current clinical practice mainly relies on the manual measurement of displacement data by surgeons, which imposes a significant workload on surgeons, and the accuracy of the measurement results is highly dependent on the experience of surveyors. In this research, we propose a method to measure implants' movement after internal fixation for patients suffering proximal femur fractures, and this method is based on 3D point cloud registration.
In Reference [14], Schopper, Clemens, et al. evaluated two internal fixation systems by simulating the pelvis's pressure on the femur during human gait and measured the force and displacement of the implants in the frontal and sagittal planes. In another study, the authors used finite element models to implement biomechanical simulations of five different configurations of internal fixation implants [15]. In both studies, only the pelvis's pressure on the femur was simulated during the standing phase of the patient's gait, ignoring the interaction forces of the muscles and other organs. More critically, they did not study the internal fixation implants in the fixation effect throughout the patient's postoperative recovery. In daily life, patients spend most of their time sleeping and sitting, which can have a cumulative effect on the implant position and its stability. The method proposed in this paper directly utilizes authentic postoperative CT medical images of the patient as the basis for the study. The results in Table 6 show the displacement of the pins after the patient has experienced one year postoperatively. This method addresses the limitations of traditional biomechanical simulation methods in simulating the complex environment.
We found that the ICP algorithm can provide high precision in fine alignments. However, with the number of points increasing in the point cloud, the time consumed per iteration also grows. To solve a problem that requires a long time, we downsized the point cloud or removed parts of the 3D model with less feature quantity. In our experiment, we used a part of the femur for registration, and satisfactory results were obtained. According to the outcomes listed in Table 4, when the number of iterations was set to 125, the time used for registration increased by five milliseconds for each additional point. Therefore, we can reduce the registration time by reducing the number of model points while still meeting the registration accuracy requirements. In this study, we also found that a portion of the corresponding points in the aligned model had a distance greater than 2 mm, and this fraction ranged from 3% to 19%. The possible reason for is that, in the process of 3D reconstruction, some non-femoral regions are identified as the femur as the threshold value is the same as the femur, resulting in some irregular points existing in the generated femur. Since these points do not belong to the femur, the corresponding points cannot be found, but the nearest points are matched, which affects the experimental results. The extraction of boundary information from point clouds and the development of point cloud filtering methods are expected to improve the experimental results.
The results in Table 9 demonstrate that, in the current study, the newly proposed method showed a significant improvement in the error of the measurement results compared to the method in which the surgeon establishes a coordinate system in the CT images for measurement. The conventional measurement method relies strongly on the expert's experience in establishing the coordinate system and selecting the target location, which is susceptible to subjective factors.
Another important finding based on the results listed in Table 6 was that the Hansson pin moved gradually downward in the femur, whose coordinate system was built and is described in Section 2.5.3. In 10 cases, all pins moved along the Hansson pin's central axis, toward the lateral aspect of the femur. For seven of the cases, the distal pins were displaced to varying degrees in the opposite direction of the hook pin extension, and the displacements of the top ends were greater than the displacements of the bottom ends, indicating that the pins also rotated to the opposite direction of the hook pin elongation during the displacement process.
In Figure 7e, the smoothness of the two femoral models' outer surface without the femoral head is not consistent; this is because the two 3D femoral models originated from different CT image sequences. These two sequences were scanned one year apart and used different scanning equipment and scanning parameters. The green model was derived from CT medical images after an internal fixation surgery with an image layer spacing of 3 mm. The blue model was derived from CT images after a one-year recovery period with an image layer spacing of 1.5 mm. While cutting the 3D model, the images with a large layer spacing produced significant faults at the incision, which did not affect the reference registration.
The major limitation of this study is that we used the built-in threshold tool of a 3D Slicer to implement the automatic 3D reconstruction of CT medical images. The reconstructed 3D model contained the whole femur and the connected part of the pelvis, which needed to be artificially segmented in order to obtain the alignment object, as shown in Figure 4. In addition, it was necessary to manually remove the interfering points generated during the 3D reconstruction process to avoid the influence of these interfering points on the registration results. The average time required to manually remove the interference points and segment the alignment object was 120 s. The time required to measure the implant displacement depended on the number of sampling points of the alignment object and can be controlled to be less than 200 s. The total time required to complete an implant displacement was approximately 270 s. Since the preprocessing of the 3D point cloud data in this study was independent of the displacement calculation stage, the automatic segmentation of the reference part could also be achieved by other methods in future studies to reduce the time consumption. In addition, the purpose of this study was to verify the effectiveness of the proposed method, therefore there was no optimization in our study for the registration time. The main time of the displacement calculation stage was spent on the alignment of the reference 3D point cloud, and we could reduce the time consumption by decreasing the number of sampling points.

Conclusions
In this investigation, the aim was to present a method based on point cloud matching for evaluating the stability of internal fixation implants in femur fractures during patient recovery. This method was based on the Hansson pins analysis and is widely applicable to the analysis of other implants used for fixation. We reconstructed the femur and implant using CT images of patients at different times after internal fixation surgery. A portion of the femur with no femoral head was selected as a reference, and the pin-point clouds from different periods were converted to the same coordinate system to calculate the endpoint displacement of the corresponding pin. Meanwhile, a new coordinate system based on the pin axis and extension direction of the hook pin was used to evaluate the Hansson pin as a feature.
Since the same initial orientation was chosen for the same set of data in the 3D reconstruction model, the femur's rough alignment was avoided, which reduced the alignment time and improved the accuracy.
Furthermore, the measurement error in our study was limited, and the method yielded satisfactory results. Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.

Data Availability Statement:
The data on the patients included in this clinical study are not publicly available due to ethical and privacy reasons.