Bone-to-Bone and Implant-to-Bone Impingement: A Novel Graphical Representation for Hip Replacement Planning

Bone-to-bone impingement (BTBI) and implant-to-bone impingement (ITBI) risk assessment is generally performed intra-operatively by surgeons, which is entirely subjective and qualitative, and therefore, lead to sub-optimal results and recurrent dislocation in some cases. Therefore, a method was developed for identifying subject-specific BTBI and ITBI, and subsequently, visualising the impingement area on native bone anatomy to highlight where prominent bone should be resected. Activity definitions and subject-specific bone geometries, with planned implants were used as inputs for the method. The ITBI and BTBI boundary and area were automatically identified using ray intersection and region growing algorithm respectively to retain the same ‘conical clearance angle’ obtained to avoid prosthetic impingement (PI). The ITBI and BTBI area was then presented with different colours to highlight the risk of impingement, and importance of resection. A clinical study with five patients after 2 years of THA was performed to validate the method. The results supported the study hypothesis, in that the predicted highest risk area (red coloured zone) was completely/majorly resected during the surgery. Therefore, this method could potentially be used to examine the effect of different pre-operative plans and hip motions on BTBI, ITBI, and PI, and to guide bony resection during THA surgery.


INTRODUCTION
Total Hip Arthroplasty (THA) produces excellent intermediate to long-term results in accomplishing the primary objectives of enabling patients to reinstate their activities of daily living (ADLs) without pain or restriction. 2,5,7 However, there are still many post-operative complications associated with THA, with aseptic loosening and dislocation being two of the most common. 30,33 Although the overall dislocation rate has decreased over the past two decades, 15,26 a significant number of patients continue to experience recurrent episodes. Such recurrent dislocations, defined as two or more occurrences, 10 occurred in over 60% of patients at a minimum follow-up of 1 year after the first dislocation 10,26 and over 50% of these patients required revision surgery. 10,26 It was reported that impingement is the major cause of restricted range of motion (ROM) and post-THA dislocation. 16,28 The risk factors that are associated with impingement include design of implants, and their orientations and alignments, and the surgical approaches. 4,10,19,31,33 Additionally, patient related factors such as gender, advanced age, history of previous hip surgery, pelvic tilt and bony structures around the hip increase the risk of impingement and subsequently recurrent dislocation. 8,10,11,33 Bartz et al. 1 classified dislocation mechanisms into three categories based on impingement type as follows: (a) prosthetic impingement (PI) which occurs when the prosthetic femoral neck comes in contact with the rim of the liner/cup, (b) bone-to-bone impingement (BTBI) which is the impingement between the osseous femur and the osseous pelvis, and (c) spontaneous dislocation. Although the factors which are associated with spontaneous dislocation are not fully identified, it is presumed that the soft tissue imbalance, weakness of the muscle, or/and contracture of the hip joint might increase its risk. 33 Other than these three types, there is a possibility of implant-tobone impingement (ITBI) which occurs when the prosthetic femoral stem comes in contact with pelvis or the bony femur comes into contact with the rim of the liner/cup. PI is associated with the acetabular and femoral implants only and has a known set of variables such as implant design and their positions and orientations on native bone geometries. Therefore, PI could be controlled with these known variables using a numerical simulation model to find optimal implant positions 23,27 or to select the optimal design (e.g., larger size of femoral head). 3,14 BTBI, on the other hand, generally differs amongst subjects. It mainly depends on the bony structures around the hip along with the level of osteotomy, and the prosthetic geometries and their orientations (e.g., femoral offset and version etc.). 31,33 It occurs due to unintended contact between femoral bones (e.g., greater trochanter, lesser trochanter, femoral neck) and acetabular margin (which is called ''limbus acetabuli''), ilium or ischium (the anterior superior iliac spines is part of the ilium). 11,32,35 ITBI could be partially controlled by changing implant designs and their positions and orientations. Therefore, it is usually recommended to recreate genuine bone morphology by resecting osteophytes completely during THA to avoid post-THA BTBI and ITBI. 14,21,31,33 However, the risk assessment of post-THA BTBI and ITBI is mostly carried out intra-operatively by the surgeons based on their anatomical knowledge in recognising the difference between ''genuine'' and ''osteophytic'' bone. Therefore, it depends on the surgeons' experiences, and intuitive anatomical reasoning, which are subjective and qualitative in nature. As a result, despite using recommended implant positioning along with resecting the bony prominence and osteophytes, post-THA complications related to impingement still occur for some cases, especially in patients with larger bony prominence. 33 Pre-operative surgical planning is routine practice before THA, with some systems incorporating a computer simulation to predict optimal implant orientations and to explore post-THA hip joint ROM. 9,22,23,27,30,34,36 However, the majority of the studies explored only the effect of implant design and position on PI. 23,27,34,36 There are limited studies in the literature focusing on only BTBI, 9,12,25,33 which mainly explored the effect of implant design and positions, bone morphology and hip joint ROM on BTBI. However, to the best of the authors' knowledge, pre-operative identification of subject-specific bony impingement (BI) areas which should be resected to avoid post-THA BTBI and ITBI for a given implant design and position has not previously been reported in the literature.
Therefore, the aim of the paper was to develop a method for identifying subject-specific post-THA BTBI and ITBI areas, and subsequently visualise the impingement area on native bone anatomy. This novel visualisation representation could guide surgeons in deciding how much and from where the bony areas should be resected during THA to avoid bony impingement (BI) (i.e., both BTBI and ITBI) for particular implants and their given positions and orientations. The paper is structured as follows. A detailed description of the conceptual novelty followed by the implementation of the proposed method are included in the first part of materials and methods. Thereafter, a case study and a clinical study are included to describe the various features and validation of the method respectively. The rest of the paper describes the results followed by discussion.

Conceptual Novelty: Identification and Visualisation of the BI Area
The proposed method is based on the following assumption that only the BTBI or ITBI which occurs before the PI is critical and these bony areas should be identified so that they could be resected during THA (Fig. 1). If these bony areas are resected, BTBI or ITBI can then only occur if the hip moves beyond the point of PI. However, this additional hip movement will be generally restricted by PI. Therefore, the first objective was to find the maximum clearance between stem and liner to avoid PI for a particular posture (Fig. 1). This clearance angle could be described as 'Conical Clearance Angle' (CCA) associated with that particular posture (Fig. 1). The next step was to find the bony impingement (BI) area which would occur within the CAA POS 1 or CAA POS 2 for posture POS 1 and POS 2 respectively. The chances of BI was ranked based on its occurrence within the range of CAA POS i (i = 1, 2). The highest risk area was defined as any BI that would occur within the first 25% of CAA POS i (position 1 in Fig. 1), and this area was highlighted with red (Fig 1a). Similarly, 50, 75 and 100% of CAA POS i (i = 1, 2) were shown by positions 2, 3, and 4 respectively (Fig. 1). The corresponding BI areas were highlighted with different colours (yellow, green and blue respectively). Similar operations would be performed for different postures (Figs. 1a and 1b). It could be observed that for POS 1 , chances of BI were high as it occurred within 25% of CAA POS 1 (Fig. 1a) whereas chances of BI for POS 2 (Fig. 1b) was much less as it occurred in between 76 and 100% of CAA POS 2 .

Inputs
The inputs, required for the proposed method, were broadly classified into two groups (Fig. 2). Input Type-I included both prosthetic implants with planned positions and native bone geometries. Therefore, Input Type-I was associated with the THA planning, and the following steps were performed to attain it: (a) CT scanning of a patient requiring THA surgery, (b) construction of subject-specific bone geometries from CT scans, (c) identification of bony landmarks by experienced engineers/surgeons, (d) CAD model of planned implants to be used for THA, and (e) planned implant positioning (e.g., cup/liner inclination and anteversion angle, stem offset etc.) onto the native bone structure. After all the aforementioned steps, the native bone geometries with planned implants, were used as Input Type I. In this work, STL file format with triangular mesh was used to represent both implants and bony structures. On the other hand, Input Type-II dealt with the hip joint motion under consideration. This hip motion could be either measured ADLs using gait analysis methods (i.e., through the use of video motion capture or inertial measurement sensors (IMUs), or generalised hypothetical activities from the literature such as pure/combined hip joint motion. Using these inputs, subject-specific BTBI and ITBI areas were identified as detailed below. Postures' was associated with the hip joint motion under consideration which was discretised into a number of user defined postures (N POS ) with a resolution of Dt POS . For example, flexion up to 90°could be discretized with N POS = 4 and Dt POS = 30°so that the femur flexion could be represented with four postures by varying counter I POS such that POS i = 0°, 30°, 60°, 90°for I POS = 1, 2, 3 and 4 respectively (Fig. 3a). For each posture, a hypothetical conical motion of femur was constructed where the axis of this conical motion was the femur axis at this particular posture. Within the same posture, and therefore, using the same conical axis, various conical motions were created by varying its aperture angle (a) to check the degree of clearance between stem/neck and the liner to avoid PI. The limiting/maximum aperture angle (a) of the conical motion, which would avoid PI, was hypothesized as a 'Conical Clearance Angle' (CCA). The increment in a to find CCA was governed by 'Loop2: Aperture Angle' where N a was the user-defined number of discretised a with a resolution of Dt a . Therefore, varying a J was calculated as Dt a *(J a 2 1) where J a was the counter of the loop. For example, if Dt a = 1°, a J value would increase by 1°with increase of counter J a . Similarly, if Dt a = 5°, a J value would increase by 5°with single increment of counter J a . The conical motion of femur with a particular a J was discretized with N CON number of positions with a resolution of Dt CON where CON k (CON K = Dt CON * K CON ) represented each position of femur during this conical motion and K CON was a counter of the loop (Fig. 2). Figure 3a shows that the conical motion is discretized with N CON = 8 static positions. For each of the CON k position, PI was checked. If there was PI, the associated a J value was considered as the CAA POS i for that particular posture (POS i ). Subsequently, the execution of Loop3 and Loop2 were terminated and Loop1 started with each next posture (POS i ). If there was no PI occurring even after completing Loop3 and then Loop2, the CAA POS i for that posture was considered as the user-defined maximum a J value, that is Dt a * (N a 2 1). PI was checked by using Matlab function 'fastMesh2Mesh' 29 which was developed based on Mo¨ller-Trumbore's (MT) 'ray triangle intersection' (RTI) algorithm. 17 Therefore, STEP 1 ended when Loop 1 ended and posture specific CAA POS i for all the postures were determined.

STEP 2: Determine BI Areas
The objective of the step was to identify and determine the BI area which would occur within the CAA POS i , determined from the last step. For visualisation purposes, each CAA POS i was divided into four categories to rank the potential chances of BI as follows: (I) 100%, (II) 75%, (III) 50% and (IV) 25% of CAA POS i where 100 and 25% represented the lowest and the highest risk area respectively (Fig. 1). For each posture, BI was checked for each category of CAA POS i . Therefore, the highest risk area would be associated with the BI area if it occurred within the 25% of CAA POS i . Similarly, the risk would be gradually reduced if BI occurred within 50, 75 and 100% of CAA POS i . In terms of visual representation, BI areas were presented with user-specific colours. In this work, red, yellow, green and blue depicted 25, 50, 75 and 100% of CAA POS i , and thus representing from higher to lower chance of BI occurrence (Fig. 1). This step was also governed by three loops (Figs. 2 and 3b). In 'Loop1: CCA', CC JCCA stored the colour code (i.e., red, yellow, green and blue) for each CCA category. 'Loop2: Posture' executed different postures that were obtained by discretised hip joint motion under consideration, which was exactly the same posture generated in STEP1-'Loop1: Postures'. For each posture, posture specific CCAs categories were obtained for (CCA J = (J CCA /4) * CAA POS i ). 'Loop3: Conical Motion' performed the conical movement similar to the STEP1. For each CCA category, each posture, and each conical motion position, BI was checked and identified (if any), and depicted using three following sub-steps (Fig. 4). For each position of the conical motion, intersection between two geometrical structures was calculated (Fig. 4). Femur and pelvis geometries were used for BTBI whereas stem/neck and pelvis geometries were used for ITBI. Mo¨ller-Trumbore (MT) 'ray triangle intersection' (RTI) algorithm 17 was used to find the intersection boundary points between two STL geometries with triangular mesh. In this work, the Matlab function 'fastMesh2Mesh', developed by Thomas Seers based on Mo¨ller-Trumbore algorithm, was used for calculating the intersections boundary points. 29 The output (intersection points) from this Matlab function were compared with the intersection points, calculated by Mimics 3-matic software when used same STL geometries. It was observed that both the output are similar, and therefore, the Matlab function was used thereafter for the ease of automation.

STEP 2B: Determine BTBI and ITBI Area
This step included a region growing algorithm (RGA) which was originally developed by Franciosa and Gerbino 6 for planar and cylindrical features recognition in a CAD-based application. This RGA was further used in ventricular geometry to assign fibre orienation. 20,24 In this work, RGA was used to automatically calculate the surface area confined within this BI boundary, identified in the last step. The RGA was carried out by proliferating the 'child' triangles around the 'seed' ones. A triangle was defined as a 'seed' triangle if all three of its vertices belonged to the same cluster (Fig. 5). On the other hand, a triangle was termed 'child' if it followed two conditions: (a) the triangle was itself a 'seed' triangle, and (b) it had a common (sharing) edge with a neighbouring 'seed' triangle of the same cluster (Fig. 5). Figure 5 represents a typical propagation mechanism associated with RGA where the squared area, enclosed by thick black lines, could be thought as a BI boundary. The RGA started with a random triangle which was considered as the first 'seed' triangle and associated with the first cluster. The 'child' triangles around a 'seed' triangle were then identified, and thus, the region growing started. In the next step, the identified 'child' triangles were considered as 'seed' triangles, and old 'seed' triangles ('seed triangles in the previous step) were defined as 'allocated' triangles within the same cluster (Fig. 5). Subsequently, new 'child' triangles were identified around the new 'seed' triangles, and this process continued until there was no 'child' triangle (un-allocated triangles) available to be assigned within the same cluster. As a result, the region was grown around a 'seed' triangle confined within a closed boundary, and stopped automatically near to the edge of the boundary (in this case, BI boundary) (Fig. 5). The vertices of triangles at boundary edges were shared between two different clusters (regions), and therefore, these triangles were not considered as 'seed' as all three vertices were not within a same cluster/region (Fig. 5). Therefore, the region identified using RGA within BI boundary would be a little smaller than the actual area (Fig. 5). However, the differences would be negligible if small triangular mesh is used to construct the bony geometries. The entire RGA stopped when there was no 'seed' triangle available in the entire geometry, i.e., there was no new cluster to be created. After applying RGA, the entire geometry (femur or pelvis) was clustered into two areas: (a) impinged areas, and (b) nonimpinged areas. The impinged triangular face ids (ITFs) were recorded, and stored for future use. The same operation was carried out separately for BTBI and ITBI analysis.

STEP 2C: Assign Colours to BTBI and ITBI Area
At the beginning of the STEP 2, all the triangular faces of the femur and pelvis were assigned with a user defined 'non-impinged colour' (e.g., grey), that differed from the four colours used for BI area representation. After STEP 2B, BI area was identified, and ITFs were recorded (Fig. 4). A user defined colour (CC JCCA ) was then assigned to these ITFs whereas the rest of the triangular faces remained with 'non-impinged colour' (grey) (Fig. 4). This user defined colour (CC JCCA ) was associated with the CCA classification, which was categorised to rank the chances of BI. This process was carried out separately for BTBI and ITBI analysis. For ITBI analysis, the entire stem geometry was used to check for impingement. However impingement is only expected around the neck of the stem. This is due to a large percentage of the stem being located within the femoral canal, i.e., covered by the bone and hence would not come into contact with the pelvis. Therefore, some of the ITFs, which was predicted due to the collision of this region of stem to pelvis, would be infeasible. These ITFs were identified by checking the common ITFs from both BTBI and ITBI analysis. The colour of these common ITFs were changed to 'a 'nonimpinged colour' (grey) only for ITBI representation.

Outputs
After STEP 2, BI areas of the pelvis and femur were identified through ITFs with a CCA specific colour. These BI areas were represented in three styles. The ITBI information was presented only by showing the colour map on the pelvis, whereas BTBI areas were shown both on the pelvis and the femur. The last option was to combine both ITBI and BTBI together.

Case Study
The surgical plans for a right hip joint was used to demonstrate the various features of the proposed method. Input Type I for the method (Fig. 2) was provided by experienced engineers at Corin Ltd, who provide a THR planning service for orthopaedic surgeons. This retrospective analysis of the data from Corin was approved by Bellberry Human Research Ethics Committee (BHREC)-study number 2012-03-710 and Biomedical & Scientific Research Ethics Committee (BSREC) in Warwick University (study reference REGO-2018-2229). The acetabular components positions were defined by radiographic inclination and anteversion angles, as defined by Murray, 18 which were within the safe zone. 13 For Input Type II, four hypothetical activities 23 were used (Table 1). These activities were typically performed during surgery to check for potential impingement.

Clinical Study and Validation of the Method
In order to validate the method, the data of the patients, who had previously undergone a THA without the help of the proposed method, was used in this study. The anonymised data, provided by Corin Ltd, was approved by BHREC (2012-03-710) and the retrospective study was approved by BSREC (REGO-2018-2229). Five anonymised patients were selected based on the criteria that there had been no postoperative episodes of hip dislocation, with a follow up of at least 2 years. It was therefore assumed that the cases did not experience PI or BI post-operatively and hence, the bony areas, which were resected intraoperatively could be used as a benchmark for comparison. Table 2 summarises the patient characteristics and related intraoperative data.
3D models of the used implants and their positions within the native bone geometries, as implemented during surgery, were used as Input Type I. This information was extracted from the post-operative CT scan by dedicated experienced engineers in Corin Ltd. For Input Type II, four hypothetical activities were selected (Table 1). Both pre-operative (Pre-Op) and post-operative (Post-Op) geometries of the pelvis and femur were used for the prediction of both the ITBI and BTBI area. As some of the areas in the Post-Op geometry was already resected during surgery, it would be expected that the ITBI and BTBI area, predicted using Pre-Op geometries would be much higher than the ITBI and BTBI area identified from Post-Op geometries. For numerical representation, the reductions in coloured surface areas (red, yellow, green and blue) from Pre-Op to Post-Op geometry were calculated for ITBI and BTBI cases. The higher the reduc-tion percentage (best is 100% reduction), the better the prediction from the method. Therefore, the study hypothesis was-'At least the red impingement area (i.e., 25% of CAA POS i which was the most critical area) should have been resected, and therefore, this area (entirely or partially) should not exist in Post-Op geometries'.

Case Study
There were three representation type-(a) ITBI where only pelvis geometry was used (Fig. 6a), (b) BTBI where both pelvis and femur geometries were used (Figs. 6b and 6d), and (c) combined, i.e., both ITBI and BTBI presented together on pelvis and femur (Figs. 6c and 6d). From the results, it was observed that the ITBI area was near to the acetabulum that was generally resected during surgery. On the other hand, the location of the predicted BTBI area was not quite common from where the resection was generally done. The combined plot included both ITBI and BTBI information, and could be used in surgical planning without getting into details of type of BI. It should be noted that the bony areas could be resected either from the pelvis or femur to avoid BTBI, although surgeons generally prefer to resect osteophyte bone from pelvis.
The red areas (Fig. 6) depicted the highest risk area as this would occur only within 25% of the PI clearance (CAA POS i ). This area should be resected during surgery if these planned implant positions (cup positions and stem offset etc.) would be actually realised. On the other hand, the minimum risk area was depicted by blue areas where the BI would occur beyond 75% and above PI clearance. The yellow and green zone highlighted the BI area due to 26-50% and 51-75% of PI clearance respectively. This coloured rep-

BIOMEDICAL ENGINEERING SOCIETY
resentation could be easily comprehended by the surgeons before making their decision of bony resection. Figure 6e represented the distribution of CCA associated with the various postures. This was the output from STEP1 of the method.

Clinical Study and Validation of the Method
The ITBI area was calculated using both Pre-Op and Post-Op pelvis (Fig. 7a). It was observed that the red and yellow area was reduced considerably in the Post-Op pelvis compared to Pre-Op geometry, which suggested that those area were mainly resected by the surgeons during surgery. A more detailed observation was made through Fig. 7b where the location of the coloured points, which represented the predicted ITBI area using Pre-Op pelvis (Fig. 7a), were compared with the Post-Op pelvis. It was observed that the majority of the red and the yellow points were located outside of the pelvis geometry. This confirmed that these areas were resected during surgery. On the other hand, the green and the blue points were partially located on the pelvis, and therefore, these areas were partially resected. The coloured points within the black boxes (Fig. 7b) were still located on pelvis. It showed that these areas were not resected.
The reduction in surface area from Pre-Op to Post-Op geometry for each coloured zone was calculated (Fig. 8) to compare the prediction of the proposed method with respect to the actual resection done intraoperatively by the surgeons. In case of ITBI (Fig. 8a), it was observed that the red area (highest risk zone) for three subjects were 100% removed, and for other two subjects, major areas were (87% and 68%) resected. This agreed well with the study hypothesis. Furthermore, yellow areas for one subject were 100% removed, whereas major areas were (79% and 75%) resected for two subjects. However, for the remaining subjects, the reduction was not considerable (only 33.6% and 36%). The reductions in green and blue areas, where the chances of impingement were very low, were less than 50% for all subjects except for subject 1 (for both green and blue) and subject 2 (blue only). For the case of BTBI, there was no strong evidence of reduction of any of the coloured areas from Pre-Op to Post-Op geometry as the reduction per-centages were quite low (less than 30%) (Fig. 8b). The minor negative reductions (Fig. 8) depicted that there were additional areas which were not present in the Pre-Op geometry. This could be due to segmentation and alignment errors, as discussed in detail in discussion section.

DISCUSSION
BI is one of the major causes of a constrained hip joint motion and recurrent dislocation after THA. The current practise of BI risk assessment is performed intraoperatively by surgeons based on their expertise knowledge and experience, which sometimes lead to suboptimal surgical outcome. This paper introduced a novel method to identify and visualise both ITBI and BTBI area on native bone geometry for different hip joint motion under consideration. In addition, the chances of BI was ranked, and represented with different coloured areas on pelvis and femur. This coloured representation of BI areas could be used as a guideline to pre-plan the surgery in order to decide how much and from where the bony resection should be performed to avoid post-THA BI for a particular implants and their given positions. The proposed method has various features that might be modified according to the user's requirement as follows. Firstly, the possibility of BI was grouped into four categories, which was further represented by four different colours. However, this was entirely user specific. The user could use any colour and any number of categorisa-  tions based on their requirements. Besides, it could also be possible to inform which activity causes redcoloured BI site through different shade of red colours or simply by using a list of such activities. Secondly, the box plot of CCA provided the information about PI. If there is a PI for zero CCA, it means that there is a PI due to the hip joint motion itself. Therefore, BI representation with a box-plot of CCA would provide both BI and PI information for a subject with given implant positions. Thirdly, the BI area could be represented either by ITBI or BTBI (for detailed analysis) or combining both (for easier interpretation). Any bony resection either from the pelvis or the femur would help to avoid BI. Although it is not common to perform resection from femur, the surgeons would get additional information which they might use in future where resection from the pelvis wouldn't be feasible or complicated. Fourthly, bony resection may not always be desirable or feasible, and therefore, corrective strategies may need to be considered to reduce the BI area, such as using different implant combinations, positions and offset etc. The proposed method in the paper could be used to re-evaluate the effect of any such implant changes on the BI area. The corrective actions such as change in leg length or medio-lateral offset or the type of implants are the part of surgical planning, and therefore, any such corrective actions would be conveyed through the implant geometries and positions which are nothing but Input Type I of the method. Therefore, the surgeons can plan for various (three or four or more) sets of corrective actions and run the simulation for each set of corrective actions. Subsequently, the results could be compared in terms of bony resection needs to be performed. If any of the corrective action shows that the amount of bony resection is less and also feasible, the surgeons could finalise the corrective actions provided this would not compromise with other biomechanical issues such as stability of the joint or edge loading etc. which this method does not consider. Fifthly, the resolutions of discretizing activity (Dt POS ), aperture angle (Dt a ) and conical motion (Dt CON ) were important factors. Higher resolution would provide accurate results with higher computation expenses. However, there would be some redundant postures or positions for higher resolution that would not alter the final BI area. On the other hand, increasing the value of Dt POS and Dt CON could underestimate the BI area. Therefore, a trade-off value should be elected so that an accurate BI area could be identified with reasonable computational time. For the case study in the paper, i.e., four hip motions with Dt POS = 5°, Dta = 1°, and Dt CON = 10°, it generally took 5 to 6 h to generate the interference map from Input Type I and II in a computer with 64 GB RAM, and 8 core Intel Xeon E3-1535 M v6 (3.10 GHz) processor. CT scanning and preparation of Input Type I required approximately 1 to 2 h of additional time. Therefore, it would take generally 6 to 8 h from CT scan to colour map generation. However, the entire process is still not optimised, and therefore, there is a potential to reduce the overall time below 5 h. Most importantly, as these would be generally carried out in planning stage of the THA, 6 to 8 h would still not be very critical, and would not cause any unnecessary delays in surgery.
Sixthly, although the proposed method was originally developed for checking post-operative BTBI and ITBI for a given implant position and orientation, this The validation was performed by checking the reduction percentage of coloured surface area from Pre-Op to Post-Op geometries. However, it should be noted that the reduction percentage not only included actual bony resection, but also involved alignment and segmentation errors. The Pre-OP and Post-Op CT scans were performed with at least 2 years gap and the developed geometries were in different coordinates. However, all the implant positions were defined with respect to Pre-Op geometry. Therefore, a best-fit alignment was performed (moving Post-Op geometry to Pre-Op location) so that the BI analysis could be carried out on Post-Op geometry using the implant positions which were originally defined with respect to Per-Op geometry. This best fit alignment introduced additional error in identifying BI area using Post-Op geometry. Besides, during Post-OP CT scans, the radiation bounced off the implants, and the resulting artefacts decreased the spatial resolution of the scanned bone geometry around the implant. As a result, the segmentation from the Post-Op CT scan was difficult due to the indistinct boundary of bone geometry. Also, various filters and smoothing algorithms were applied by radiology department prior to segmentation, which (b) Comparison through visual representation of bony areas which were resected during surgery (Post-Op) compared to the predicted ITBI area using Pre-Op geometry. The grey geometry is Post-Op pelvis. The coloured points are the point cloud of the ITBI area predicted through the method using Pre-Op geometry. The square box shows the points on the pelvis, i.e., these points were not resected during surgery. also led to differences in Pre-OP and Post-OP CT scans. As a result, the developed Pre-Op and Post-Op geometries were not exactly same where resection was not performed. For these reasons, reduction percentage in coloured surface area from Per-Op to Post-Op would be the combined results of (a) actual resection, (b) alignment error, (c) segmentation error, and (d) differences in CT scans. Therefore, the reduction percentage, which theoretically should only be due to surgical resection, might be over or under estimated. These scenarios explicitly observed when there was some negative reduction for both ITBI and BTBI analysis (Fig. 8). For this reason, a qualitative-numerical validation was carried out. Each reduction was checked visually to confirm whether the reduction is due to the actual bony resection. From the results, it was observed that the reduction in red area was near to 100%, and when checked visually, there was a little red area on Post-Op geometry. It was concluded the reduction was mostly due to resection. However, for the same reason, no conclusion could be drawn from green and blue areas of ITBI analysis and entire BTBI analysis. Specifically, the reduction percentage was very low for BTBI analysis and there was no strong visual confirmation as well. Therefore, it was undecided whether the 20 or 30% was due to the actual resection or some additional error mentioned above. The red areas due to BTBI were not resected as these areas were not so common for resection during surgery. However, the predicted ITBI and BITBI areas were due to same CAA. Therefore, resecting only ITBI area wouldn't avoid the BI entirely. If the hip joint motion reached to the range of CCA, there might not be any ITBI but there would be BTBI. Therefore, these uncommon BTBI areas should also be removed to avoid BI completely.
One of the limitation of the study was to use four hypothetical activities. These were defined based on the generalised ROM data from the literature due to unavailability of subject-specific data. However, the ROM, which could be produced due to other activities, were partially covered by the conical motion as it created additional ROM for hip joint. Secondly, there was no direct validation of the method. It is not possible at present to accurately and directly record femoral movements or the presence of BI simultaneously in real-time in patients. Our indirect validation, performed through the clinical study, produced results which are consistent with clinical experience. This paper presents a novel method to identify and visualise subject-specific ITBI and BTBI area on native bone geometries (femur and pelvis) for various hip joint motion under consideration. The method checks for a conical clearance for a set of postures during an activity to avoid PI, and subsequently, identity and visualise the BI area which would occur before PI. In addition, the BI area was ranked according to the chance of occurrence, and represented with different colour for improved understanding. This method could potentially be used to examine the effect of different pre-operative plans and hip motion on BI and partially on PI. In addition, this method would guide the surgeons to decide how much and where the bony resection should be performed during a THA surgery.

ACKNOWLEDGMENT
The study was funded by Corin.Ltd.

OPEN ACCESS
This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://crea tivecommons.org/licenses/by/4.0/.