1 Introduction

Total hip arthroplasty (or total hip replacement) is the current surgical solution for the treatment of advanced coxarthrosis, in which damaged cartilage and bone are replaced with prosthetic components. The intervention provides mobility and pain relief to patients (Ethgen et al. 2004). In addition to the clinical objectives of reducing pain, and improving the ambulation, mobility, and quality of life of the patient, at a technical level, the primary objective of total hip arthroplasty is the anatomical reconstruction of the hip joint, with the consequent favorable prosthetic joint load and function. From a mechanical point of view, the goals of total hip arthroplasty are to create a stable joint by optimizing mobility and restoring biomechanics in order to improve muscle efficiency and equalize the length of both lower extremities. To achieve these objectives, the surgeons can carry out preoperative planning, analyzing the affected hip and comparing it with the contralateral hip in previous radiological studies (Nikou et al. 1999).

The usual inclination of the acetabulum (abduction angle) is usually 40° to 45° with respect to the horizontal line of the pelvis, considering soft tissue and local anatomical landmarks, and anteversion is usually 15° to 20°. Furthermore, a safe zone to avoid hip dislocations has been defined with 40 ± 10° for the angle of abduction and 15 ± 10° for the angle of anteversion (Dargel et al. 2014). To date, the calculation of anteversion and abduction angles has been based on previous radiological studies, although navigation systems also exist (Digioia et al. 2000; Yamada et al. 2018).

With the traditional technique, no alignment guide is provided that can assist in drilling the acetabulum; there is only a guide to orient the cup after drilling. The final orientation depends on the position of the patient. The alignment guide does not allow changing the position of the patient with respect to the surgical bed, and the fact that the orientation of the patient may vary during the intervention must be taken into account. Vertical and horizontal alignment rods are attached to the alignment guide. Once assembled, the vertical rod must be perpendicular to the plane of the surgical bed in order to achieve between 40 and 45 degrees of inclination of the acetabulum. With the patient in lateral decubitus and the horizontal guide parallel to the floor, the guide must rotate until it is aligned with the patient's axis to achieve between 15 and 20 degrees of anteversion. With this alignment, the acetabulum will be centered and covered by bone.

The proper placement of the acetabulum is crucial for the survival of the implant and to avoid the dislocation or instability of the prosthesis and to improve friction between the different pairs of components (metal-polyethylene, polyethylene-ceramic, ceramic-ceramic, metal–metal). Misplacement of the acetabular component can result in ridge loading, dislocation, wear, ceramic squeaks, and polyethylene fracture. Several studies have focused on analyzing the erroneous placement of the acetabular component when using free-hand techniques, which can be from 30 to 75% (Saxler et al. 2004; Bosker et al. 2007; Callanan et al. 2011). Conversely, the proper placement of the implant restores the anatomy and biomechanics of the hip and facilitates fixation, range of movement, and resistance to dislocation. The risks of dislocation, loosening, impingement, ridge loading, and limb length discrepancy are minimized, thereby reducing the rate of implant wear and revision (D’Lima et al. 2000; Yamaguchi et al. 2000). Therefore, this type of surgery requires precise placement of the acetabular component.

Older people are particularly vulnerable to hip fracture, and this health problem is increasing every year around the world (Ahangar et al. 2019). In 1950, 1.66 million people had this problem. This number is predicted to have tripled or quadrupled to approximately 6.26 million people worldwide by 2050 (Sullivan et al. 2016). Other forecasts indicate that the annual demand for total hip arthroplasty in the US will grow to 635,000 procedures by 2030 (Sloan et al. 2018), and that total hip arthroplasty will increase by 276% in Australia by 2030 (Ackerman et al. 2019).

Experience with total hip arthroplasty has resulted in a more comprehensive understanding of hip anatomy and biomechanics, and there have been various advances in surgical techniques. These advances have made the development of more efficient instrumentation possible, including the development of navigation systems (Digioia et al. 2000; Yamada et al. 2018), and increasingly sophisticated implant designs (Abdelaal et al. 2019). Thanks to these advances, long-term studies have shown implant survival at 10 years to be up to 95%, at 15 years up to 84%, and at 20 years up to 70% (Mei et al. 2019).

Today, there are systems that offer intraoperative support or assistance, such as navigation systems (Digioia et al. 2000; Yamada et al. 2018) or robotics systems (Sugano 2013; Nodzo et al. 2018), which use a screen that is located to one side of the operating area as the main interface. This means that the surgeons must divide their attention between the operating field and the screen. Augmented reality (AR) or mixed reality (MR) technologies help the surgeons focus their attention on the patient by superimposing feedback information directly into the field of view, improving operating room ergonomics (Lei et al. 2019).

To help the surgeons focus their attention on the patient, a good option is to use mixed reality technology, superimposing helpful information directly in their field of view. An ideal headset is HoloLens 2, Microsoft's current mixed reality headset. It is an autonomous headset, which does not need to be connected to another device for its operation. It incorporates recognition of gestures with hands, gaze, and voice. The projection of digital objects is carried out on the real world and the users have a sensation of depth in both the real world (they are seeing the real world with their own eyes) and with digital objects.

A MR application for total hip arthroplasty is presented in this work. Our objective is to design, develop, and validate a MR application for total hip arthroplasty. For validation, the values of the abduction and anteversion angles offered by the application in 20 acetabular cup placements have been compared with real values (ground-truth). The main hypothesis of this work is that the MR application offers an error of less than two degrees with respect to the angles of abduction and anteversion.

The paper is organized as follows. Section 2 presents the state of the art. Section 3 focuses on the design and development of the MR application and also describes it. Section 4 describes the procedure used for validation in detail and presents the results. It also describes the study performed on a cadaver. Section 5 discusses this work and the results. Finally, Sect. 6 presents the conclusions.

2 Related work

One possibility when planning surgery is to use preoperative CT (Computer Tomography) imaging to estimate the orientation of the acetabular component and to predict the appropriate size of the implant cup (Nikou et al. 1999). Another possibility is CT-based navigation used intraoperatively, in which external optical navigation systems can be used to estimate the relative position of the implant with respect to the patient's anatomy during the intervention. Patient tracking can be performed using fiducials that are drilled into the patient's bones. The registration of preoperative CT data for the patient during the procedure is achieved manually by touching anatomical landmarks on the patient's surface with a tracking tool (Digioia et al. 2000). To match the homologous points, the surface of the pelvis can also be sampled and compared with the segmentation of the pelvis in the CT data (Leenders et al. 2002). Other computer-assisted systems integrate intraoperative fluoroscopy to guide the placement of the acetabular component (Bhandari et al. 2009).

Robotic systems have also been used for implant placement (Sugano 2013). In these types of systems, pins can be implanted into the patient's femur prior to performing a preoperative CT scan. To eliminate the need for preoperative fiduciary implantation, registration can be accomplished by selecting multiple points on the bone surface using a tracker and matching them with the patient's CT data (Nakamura et al. 2009). In a study involving 97 robotic-assisted total hip arthroplasties, the authors showed performance similar to the conventional technique (Schulz et al. 2007). In complicated procedures, 3D printing technology has also been used to build a 3D solid model that represents the dysfunctional bone structure so that surgeons can better plan the procedure (Xiong et al. 2019).

All of these solutions work well, but they require preoperative image acquisition of the patient. Some require intraoperative recording of the patient (increasing the radiation exposure), and all of them involve an increase in the cost and time of surgery (Sugano 2013).

Systems that use augmented or mixed reality for total hip arthroplasty have recently been presented (Fotouhi et al. 2018; Lei et al. 2019). Fotouhi et al. (2018) presented an intraoperative planning system based on two C-arm X-ray images that were combined with 3D augmented reality to help in impactor and cup placement. The clinical workflow can be summarized as follows. The size of the acetabular implant was identified by the size of the milling cutter after dislocating the femoral head. Two X-ray images were acquired from two different perspectives. A RGBD camera was placed on the C-arm, and a visual marker was placed on the surgical bed. The relative poses of the C-arm were obtained by using the RGBD camera and the visual marker. Based on these two simultaneous X-ray stereo images, the surgeons planned the position of the cup intraoperatively. The planned cup pose and impactor were estimated relative to the RGBD camera. For AR tracking, Fotouhi et al. (2018) used ARToolKit. The surgeons viewed the real scene augmented with the virtual information. The authors conducted a study involving four surgeons, and the errors in translation, anteversion, and abduction were 1.98 mm, 1.10 degrees, and 0.53 degrees, respectively.

Lei et al. (2019) presented a case of a 59-year-old man who underwent a complicated total left hip arthroplasty using a combination of MRI and 3D printing. CT and MRI were acquired before surgery. These images were imported into a computer for the surgical plan (using different colors for different structures). These images were also used for a 3D printing reference registration instrument. During the intervention, the reference registration instrument was attached to the selected bony landmark. The surgeon was wearing a headset (HoloLens). The reference registration instrument was used to establish the coordinate system of the application, and the anatomical structures were visualized on the patient himself. The difference in angles between the preoperative design and the postoperative examination were as follows. In the preoperative design, the anteversion angle was 25 degrees and the abduction angle was 40 degrees. In the postoperative examination, the anteversion angle was 30.67 degrees and the abduction angle was 43.16 degrees.

HoloLens has also been used for other medical purposes such as: intraoperative guidance of percutaneous nephrolithotomy (Wang et al. 2022), transforaminal percutaneous endoscopic lumbar discectomy (Liu et al. 2021), laparoscopic cholecystectomy (Kitagawa et al. 2022), and generally for search for blood vessels, visualizing medical data, and support for precise positioning of mechanical elements (Vávra et al. 2017). Furthermore, HoloLens has also been used for medical learning purposes such as: human gross anatomy to first-year osteopathic medical students (Richards 2023), and training of extracorporeal membrane oxygenation cannulation (Wolf et al. 2021).

All these works demonstrate the potential of HoloLens in medical practice, and, in this work, we propose a new application to help in total hip arthroplasty.

3 Design, development and description of the MR application

3.1 Design and development

This subsection describes our design decisions, the solutions, and the software and hardware selected. Our objective was to design a MR application for total hip arthroplasty that is functional and effective. The first step was the analysis of the main ergonomic and functional characteristics. The surgeons must be able to visualize the help information in their field of view, without looking away from the intervention. Surgeons must have freedom of movement, and the headsets they have to wear have to be as ergonomic as possible. For the interaction, the surgeons must not touch anything with their hands. The interaction must be as natural and intuitive as possible. The application must work in any environment, and no additional elements should have to be added to the real world. The application must show a digital acetabular cup that the surgeons must be able to adjust to the patient's anatomy, as well as its diameter. The application must also show a holographic guide overlaying the surgeons’ field of view for drilling the point of interest in the acetabulum. The surgeons must have the cleanest possible field of view with the necessary information in order to place the acetabular cup and to help guide them in a natural and intuitive way.

With these characteristics as a base, we made several decisions. We reviewed the headsets that are available on the market, and the HoloLens 2 was identified as the headset that met all of the identified requirements. It is an autonomous headset, it allows freedom of movement for the user, the interaction is by gestures, by gaze, or by voice, it superimposes the virtual elements on the users’ field of view, and the users do not lose contact with reality because they are seeing the real world with their own eyes.

Another decision to make was to determine what kind of interaction to include. Two alternatives were studied: gestures and voice. The surgeon has to select 3D objects from one place in the real world and drag and drop them to another 3D position in the real world. The gestural interaction that is included in HoloLens 2 makes this process natural and intuitive. On the other hand, using voice so that the surgeons can indicate the element to select and indicate the exact position to which they want to move would not be natural or intuitive. There would also be the problems involved in having voice recognition with several people in the operating room. The gestural interaction was selected for all these reasons. The gestures to be used should be as natural and intuitive as possible. For this reason, the index finger and thumb are mainly used. These are the most visible and distinctive fingers when the hand is placed in the user's field of view. The index finger is the one that is usually used to press buttons with a single finger, and it is normal to close the other fingers. The pinch gesture with the index finger and thumb is used to drag and drop elements.

For the main functionality of the application, the position of the patient and the acetabulum must be calibrated. Different options were studied for the calibration of the patient, and the choice was to use the surgical bed as the reference system. For this purpose, two anchors are placed at the ends of the surgical bed on the same side. For the calibration of the acetabulum, in order for the application to be familiar to the surgeons, the same terminology and similar process as surgeons use in a traditional intervention are used (e.g., abduction and anteversion angles). The help elements to be included should be as clear and intuitive as possible. In this process, the acetabulum cup must be placed and its diameter established, and the abduction and anteversion angles of the guide must be identified for drilling the real acetabulum. A 3D object that fits very well in the acetabulum is a hemisphere. The surgeons will be able to drag the hemisphere directly. It must be kept in mind that the hemisphere may be out of reach or difficult to manipulate because it is inside the patient. To solve this problem, a "twin" sphere is added, which is placed on top of the hemisphere. Once the hemisphere is positioned in the actual acetabulum, the exact position will be refined using buttons on a menu that use one millimeter intervals. The diameter of the acetabulum will be defined using buttons on a menu. To define the abduction and anteversion angles of the guide, the surgeons could move the guide manually by dragging the hemisphere or use buttons on a menu. In order for the surgeons to have the cleanest possible field of view, the menus must be able to be moved and anchored in the desired position. It must also be possible to select the visible and invisible elements during the intervention.

Mixed Reality Toolkit (MRTK) was used for the development of the MR application. MRTK is the SDK provided by Microsoft for developing applications for HoloLens (https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/). MRTK can be integrated into Unity (https://unity.com) or Unreal (https://www.unrealengine.com) engines. Both engines support the same features (device/display tracking, hand input, eye input, etc.). Unity and Unreal both support Azure Spatial Anchors, but only Unity supports Azure Object Anchors and Azure Remote Rendering. Azure Object Anchors is a mixed reality service that helps create rich and immersive experiences by automatically aligning 3D content with physical objects. Of the two features not supported in Unreal, the support for Azure Object Anchors was considered to be important. This and the fact that the group had previously worked with Unity engine led us to choose Unity as the engine for the developments. For this application, we used Unity 2020.3.13f1, Mixed Reality Toolkit Foundation 2.7.2, Mixed Reality Toolkit Standard Assets 2.7.2, and Mixed Reality OpenXR Plugin 1.0.0. The Microsoft HoloLens 2 headset was used for development and validation (https://www.microsoft.com/en-us/hololens/).

The application was developed from this design and can work in any indoor environment. The application works with gestural interaction. The surgeons only have to calibrate the patient and the acetabular cup in order to have help information during the intervention. The interface can be customized to the surgeon's desire.

3.2 Description of the application

Our application is an assistance system for a total hip arthroplasty procedure and uses the HoloLens 2 headset. After calibrating the application, the surgeons will have a holographic guide and an acetabular cup overlaying their field of view. The surgeons will place the acetabular cup and select its diameter. The guide will allow the surgeons to maintain precision when drilling the point of interest and when inserting the desired prosthesis. First, the application must be calibrated, and then the surgeons can proceed to the intervention. These two modalities are homogeneous in the application and are distinguished only by the visibility of the calibration tools. The surgeons can toggle between the two modes.

To access the different modalities of the application, the surgeons have a floating menu that follows them wherever they go as long as the menu is not anchored. This menu will remain below the surgeons' field of view, so they will have to look down to access it. The main menu has five selectable buttons: (1) Instructions, which shows a window explaining the steps required to use the application; (2) Calibrate ACETABULUM, which toggles the visibility of the acetabulum calibration tools; (3) Calibrate PATIENT, which toggles the visibility of the patient calibration tools; (4) Settings, which toggles the visibility of the interface configuration menu; and (5) Anchor button, which allows the menu to be anchored so that it stays on the site. The surgeons can also pinch and drag the menu (blue panel) with their fingers to place the menu in the desired position.

3.2.1 Calibration mode

The calibration process is divided into two parts: the calibration of the patient, and the calibration of the acetabulum. Figure 1 shows a general scheme of the functionality of the application. The patient must be calibrated first in order to obtain the correct measurements during the acetabulum calibration. First, for the HoloLens 2 to be able to recognize the environment and use it in the application, the surgeon must navigate the environment while wearing the headset. Afterwards, the surgeon can proceed to calibrate the patient. The patient’s calibration consists of determining the orientation of the surgical bed, thus defining the longitudinal axis and the coronal plane of the patient. To do this, two ends of the surgical bed are chosen, one at the head (green) and one at the feet (red), and they are defined in the application by pinching and dragging two corresponding cylindrical markers by hand. Figure 2 shows an image in which a sawbone-type pelvis (phantom) is attached to the surgical bed in an operating room and the cylindrical markers used to calibrate the patient. The placement of the cylindrical markers does not have to correspond to the exact location of the head and feet. The green cylindrical marker has to be placed closer to the head and the red one placed closer to the feet. The distance between the markers is not relevant. Only the coordinate system defined by them matters.

Fig. 1
figure 1

Scheme of the functionality of the application

Fig. 2
figure 2

Image showing a sawbone pelvis on the surgical bed in the operating room and two cylindrical markers used to calibrate the patient. The green cylindrical marker corresponds to the head and the red cylindrical marker corresponds to the feet

Once the patient has been calibrated, the next step is to calibrate the acetabulum and the final holographic guide. The calibration of the acetabulum consists of the following steps which will be explained below: (1) Positioning of the acetabular cup; (2) Selection of the diameter; (3) Selection of the angle of abduction; and (4) Selection of anteversion angle. These steps will be carried out using the calibration menu that is shown in Fig. 3 and the calibration tools that are shown in Fig. 4.

Fig. 3
figure 3

Acetabulum calibration menu

Fig. 4
figure 4

Calibration tools of the acetabulum. 1a Drag the acetabular cup manually; 1b Drag the acetabular cup remotely; (2) Refine acetabular cup position; (3) Drag guide manually; (4) Display current angle

3.2.1.1 Positioning of the acetabular cup

To position the hemisphere of the acetabular cup in the intervention zone, the surgeon has two options: drag the central hemisphere directly (Fig. 4.1a), or drag a "twin" sphere positioned on top of the hemisphere (Fig. 4.1b), which will also move the hemisphere. Once the hemisphere is positioned in the actual acetabulum, the exact position can be refined using the fine calibration window (Fig. 4.2). This allows the surgeon to move the hemisphere in 1-mm intervals along the three axes of the patient: Head-Feet (Longitudinal Axis), Up-Down (Dorsoventral Axis), and Left–Right (Transversal Axis). The correct operation of the fine calibration depends on the previous calibration of the patient. Like the floating main menu, the fine calibration window can be anchored and scrolled by pinching and dragging the blue panel with the fingers to the desired position.

3.2.1.2 Diameter selection

To select the acetabular cup diameter, the slider in the acetabulum calibration menu can be used (Fig. 3). Surgeons have two options: use the slider, dragging the guide to the desired diameter, or use the arrows to increase and decrease the current diameter. The selected diameter will always be rounded to 2-mm intervals, equivalent to the available prosthesis diameters. The allowed interval is between 0 and 10 cm.

3.2.1.3 Selection of the abduction angle

To define the abduction angle of the guide, the surgeon has two options: move the guide manually by dragging the sphere (Fig. 4.3), or use the slider and the corresponding arrows of the acetabulum calibration menu (Fig. 3). If the surgeons choose to calibrate the angle manually, they can easily check the current angle in the floating display window (Fig. 4.4). The angle will be rounded to the nearest degree. If a previous radiographic study is available, the exact angle can be entered directly. The correct functioning of the abduction angle does not depend on the previous calibration of the patient, since the ground plane (sagittal plane) is already calibrated by HoloLens 2.

3.2.1.4 Selection of anteversion angle

The definition of the anteversion angle is identical to the selection of the abduction angle. The correct functioning of the anteversion angle depends on the previous calibration of the patient. This is why the patient orientation must be calibrated before calibrating the holographic guide. Figure 5 shows a full view of the menus and digital objects.

Fig. 5
figure 5

Full view of the menus and digital objects

Once the calibration process is complete, the surgeons can go into intervention mode. To do this, it is enough to hide the calibration tools by clicking again on “Calibrate PATIENT” and “Calibrate ACETABULUM” in the main floating menu.

3.2.2 Intervention mode

In the intervention mode, the surgeons have access to a simplified interface. This interface does not allow any modification to the position of the acetabular cup or the angles of the holographic guide. If the surgeons want to correct the calibration, they can do so by reopening the calibration tools.

The surgeons have the option of configuring the interface through a customization menu, which is accessible by pressing the "Settings" button in the main menu. From this menu, the surgeons can select whether the following elements are visible or invisible: hemisphere; drilling point; internal guide; and external guide. Figure 6 shows these elements. The surgeons can use these options if they consider that some of these elements are not necessary during the intervention, or if they need to have the maximum possible visibility in the area of the operation. After the interface customization is finished, the surgeons can close the menu by pressing the “Settings” button on the floating main menu again.

Fig. 6
figure 6

Digital elements that can be visible or invisible

3.3 Recommendations

Some recommendations for the proper functioning of the application are the following:

  1. 1)

    Good lighting. If the environment is excessively dark, this could impact the quality of the internal calibration of HoloLens 2. If the environment is excessively illuminated, digital objects could appear less defined. An environment that is neither excessively dark nor excessively illuminated is recommended. The lighting in an operating room is adequate.

  2. 2)

    Changing of static objects. If the environment is constantly changing while using the application, such as a large piece of the environment that is constantly moving, then the accuracy of HoloLens 2 may suffer. We recommend an environment with little movement. HoloLens 2 has a good tolerance for people moving around the environment, with observers or other people being no problem as long as they do not obstruct a large part of the static environment. To check how the usual people in the operating room and their movement affected the correct functioning of our application, we carried out simulated interventions in which the six people who usually participate in this type of intervention were present and performing their usual tasks. In the operating room, the usual number of people is six: anesthetist, surgeon and assistant, instrumentalist nurse, anesthesia nurse, and assistant technician. In our simulated interventions in a real operating room with six people and performing their usual tasks (even with more movement than usual), the application worked correctly. Therefore, there should be no problem involving the usual people in surgical interventions and performing their usual tasks. However, and in line with previous recommendations, the movement of personnel in the operating room should be minimized (Suter et al. 2023).

Some recommendations to avoid problems with hand detection:

  1. 1)

    Use mainly the index finger and thumb. These are the most visible and distinctive fingers for HoloLens 2. It is recommended to use the index finger to press buttons and to pinch with both fingers to drag interface elements. When pressing only with the index finger, it is also convenient to close the other fingers.

  2. 2)

    Keep the back of the hand visible. It is preferable for the hand to point more up than down so that the HoloLens 2 has a clear view of it. If the surgeons try to pinch something from above showing their palm, their palm may not be recognized correctly. In either case, it is imperative for the index finger and thumb to be visible if the surgeons want to rotate objects by hand.

  3. 3)

    Keep the hand in the field of view of the headset. If the surgeons try to press or drag an item that is no longer in front of the headset, the tracking of the hands is lost, and, therefore, it is not possible to interact with any element. This can happen when looking away or when moving a hand to the side without following the hand with the head. Whenever the surgeons want to manipulate a digital object, it is essential for the hand to be in front of the headset.

  4. 4)

    Avoid other people's hands in front of the headset. It is possible to use HoloLens 2 with other people nearby, and normally the headset will distinguish which hand is the user's and which is not. However, it is preferable that other people in the environment do not perform hand movements that could be confused with the user due to their proximity to the headset, such as pointing very close to the camera or gesturing abruptly in front of the user.

Some recommendations to optimize the use of the application:

  1. 1)

    Use the corners of the surgical bed to calibrate the patient. The most optimal way to ensure a good calibration of the patient is by taking the surgical bed as a reference point. Instead of placing the upper/lower markers at the patient's head and feet, which can be misleading. It is advisable to take two corners on the same side of the surgical bed (not diagonally) and place the markers there. This way, a clear reference point is defined, and it is easy to check if the axis is parallel to the surgical bed.

  2. 2)

    Calibrate the angle manually to choose the length of the guide. Depending on the surgeons’ preferences, they may want a longer or shorter guide. For this, the surgeons can use manual angle calibration to lengthen or shorten this holographic guide. Surgeons can then refine the exact angles using the calibration menu. For this reason, a manual calibration is recommended first.

  3. 3)

    Customize the workspace. The surgeons have complete freedom to drag and drop the floating menus where it is most convenient. It is recommended to prepare the work space before the surgery, placing all of the holograms on the surgical area and the menus in visible and accessible areas that do not interfere with the surgical area.

4 Results

4.1 Comparison of the values of the application with the real measurements

For the validation of the application, we built a 3D model with sheets of wood (15 mm thick) in the three axes of the space, with a size of 40 cm long, 38.5 cm high, and 21.5 cm wide. A sawbone-type pelvis was adhered to this structure using silicone. This position is the same in which the patient is placed for hip surgery, that is, in lateral decubitus. Then, we fixed a milling cutter of the size of the acetabular cup (52 mm) to the acetabulum using two screws. Afterwards, we placed a clamping handle of the milling cutter, which served as the drilling axis, to validate the values (degrees) offered by the application. In order to measure the angles, we placed this complete structure on a horizontal table parallel to the ground and used bubble levels to determine that it was actually in that position (Fig. 7).

Fig. 7
figure 7

Structure built for the validation of the application

To measure the angle of abduction of the drilling axis with respect to the horizontal plane (ground), we use a goniometer tool for smartphones "called RateFast Simple Goniometer ". To do this, the mobile phone was placed directly on the clamping handle of the milling cutter, as shown in Fig. 8.

Fig. 8
figure 8

Measurement of the abduction angle

To measure the anteversion angle, we projected the position of the drilling axis (clamping handle of the milling cutter) onto the horizontal plane using a “Wolfcraft” universal square (Fig. 9). We measured the anteversion angle directly using an angle protractor (Fig. 10).

Fig. 9
figure 9

Projection of the position of the drilling axis onto the horizontal plane

Fig. 10
figure 10

Measurement of the anteversion angle with an angle protractor

This process was repeated 20 times, changing the position of the acetabular cup drill at different angles of abduction and anteversion and manually measuring (as described above) the two angles studied at each new position (ground-truth). The values offered by the application indicating the degrees of abduction and anteversion are used for comparison with the ground-truth.

The absolute difference between the value offered by our application and the real value (ground-truth) are considered for calculating the mean (standard deviation). The mean (standard deviation) is 0.375 (0.483) degrees for the error in the anteversion angle, and 0.1 (0.308) degrees for the error in the abduction angle, with maximum discrepancies of 1 degree. Figure 11 shows these errors graphically.

Fig. 11
figure 11

Absolute discrepancies between the values offered by the application and the real values (ground-truth). a Anteversion and b abduction grades. The X axes show the degrees in anteversion and abduction. The Y axes show the absolute discrepancies for the degrees in the X axes

4.2 Cadaver study

To verify the suitability of the application in clinical practice, a study was carried out on a cadaver of the university's own program for donation of bodies for use in teaching and research at the Universitat de València. The university's department of human anatomy and embryology has workbenches that are equipped with suction systems, water intake, and cutting and drilling motors. A cadaver was thawed at a temperature of 4 ºC during the two days prior to its use. This cadaver was used for the study.

The cadaver was placed in lateral decubitus, and, after covering the surgical area with cloths in the same way that total hip replacement surgery is performed, the surgeon dissected the planes using a posterolateral approach, until hip arthrotomy. He then dislocated the femoral head to perform the femoral neck osteotomy, removed the femoral head, and exposed the acetabulum.

The surgeon put on the HoloLens 2, and, after calibration of the patient, the position and diameter of the virtual acetabular cup were adjusted to the position and diameter of the cadaver's acetabulum. Then, he oriented the virtual drilling axis, observing that the virtual acetabular cup was correctly covered around the entire periphery of the acetabular cavity of the cadaver. The surgeon verified the excellent view of the superimposition of the holographic models that were projected on the specimen and that these holograms allowed maintaining the real view of the entire anatomy of the cadaver’s hip.

The surgeon then simulated the acetabular drilling, taking the drills to the virtual axis drawn on the surgical field. The surgeon verified that the virtual axis remained stable throughout the process, without displacement from the initial location.

Thus, the surgeon verified that the MR application for HoloLens 2 is suitable for transfer to routine clinical practice and helps in the guidance process for the implantation of a total hip prosthesis. Figure 12 shows images of the study with the cadaver.

Fig. 12
figure 12

Images of the study with a cadaver: a Surgeon wearing HoloLens 2 and using the application; b View of the application for virtual acetabular cup and guide placement; c View of the application for virtual cup and guidance placement (with less virtual elements); d View of the application in intervention mode

5 Discussion

To our knowledge, our work presents the first MR application for total hip arthroplasty using HoloLens 2 and hand interaction, without requiring the acquisition of preoperative or intraoperative images of the patient. To date, other help systems, which require preoperative CT or RMI (e.g., Lei et al. 2019) or intraoperative images (e.g., Fotouhi et al. 2018) and intraoperative registration to the patient have already been used. These types of systems increase the patient’s radiation exposure, as well as the cost and time of surgery (Sugano 2013).

In the literature, only two systems have been found that are in line with ours (Fotouhi et al. 2018; Lei et al. 2019). The functionality of these two applications is different from ours. Our application does not require preoperative or intraoperative image acquisition. It helps the surgeon to place the acetabular component, determine its diameter size, place the guide for drilling and implant placement, and customize all of the menus and virtual elements that appear in the scene. The work of Fotouhi et al. (Fotouhi et al. 2018) required intraoperative image acquisition and used a different tracking technique than ours. They used ARToolKit for marker-based tracking, and, in our case, tracking is achieved using SLAM (Simultaneous Localization and Mapping). A previous work (Villegas-Hernandez and Guedea-Elizalde 2017) showed that light conditions greatly influence the estimation of the marker position using ARToolKit, obtaining a mean of the position error of 20.58 mm. The work of Fotouhi et al. (Fotouhi et al. 2018) and our work perform the validations using phantoms. Their work helps mainly in the placement of the acetabular component. The work of Lei et al. (Lei et al. 2019) and our proposal both use HoloLens. However, they acquired CT and MRI images and 3D printed a reference instrument that they attached to a bony landmark. In our case, it is not necessary to acquire preoperative images or attach a landmark to the patient (with the consequent sterilization of the landmark). Finally, our work and these two works (Fotouhi et al. 2018; Lei et al. 2019) use AR or MR for total hip arthroplasty and discuss the importance of research to offer systems that are as precise as possible in order to help surgeons and provide maximum benefits to patients.

Our application offers a maximum error of one degree with respect to the real measurements, with a mean (standard deviation) for the anteversion and abduction angles of 0.375 (0.483) degrees, and 0.1 (0.308) degrees, respectively. We would like to add that a larger error in the anteversion angle may also be influenced by the fact that the actual ground truth value was obtained manually. Therefore, our main hypothesis has been corroborated. Sato et al. (2000) reported 4.25 degrees of error in cup orientation. Fotouhi et al. (2018) reported anteversion and abduction errors compared with a ground-truth cone beam CT scan of 0.53 degrees and 1.10 degrees, respectively. The errors offered by our application are lower, although differences in the methods used to obtain these measurements must be taken into account.

After checking the accuracy of the application (and before its use in clinical practice), a surgeon tested the application on a cadaver as described in Sect. 4.2. The objective was to reproduce the hip prosthesis surgical intervention and verify good view of the surgical field and the superimposition of the holographic images on it. The surgeon verified that the holographic guidance axis remained stable throughout the process and that it really allowed the surgeon to continue drilling the acetabulum according to its anteversion and abduction axes. The surgeon had no problem placing the holographic cup inside the cadaver's acetabulum and orienting it according to the position of the acetabulum itself. The surgeon placed the calibration and angle adjustment screens in the best position so as not to interfere in his surgical field. His personal assessment was that the application is a valid support system for total hip arthroplasty.

HoloLens 2 is an ideal headset for surgery in the operating room. The surgeon only has to wear the headset. The interaction can be done by gestures or by voice, so it is not necessary to touch anything and therefore nothing additional has to be sterilized. Digital objects are displayed superimposed on the surgeon's field of view and he or she does not have to take his/her eyes off the operating field. HoloLens 2 is very ergonomic. It is optical see-through. The surgeon is seeing the real world at all times. If at any moment he/she wants to see only the real world, he/she only has to raise the front viewfinder. This action can be carried out by an operating room assistant. However, previous works raised some concerns about perceptual issues, stability, weight, and accuracy of headsets in general and HoloLens 2 in particular (Vassallo et al. 2017; Akulauskas et al. 2023; Chuang et al. 2023; Ruggiero et al. 2023). These limitations need to be taken into account when transferring headsets to a surgical environment. In our case, these limitations were analyzed and those that could be overcome were identified and mitigated so that the developed application can be used in the operating room. With regard to perceptual issues, one of the limitations is that if the digital objects are very large and occupy more of the user's field of view, the user will see them cut off, which influences the user’s experience. The limitation of a small augmentable field of view has already been raised in previous works (e.g., Ruggiero et al. 2023). In our application, digital objects are placed in the surgeon's field of view and menus can be anchored in space at the desired position. In the case of the menus, it is not so important to have the full view and the user can move to see them, if necessary. Another limitation is that digital objects are seen as points of light in space. Therefore, with objects with many details, it is not possible to have a view as clear as that offered by other devices such as video see-through. In our application, objects are represented with uniform and bright colors that are not affected by this limitation. In addition, some of them are transparent in order to facilitate viewing and interaction. This limitation has also been identified in previous works (e.g., Chuang et al. 2023), and, in their case, they also used bright colors. With regard to stability, from the user's perspective, holograms should be stationary and should not move relative to the environment. HoloLens has a built-in image stabilization pipeline to achieve stable holograms. However, errors while walking or sudden acceleration of the head may occur (Vassallo et al. 2017). These errors may cause the global coordinate system to move away from its initial position causing all of the holograms to move as well. In our case, once the application is calibrated, the surgeon does not have to walk and does not usually make sudden head movements since he/she is focused on the intervention. All of this facilitates the stability of the holograms. However, stability is an important issue in the user’s experience and has received attention in previous works (e.g., Vassallo et al. 2017). To mitigate the problem of instability, some works used external patterns to determine the pose of HoloLens, for example, localizing infrared markers in space (Kunz et al. 2020). The weight of the headsets and the location of their center of gravity play an important role in physical demands (higher joint angles, muscular demands) in the neck and shoulder regions (Kuber and Rashedi 2023). The weight of HoloLens 2 is 566 g. The users involved in our tests did not complained about the weight. However, the lighter the headset is, the less physical demand the user will have. The weight is an important issue that hardware manufacturers should take into account in order to reduce the physical discomfort of users (Kuber and Rashedi 2023). With regard to accuracy, HoloLens 2 reaches the millimeter range (Akulauskas et al. 2023). Submillimeter accuracy could be achieved with improvements in the hardware components of the headsets and registration methods. These new headsets could allow MR to be used in other surgical specialties that require greater accuracy demand. Finally, with regard to the risk of infections, our application was tested for use with a surgical helmet. The surgeon had no problem wearing HoloLens 2 under the surgical helmet and using our application in a simulated intervention.

6 Conclusion

This work presents the design, development, and validation of the first MR application for total hip arthroplasty using HoloLens 2, without requiring acquiring preoperative or intraoperative images of the patient and using hand interaction. The application allows the placement of the acetabular cup, the definition of its diameter and the placement of the drilling guide using the angles of abduction and anteversion. HoloLens 2 is a standalone headset allowing freedom of movement without having to be physically connected to any other device. Once the surgeon wears the headset, he or she does not have to touch it again. A different person could remove the headset if necessary. The interaction is gestural and therefore it is not necessary to sterilize any additional element. We have compared the values (degrees) offered by our application with real measures. From the results, it can be concluded that our application offers errors to a maximum precision of one degree. A surgeon validated the application on a cadaver and his conclusion was that the application is a valid support system and can help in clinical practice for total hip arthroplasty. These results are promising, and, as future work, we intend to validate our application with more cadavers and with patients. The correct placement of the implant will be verified through the acquisition of postoperative images. Our application could also be extended to knee and shoulder arthroplasty.