# Medical Augmented-Reality Visualizer for Surgical Training and Education in Medicine
## 2 Materials and Methods
### Prototype Fabrication  
We implemented a prototype of the MARVIS system to assess and validate its concept. The system frame was made from aluminum profiles of \(45\times 45\) mm. The PhTM consists of a 2 MP color camera (Flea3 FL3-U3-20E4C; Point Grey Research Inc, Wilsonville, OR, USA) equipped with a narrow-angle lens (f = 25 mm; Pentax Corp., Tokyo, Japan; green area in Figure 9). The camera optical axis is nearly parallel to the projector optical axis, with a working distance of 1450 mm. The HdTM consists of two 2 MP color cameras (Flea3 FL3-U3-20E4C; Point Grey Research Inc, Wilsonville, OR, USA; red areas in Figure 9) with wide-angle lenses (f = 8 mm; Pentax Corp., Tokyo, Japan;), pointing at the user's head. The distance between the HdTM cameras is approximately 1200 mm. The liver phantom illumination and AR displaying are obtained from a full HD projector (EH415; Optoma Corp., New Taipei, Taiwan; PrM, blue area in Figure 9). The projection distance is approximately 1300 mm, and the  
Figure 7: SIM connections. The module has three channels: for tumors (S1), vessels (S2), and syringe probe (PROBE). optical axis is perpendicular to the working table. The SIM consists of a PIC microcontroller with an additional hardware module based on the Banana PI board (Sinovoip Co., Ltd, Shenzhen, China) and IBM Node-RED software for capturing data from the user's syringe probe (Figure 10). The phantom was cast from silicone molding rubber [31], and the internal structures from agar [32]. The molding casts were designed using 3 ds Max 2017 and printed from ABS using a uPrint 3D printer (Stratasys Ltd., Valencia, CA, USA). The print quality was set to the highest value, layer height 0.254 mm. The liver phantom view is augmented with the internal structures as shown in Figure 11. The area in red represents a tumor, and that in blue represents blood vessels. Figure 8: Local coordinate systems from the MARVIS devices. Red, green, and blue arrows correspond to the \(X\), \(Y\), and \(Z\) axes in the coordinate systems, respectively. \(X_{\mathrm{w}}\), \(Y_{\mathrm{w}}\), and \(Z_{\mathrm{w}}\) represent the axes of the global coordinate system. Figure 9: Prototype of MARVIS comprising the HdTM cameras (red), PrM projector (cyan), and PhTM camera (green). The developed software was implemented in C++ using Visual Studio 2015 (Microsoft Corp., Redmond, WA, USA) and the OpenGL API. It runs on a 64-bit Windows 10 Pro computer with an Core i7 6700K (4.0 GHz; Intel Corp., Santa Clara, CA, USA) processor and GeForce 980 graphics card (NVIDIA Corp., Santa Clara, CA, USA). The CSDs of the liver model were sampled with resolution of \(5^{\circ}\) about the \(Z\)-axis (60 points for the contour). Prerendered views were generated with resolution of \(2^{\circ}\) about both the \(X\) and \(Y\) axes. These resolutions consider the tradeoff between computational complexity and phantom simulation accuracy. The ranges of rotation per axis were chosen after consultation with medical experts, within ranges \(-60^{\circ}<\Phi<60^{\circ}\) and \(45^{\circ}<\theta<45^{\circ}\) relative to a default anatomic phantom position on the working table. These values consider the surgical experience from two of the coauthors and the limitations of liver anatomical movements in the human body. These ranges, which were implemented in MARVIS, are broader than the usual angles found in surgeon's practice. MARVIS generates an OpenGL scene of a liver model, including its internal structures, at each timeframe and projects its transformed image onto the physical phantom. First, a scene is rendered with respect to the user's viewpoint (Figure 12, step 1), beginning with the phantom shell without internal structures. Next, the system renders the internal structures in a separate framebuffer for superimposition onto the framebuffer with the shell image, disregarding depth information from the \(Z\)-axis buffer (Figure 12, projection of \(A\) onto \(A_{\text{p}}\)).