# On the Design and Implementation of a Mixed-Platform Collaborative Virtual RAS Planner
## 3 Materials and Methods
### Tools for Surgery Planning  
In order to be able to carry out the surgical planning collaboratively, several tools have been included in the virtual planning application for customising the visualisation of the elements of the 3D segmented model. Among them is the _section planes_ tool, with which users can freely place different planes to obtain a 2D cross-section view of the patient. This tool makes it possible to replicate the characteristic visualisation of the medical image by bidimensional slices using either the anatomical planes (axial, coronal, sagittal) or any custom plane, since the application includes a free transformation plane that makes it possible to obtain slices at any angle and position. On high and medium immersion platforms, users can directly \"grab\" the geometry of the cutting plane in order to bring more realism and precision to their positioning. Figure 4 shows this tool. It is also worth mentioning the _surgical target_ tool, which automatically performs visual transformations of all elements within the radius selected by the user, with the element marked as the target as the centre. This tool makes it easy to visualise structures and volumes that may be in contact or even embedded within the surgical target, as in the case of tumours with nearby structures. Objects located outside the area indicated by the user are deactivated so as not to obstruct the view of the main area. Two visualisation modes can be applied to the remaining elements, always alternating between solid and transparent materials. The _solid mode_ allows the selected element to be drawn as the surgical target with total opacity while the rest of the visible elements are painted with the level of transparency selected by the user. In _transparent mode_, the inverse configuration is established, with the surgical target being the element displayed with transparency. Figure 5 shows this tool. In RAS, the positioning of the trocars is of great importance as it determines the workspace of the surgeon during the intervention. This process is performed \"blindly\" by the surgeon as the patient's skin occludes all internal tissues. To be able to plan this aspect, a \"virtual trocar\" tool is included to simulate its placement, the best position of the patient, and the different configurations. In addition, users can easily change their viewpoint to switch to the RAS console view as if they were using the real robot. From the point of view of the robot, it is possible to activate the virtual robotic arms to simulate the workspace that would be available to the surgeon with the configuration of the robot that is currently selected. The movement of the robotic arms is performed by the movement of the controllers, while the clutching function is mapped to the controller buttons. Figures 6 and 7 show the \"virtual trocar\" tool. Figure 8 shows this feature with a generic RAS simulator that allows surgeons to check the kinematic constraints of the robot arms and identify potential collisions between the arms of the robot and the anatomy. This RAS simulator was also used in [7]. With this important tool, the surgeons can improve the planning process. As seen in Figure 1, our collaborative system allows the use of skin deformation due to inflation in the abdominal area, in order to aid in the trocar placement process. A projection system is used on the inflated skin to identify the entry point and direction of the trocar during positioning and configuration. However, our system utilizes rigid segmented 3D models and does not involve the use of deformable meshes to adjust tissue positioning based on inflation levels in other organs different to the skin. Finally, meeting functions have been added, allowing the position and point of view of any of the users in the room to be replicated (see Figure 9). Thus, the different participants in the planning process can navigate directly between the points of view of other participants, being able to visualise and understand precisely the elements that other participants highlight.