Virtual Mammography Environment with Gamification Elements for Simulation and Training

This paper presents a virtual mammography environment aimed for desktop devices, developed in Unity3D Engine. The environment allows users to interact with a mammography system, operate the equipment, and take a simulated X-ray image of a virtual breast phantom. Elements of gamification, such as level evolution and reward system, were added to the application so that users could practice and learn the usage of real equipment, so that learning could be more enjoyable. The environment was modeled taking into account a good level of realism. For this, the equipment model used in the environment was based on a mammography system used in a local hospital.

I. INTRODUCTION Breast cancer has been a huge concern in women's and men's health. In both genres, it is the second most common type of malignant neoplasm, right after lung cancer. Among women, it is the most common type diagnosed and the main cause of death [1].
In Brazil, breast cancer is the most common (not considering non-melanoma skin cancer) between women in all regions. It is estimated 66.280 breast cancer cases for each year in 2020-2022 triennial, accounting for 29.7% of all types of cancers between women [2].
The mammography is considered the international standard for screening programs [3]. It is a routine exam for women aged between 50 and 69, recommended being done every 2 years by the Health Ministry in Brazil [4].
Serious games are similar to entertainment games, but they are used mainly for education, training, and medical treatment [5]. These games have demonstrated a great utility in medical education [6] [7] [8].
Cyrino et al. [9] developed a customizable serious game based on VR (Virtual Reality) to help the rehabilitation process of patients who suffered stroke. In addition to serious The presented work was accomplished with a support from CAPES, Brazilian Government entity oriented to human resources formation. game, the system consists of a control panel for game and patient management, a database, and a multimodal interface that allows the use of multiple input devices. Tests were performed with several patients and evaluation questionnaires were applied. The authors concluded that the developed system has the potential to be used in the rehabilitation of patients with paresis in the upper limbs resulting from a stroke Bridge et al. [10] developed a VR and desktop application for medical imaging students to practice radiographic techniques. A randomized comparison was performed between students' groups who practiced in the application and at the laboratory versus those that only practiced at the laboratory. It was concluded that those who practiced with application had better scores in a test with real equipment than those trained at the real laboratory only.
In another simulation-based training environment [11], users had to operate a C-arm X-ray machine in a virtual environment. Aspects of gamification were included in the application, such as score and a reward system. A User Experience Questionnaire (UEQ) was applied to operating room personnel, and it showed that users were motivated to use the system with game aspects, as well as using the system without the constraints that the real world has when working with X-rays. Additionally, it was shown that basic operations with the Carm and X-ray characteristics were also useful, according to users.
In this paper, we present the creation of a virtual environment for mammography exams with gamification aspects. Inside the environment, users can operate the X-ray acquisition system and take simulated X-ray images of a virtual breast phantom.

II. ENVIRONMENT PRODUCTION
A. Assets Production 1) Modeling Techniques: All assets used in the game scene were produced by the authors. The game assets were modeled and textured in Blender (v. 2.83), an open-source creation suite.
Models were created using the box modeling technique. The PBR (Physically-Based Rendering) workflow was used for the textures. In order to reach a good level of realism, the models were produced using existing elements in reality. This way, photos of real-life elements was used as a reference.
The mammography unit is based on the Siemens © Mammomat product line. This model was chosen due to easy access to a local hospital that used the Siemens © Mammomat Fusion. In case of need, pictures of the equipment could be taken as reference for the 3D modeling process due to the easy access to the equipment.
2) Breast Phantom Modeling: A breast phantom was produced based on a tissue-equivalent CIRS © (model 11a) phantom. Internal structures mimicking the real phantom internal structures were modeled with primitive shapes (cubes and spheres). Fig. 1 shows the modeled phantom render and Fig.  2 shows its internal structures.

3) Virtual Room Scene Development:
The scene was created using Unity3D Engine, with its new render pipeline, HDRP (High Definition Render Pipeline). This development pipeline allows the creation of high fidelity graphics in the game.
The game was divided into 3 main levels, all inside the same scene and a free mode, to which the user can navigate freely on the environment.
On each level, the user must follow a set of instructions related to the operation of the mammography system. At the first level, users must get acquainted with the available tools provided by the game. Instructions are shown to locate and select the tools for operation of the mammography system, such as the pedal and buttons.
At the second level, users must execute positioning operations. For example, the user is asked to position the mammography system at a certain height (vertical movement) and rotate the articulation arm at a specific angle -CC (cranialcaudal) or MLO (mediolateral-oblique).
At the third level, users must select and correctly position the breast phantom 3D model and start an acquisition. The user is also asked to configure parameters for the acquisition (voltage and current).
For each successful operation, users are rewarded with a game coin, "ROT". The name was used as a reference to Wilhelm Röntgen, German mechanical engineer and physicist. Users can eventually trade those rewards for improvements in the equipment (e.g. tools, AEC -automatic exposure control) and improvements in the room.

4) Maps Production:
In order to follow the HDRP settings, the standard shader "HDRP/Lit", as well as the "Shader Graph" was used. This shader requires the basic maps for PBR workflow.
As a requirement of the "HDRP/Lit" Shader, to produce its Mask Map, it was necessary a conversion of four gray maps (Metallic, Ambient Occlusion, Detail and Smoothness) into a single texture.
For this, we developed a Blender plugin to create the combined maps. The plugin combines each one of the gray maps in a channel (Red, Green, Blue and Alpha) of the Mask Map texture, resulting in a single texture file.
B. X-ray Generator 1) Blender X-ray Environment: For the X-ray image render, a scene was created inside Blender. The scene is composed of a camera, a light source, a collimator, and a 3D model of a breast phantom. The scene is used in the X-rays Generator script. Fig. 3 shows the X-ray environment inside Blender. 2) X-ray Generator Workflow and Communication: The MQTT (Message Queuing Telemetry Transport) was used to connect the Mammography Environment and the X-rays Generator.
The MQTT is a communication protocol used to establish communication with computer processes and devices. This bidirectional communication system was used to transport parameters (game configuration and filenames) between the two applications.
The X-ray generation system is composed of three main parts: the Mammography Environment, MQTT Manager, and the X-rays Generator.
The Mammography Environment is the game application itself. The MQTT Manager is a script module developed to control the game's requests of X-ray generation. It receives the game's configuration parameters (set by the user throughout the game) from the Mammography Environment, creates and runs a new X-rays Generator process relaying the received parameters.
The X-rays Generator is a script module responsible for rendering the X-ray image with the received parameters (from the MQTT Manager script module). It runs as a Blender background task. After finishing the render, it saves the generated image in the computer's file system and returns the image's file name to the MQTT Manager process. Fig. 4 shows a sequence diagram of this workflow.

3) Rendering Configuration:
In order to produce simulated X-rays images, a volumetric material was created in Blender. The material allows light to pass through the 3D model of the breast phantom and reach the camera.
The density property of the material is configured so that each small structure inside the breast phantom's 3D model is rendered at a certain level of gray. The light intensity is set by the user during the game through voltage value.

C. User Interaction Techniques
Users can interact (navigate, select elements, and execute procedures) with the game using a keyboard and mouse devices. As the users go through the levels, contextual instructions are shown on the screen.
An instruction panel shows messages for the user about which key must be pressed in a given context. For example, to select a specific tool, the user must press the "F" key in the keyboard.

III. RESULTS AND DISCUSSION
The final application environment is presented in Fig. 5. In the environment, users are allowed to navigate through the virtual room, select tools, and operate the equipment.
The game instructions work as a guide and include a set of goals, which the user must accomplish in order to complete the level. This way, users are guided to execute predefined tasks though out the game and is expected to learn while playing.
The elements in the room were chosen to represent a humanized and cozy environment. For example, the wooden floor and screens showing peaceful pictures, alluding to tranquility. Users navigate through a first-person character and can also observe details of the equipment. The user can also read the instructions of a specific tool used in the environment.
As the mammography model was based on real equipment, the tool instructions show how to use the tool based on the equipment manual. For example, to position the height of the articulation arm, the user must select the pedal or buttons. Fig.  6 shows a tool instruction screen.
As a gamification aspect, users can trade earned coins in the game to buy and build a complete set of instruments. These instruments represent parts of the mammography system that are usually sold separately in the real world. For example, new compression plates types and a new foot switch. This market-like system is usually seen in RPG games (role-playing games).
Using gamification techniques, such as level evolution and reward system, we expect the users to have a higher degree of engagement and enjoyment while learning to operate the equipment. As future work, we intend to insert a simulation system to control and operate the mammography computer inside the game, as seen in the real mammography. This way, the application would allow patient registration and a log system. This feature could be useful to evaluate the user's training evolution, as it would keep a log of the user's actions inside the environment.
Also, we intend to port the application to a VR device (such as the Oculus © Rift) in order to provide users with a higher sense of immersion. This application might also be used as a complement to technicians training programs on the mammography system operation, as well as radiology students on mammographic techniques. An evaluation system of the application will be required for such use.

ACKNOWLEDGMENT
The autors acknowledge the CAPES Institute (Coordenação de Aperfeiçoamento de Pessoal de Nível Superior) for the support of the project.