Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC...

15
Building a Open Source Framework for Virtual Medical Training Ana Cláudia Melo Tiessi Gomes de Oliveira 1 and Fátima de Lourdes dos Santos Nunes 2 This paper presents a framework to build medical train- ing applications by using virtual reality and a tool that helps the class instantiation of this framework. The main purpose is to make easier the building of virtual reality applications in the medical training area, considering systems to simulate biopsy exams and make available deformation, collision detection, and stereoscopy func- tionalities. The instantiation of the classes allows quick implementation of the tools for such a purpose, thus reducing errors and offering low cost due to the use of open source tools. Using the instantiation tool, the process of building applications is fast and easy. There- fore, computer programmers can obtain an initial appli- cation and adapt it to their needs. This tool allows the user to include, delete, and edit parameters in the functionalities chosen as well as storing these parame- ters for future use. In order to verify the efficiency of the framework, some case studies are presented. KEY WORDS: 3D simulation, collision detection, deformation, framework, open source, stereoscopy, virtual reality, 3D imaging (imaging, three-dimensional), cancer detection, computer assisted detection, computer graphics, computer simulation, computers in medicine, education, medical, Graphical User Interface (GUI, human- computer interaction, imaging, three-dimensional, informatics training, medical informatics, applications, programming Languages, teaching, medical training INTRODUCTION V irtual reality (VR) is a very interesting technology in the development of tools for medical training because it offers interaction in a virtual environment (VE) using mouse and keyboard or non-conventional devices, such as gloves, head mounted displays, joysticks, and haptic devices with force feedback. 1 VR can provide visualizing the details of the procedure in a VE or in a virtual patient. Additionally, it can give feedback to the surgeon about his performance. Computer-generated three- dimensional (3D) environments provide a more advanced humancomputer interaction and allow navigation, selection, and manipulation of objects in the virtual world as well as in the real world. 2 Computing and communication technologies are widely used in the medical area, and VR has attracted interest, since it raises the possibilities of studies and practice of several techniques and medical procedures. 1 The use of VR in medical applications can ensure substituting test objects (like guinea pigs and corpses) for objects modeled to simulate human organs and tissues in the VE. Simulation-based training using VR techniques is a promising alternative to the traditional training of minimally invasive surgeries (MIS). Simulators let the trainee touch, feel, and manipulate virtual tissues and organs using a virtual tool similar to the tool used in actual MIS. The VE allows verifying interactions between the virtual tool and virtual tissues on a monitor as in real laparoscopic procedures. 3 VR applications in medicine must have special characteristics and requirements, as the use of haptic devices, development of 3D objects to simulate human organs and equipments used in the procedures, collision detection, stereoscopy, and deformation techniques, in addition to real-time 1 From the Centro Estadual de Educação Tecnológica Paula Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2 From the Escola de Artes, Ciências e Humanidades (EACH), Universidade de São Paulo, São Paulo, Brazil. Correspondence to: Ana Cláudia Melo Tiessi Gomes de Oliveira, Centro Estadual de Educação Tecnológica Paula Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil; tel: +55-14-3471-4723; fax: +55-14-3471-4723; e-mail: [email protected] Copyright * 2009 by Society for Imaging Informatics in Medicine Online publication 30 September 2009 doi: 10.1007/s10278-009-9243-3 706 Journal of Digital Imaging, Vol 23, No 6 (December), 2010: pp 706Y720

Transcript of Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC...

Page 1: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

Building a Open Source Framework for Virtual Medical Training

Ana Cláudia Melo Tiessi Gomes de Oliveira1 and Fátima de Lourdes dos Santos Nunes2

This paper presents a framework to build medical train-ing applications by using virtual reality and a tool thathelps the class instantiation of this framework. The mainpurpose is to make easier the building of virtual realityapplications in the medical training area, consideringsystems to simulate biopsy exams and make availabledeformation, collision detection, and stereoscopy func-tionalities. The instantiation of the classes allows quickimplementation of the tools for such a purpose, thusreducing errors and offering low cost due to the use ofopen source tools. Using the instantiation tool, theprocess of building applications is fast and easy. There-fore, computer programmers can obtain an initial appli-cation and adapt it to their needs. This tool allows theuser to include, delete, and edit parameters in thefunctionalities chosen as well as storing these parame-ters for future use. In order to verify the efficiency of theframework, some case studies are presented.

KEY WORDS: 3D simulation, collision detection,deformation, framework, open source, stereoscopy,virtual reality, 3D imaging (imaging, three-dimensional),cancer detection, computer assisted detection, computergraphics, computer simulation, computers in medicine,education, medical, Graphical User Interface (GUI, human-computer interaction, imaging, three-dimensional,informatics training, medical informatics, applications,programming Languages, teaching, medical training

INTRODUCTION

V irtual reality (VR) is a very interestingtechnology in the development of tools for

medical training because it offers interaction in avirtual environment (VE) using mouse and keyboardor non-conventional devices, such as gloves, headmounted displays, joysticks, and haptic devices withforce feedback.1 VR can provide visualizing thedetails of the procedure in a VE or in a virtual patient.Additionally, it can give feedback to the surgeonabout his performance. Computer-generated three-dimensional (3D) environments provide a moreadvanced human–computer interaction and allow

navigation, selection, and manipulation of objects inthe virtual world as well as in the real world.2

Computing and communication technologies arewidely used in the medical area, and VR hasattracted interest, since it raises the possibilities ofstudies and practice of several techniques andmedical procedures.1 The use of VR in medicalapplications can ensure substituting test objects(like guinea pigs and corpses) for objects modeledto simulate human organs and tissues in the VE.Simulation-based training using VR techniques isa promising alternative to the traditional training ofminimally invasive surgeries (MIS). Simulators letthe trainee touch, feel, and manipulate virtualtissues and organs using a virtual tool similar tothe tool used in actual MIS. The VE allowsverifying interactions between the virtual tool andvirtual tissues on a monitor as in real laparoscopicprocedures.3

VR applications in medicine must have specialcharacteristics and requirements, as the use ofhaptic devices, development of 3D objects tosimulate human organs and equipments used inthe procedures, collision detection, stereoscopy,and deformation techniques, in addition to real-time

1From the Centro Estadual de Educação Tecnológica PaulaSouza/FATEC Garça, 2331 Presidente Vargas Av. Garça,São Paulo, 17400-000, Brazil.

2From the Escola de Artes, Ciências e Humanidades(EACH), Universidade de São Paulo, São Paulo, Brazil.

Correspondence to: Ana Cláudia Melo Tiessi Gomes deOliveira, Centro Estadual de Educação Tecnológica PaulaSouza/FATEC Garça, 2331 Presidente Vargas Av. Garça,São Paulo, 17400-000, Brazil; tel: +55-14-3471-4723;fax: +55-14-3471-4723; e-mail: [email protected]

Copyright * 2009 by Society for Imaging Informatics inMedicine

Online publication 30 September 2009doi: 10.1007/s10278-009-9243-3

706 Journal of Digital Imaging, Vol 23, No 6 (December), 2010: pp 706Y720

Page 2: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

feedback and accuracy.4 In order to make theapplications more realistic, it is necessary to planthe VE to reproduce real procedure aspects andactions considering these mentioned aspects. Toavoid the implementation of these aspects in everybuilt application, the idea of the source code reusecan be an advantage.4

There are VR applications for teaching, rehabil-itation, medical procedures training, and simula-tion. Good examples provided by the literature aresimulators for training in minimally invasivesurgery,3 orthopedic simulator,5 prostate cancerdiagnosis,6 breast plastic surgery planning,7 andtelerehabilitation.8

An object-oriented framework (OOF) is a reusetechnique with the object-oriented paradigm. Inthis context, it can describe a framework as astructure of classes that makes available andoriginates a non-finished application. These classescan generate a set of applications of a previouslyestablished domain. Besides the reusability in theanalysis, project, programming, and tests stages,an easier maintenance and a rise in productivity arethe advantages of using frameworks to developapplications.9

This paper presents the development of thevirtual medical training (ViMeT), an OOF thatuses VR to simulate medical training, consideringbiopsy exams as the case study. It also presents theViMeTWizard, a tool to assist the ViMeT instan-tiation, and the ViMeT integration with otherprojects. It demonstrates an experience report ofthe development process and the instantiation ofthe framework, thereby contributing to researcherswho wish to increase the productivity in thebuilding process of the computer applications inthis area.Besides this introduction, this paper has the

following sections: “OBJECT-ORIENTEDFRAMEWORKS AND VR FRAMEWORKS”shows the concept of the OOF, some of theirclassifications, and some examples of VR frame-works. “THE VIMET FRAMEWORK” describesthe ViMeT’s project, the methodology used in itsdevelopment, and the ViMeTWizard tool. “CASESTUDIES AND DISCUSSION” shows some casestudies resulting from the framework instantiation,including a discussion about them. “INTEGRA-TION OF THE VIMET WITH OTHER PROJ-ECTS” shows the ViMeT’s integration with amodule of interaction and a system for simulating

3D objects, while the last section presents theconclusions and future works.

OBJECT-ORIENTED FRAMEWORKS AND VRFRAMEWORKS

The development of OOF and applicationsderived from a specific framework has been aresearch subject since the 1980s, with the rise ofthe object-oriented paradigm. Reusability throughframework occurs by inheritance and polymorphism,and as in every software reuse, it presents somelimitations. In order to overcome these limitations, itis possible to use simultaneously some forms ofreuse such as frameworks with design patterns10 orframeworks with components.The way in which the reuse occurs through

framework generates a classification according toits extension, and three categories are proposed:black-box reuse, which occurs by composition;white-box reuse, which occurs by inheritance; andgray-box reuse, which has concrete and abstractclasses, occurring by inheritance and dynamiclinking.9

In the last years, an increasing interest in OOFhas been observed due to its flexibility andextensibility. The building of a framework cansave time in the development of new applications,as well as provide significant reduction of errorsand, consequently, increase software quality. Themain desired characteristic when developing aframework is the generalization related to conceptsand functionalities of a previously establisheddomain.9

VR deals with computer-generated 3D environ-ments and a set of tools that allows the user toimmerse, navigate, and interact with objects in theVE.11 For this interaction, conventional devicesare used, such as keyboard and mouse, or morecomplex ones, such as data gloves, haptic device,and stereoscopic glasses. They provide a morerealistic interaction in some applications.VR frameworks are known for their complexity,

instantiation difficulty, and for being used only byresearchers or expert programmers. They allow theuser to focus on the application development, sinceit is not necessary to worry about the VR systemmanagement. Such frameworks offer device andprojection system abstraction, specific Scene

BUILDING A OPEN SOURCE FRAMEWORK FOR VIRTUAL MEDICAL TRAINING 707

Page 3: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

Graphs, heuristic interaction with the VE, supportto distributed systems, and distributed rendering.1

Some examples of VR frameworks are thefollowing: the Avango, which allows the creationof applications with specific classes that inheritproperties of distribution;12 shares simple virtualenvironment (SSVE), projected to manage smallcollaborative groups inside highly dynamic, sharedand interactive VEs;13 Ivory, which provides easyvisualization of Physics-based data;14 basho, used tocreate a VE which supports different renderings andalso has a small shell;15 and simulation open frame-work architecture (SOFA), which consists of astructure of classes designed to achieve medicalsimulation in real time.16

THE VIMET FRAMEWORK

As stated before, VR can be helpful to themedical area with regard to applications of com-puter-aided diagnosis, procedures simulation, 3Dvisualization, and teaching and training of studentsand professionals of the medical field. Someresearchers previously conducted implementationresults in useful functionalities to the medicaltraining such as accurate collision detection,stereoscopy, and deformation.1 However, it is wellknown that there are a large variety of techniques ofdeformation, collision detection, and stereoscopy.Each one can be more or less appropriate to VRapplications in medicine. The ViMeT was built inorder to consider this context, taking advantage ofthe better characteristics of the techniques, providinga flexible structure of classes to build applications. Inthis way, ViMeT consists of an OOF that applies VRtechniques considering the ViMeT as a domain andfocusing especially on the development of applica-tions that simulate biopsy exams.4

The ViMeT framework has computer program-mers as its target audience, but the applicationsgenerated are from professionals from the healthcare area (mainly physicians and students) as theirtarget audience. In order to assure the code andfunctionality access, it is currently being devel-oped under the General Public License,17 and thefull package will be available in http://each.uspnet.usp.br/lapis.A biopsy exam is a procedure meant to extract

small samples of organ tissue suspected of anoma-lies. These parts are sent to pathologists to determine

the diagnosis. The simulation of such exams requirescommon tasks related to manipulation of equipmentand of the human body parts, as well as tasks relatedto the necessary feedback for simulating the reactionof an action by the user, such as to deform any givenarea of the synthetic object.Open source technologies in the ViMeT devel-

opment was used because it implies that severalresearchers can contribute to its continuity. Thetechnologies used in ViMeT were Java Program-ming Language18 and the API Java3D,19 databasemanager system (DBMS) Derby,20 an educationalversion of 3D StudioMax for modeling,21 andJude22 for documentation.

Methodology

Some methodologies are cited in the literaturefor the development of frameworks. In order tocontextualize the methods, the most used arepresented here. The methodology proposed bySchmidt23 affirms that the most important thing isnot to initiate the project of a framework trying tomodulate its variability and flexibility. Instead, afixed application should be designed inside theframeworks’ domain, and after full comprehension, ageneralization can be initialized.Pree24 proposes a methodology in which the

building begins with a definition of the specificobject model of an application, and the otheractivities are successively repeated until the frame-work is considered satisfactory. In this methodology,a developer and a specialist are required isn thedomain of the application and both will be co-responsible for the whole process.Roberts and Johnson’s methodology25 is called

“Evolution of Frameworks” and is related tobuilding the instantiation. The general rule is tobuild the first application, build the second onequickly and different from the first one, and finallyto build the third application differently from theothers, but all of them must be inside the samedomain; thus, the common abstractions will remainevident.Bosch26 proposes a methodology in which the

building initiates with a domain analysis and sixactivities. This last methodology was chosen as thedefined steps for the building (Fig. 1) wereconsidered the most suitable to the interests ofthe project. Some adjustments were performed,

708 DE OLIVEIRA AND MARQUES

Page 4: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

including the development of a tool for instantiation.The following paragraphs describe the steps:

(a) Step 1, domain analysis: this step was respon-sible to identify the needed requirements forthe framework’s domain. For the ViMeT’sdevelopment, the domain analysis was dividedinto two parts: The first one was for obtainingthe VR framework characteristics, while thesecond one was intended for obtaining detailsof the medical procedures necessary to simu-late biopsy exams. Regarding the domainanalysis related to the VR frameworks, thefollowing characteristics were investigated:VE, database, ways of interactions, ways ofloading objects, programming languages, andways of extension and flexibility. In theanalysis related to the biopsy’s procedures,the needed requirements for the exam’s execu-tion were studied, such as instruments, parts ofthe human body or organs, and analysis of thecollected material. As a result of this stage,some characteristics that influenced the nextphases of the development process wereestablished. It was decided that the applicationsshould contain a dynamic VE with two modeledobjects: one for representing the human organand another for representing the medical instru-ment. Furthermore, functionalities such as ster-eoscopy, collision detection, and deformation

should be included. The use of a DBMS wasnecessary to store all data from the objects andthe generated applications; therefore, the main-tenance of the applications could be performedeffortlessly. Other established points were thedevelopment of a graphic interface to assist theinstantiation and the decision that the classstructures should be prepared for a futureintegration of non-conventional devices, oncethey were not available in the initial version.

(b) Step 2, architecture design: the framework’sarchitectural project was designed based on thedomain analysis model. Its purpose is to map ageneral overview of ViMeT as shown inFigure 2. This diagram shows the types ofViMeT instantiation, which can be performeddirectly from ViMeT or through the ViMeT-Wizard tool and the databases that store theobjects modeled and the applications generatedby ViMeTWizard.

(c) Step 3, framework design: the purpose of thisstage was the building of the class diagramforeseen for the framework (Fig. 3). This is apreliminary design projected to consider theinsertion of new classes, which corresponds tonew functionalities that can be developed toincrease the framework in the future. Thestarting point of this phase was an analysis ofthe source codes, documentation, and interfaceof previously developed applications. It was

Fig. 1. Methodology Flowchart of ViMeT Building.

Fig. 2. ViMeT’s Architectural Project.

BUILDING A OPEN SOURCE FRAMEWORK FOR VIRTUAL MEDICAL TRAINING 709

Page 5: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

foreseen the reuse of three developed applica-tions (deformation, collision detection, andstereoscopy), each one with an interface and itsown methods to import objects (Fig. 4a, b, e andc). Each application is detailed as follows. Thedeformation appears in VR applications in orderto provide greater realism to the environmentsthat contain flexible objects. The change inobjects is necessary as an answer to the inter-action of the user. The ideal procedure is that thedeformation occurs in real time by replacing theobject vertices considering new positions andachieved by mathematic equations.1 Meanwhile,ViMeT provides the mass-spring technique,based on laws of Physics, which allows thereformulation of flexible objects using the con-cept of mass nodes connected by springs.27

Detecting a collision is to verify the momentwhen there is a sufficiently small approximationamong the objects in a VE in order to cause asuperimposition among them. An applicationpreviously developed1,4—and reused in ViMeTprojects—provides a procedure to detect colli-sions from the refining of the BoundingBox and

BoundingSphere (BS) methods used by Java3DAPI.19 Stereoscopy is related to the ability ofseeing in three dimensions, i.e., to notice depth.1

The anaglyph technique was performed in areused application in the ViMeT project.4 Thistechnique enables depth information using a pairof images in different colors (red and blue) thatcorrespond to two perspectives of a same objectvisualized by the same-colored lenses of a pair ofglasses, whose function is to filter the images. Inthis stage of the development process, a com-prehensive analysis of the source code of eachapplication was conducted, and it was found thatsome parts of the source code should begeneralized in order to be used in the framework.However, other parts could not be alteredbecause they represented the particularities ofeach application.

(d) Step 4, implementation: this step was con-ducted considering the architectural design(Fig. 2), the class diagram (Fig. 3), and thethree previously developed applications. Thisphase was divided into nine activities presentedas follow:

Devices

GloveHaptic

Environment

Light

DefObj

RigObj

3DObject

Deformation

MassSpring

FiniteElement

FreeFormDeformation

Collision

Octree

E_collide

Hybrid Method

Stereoscopy

Anaglyph CromaDepht

DatabaseInterface

DatabaseManipulation

Parameters Neighbors

ViMeT

Wizard

Fig. 3. ViMeT’s class diagram.4

710 DE OLIVEIRA AND MARQUES

Page 6: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

Y Virtual environment creation: the super classVirtualUniverse of the Java3D API 22 was used,which allows the creation of more generic VEsand provides a structure for the insertion of 3Dvisualization devices and for manipulation. Theuse of such class provides more flexibility to theVR frameworks implemented in Java because itallows the developer to define the necessaryparameters for the VE configuration: objectspositioning, 3D visualization, and use of devicesfor interaction.

Y Synthetic 3D objects load: its purpose was tostandardize the method of importing 3D objectssince there is the need to make the vertices andedges available to some objects to be deformable.

Y Integration of the deformation procedure: thisactivity was performed so the result andperformance would be similar to the originalapplication.4 After extracting the parts of thesource code from the original application, testswere carried out in order to verify whether thefunctionalities in ViMeT presented the samebehavior that was observed in the originalapplication.

Y Integration of the collision detection procedure:as in the previous activity, some parts of theoriginal application were used after eliminatingparts of the source code related to the interfaceand interaction. Thus, a comparison with theoriginal application was conducted to confirm ifits functionality in the framework was similar.

Y Integration of the stereoscopy procedure: thisimplementation dealt with the visualization ofobjects in the VE. In order to guarantee theViMeT flexibility, stereoscopy is an optionalfunctionality in the generation of an application.

Y Elaboration of the scene graph: this activity wasdeveloped simultaneously with the implementa-tion of the aforementioned phases. The scenegraph is an organized hierarchic structure of theobjects that compose and define a scene, thuspreserving the relationships among them. Theseobjects refer to the geometry and its propertiesand to the necessary information for the render-ing of a particular point of view.21 Figure 5presents the scene graph for an application withstereoscopy created using ViMeT. The Groupnodes are called BranchGroup (BG1 to BG5),and their function is to contain the objects thatcan be dynamically inserted or removed fromthe scene in run time. The TransformGroup

Fig. 4. Interfaces of the original applications: a deformation, bcollision detection, c stereoscopy.

BUILDING A OPEN SOURCE FRAMEWORK FOR VIRTUAL MEDICAL TRAINING 711

Page 7: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

nodes (TG1 to TG9) are responsible for allowingchange in position, orientation, and size of thevisual objects in the VE. Every node is associatedto the MyLocale node in run time. The function ofthe MyLocale node is to control the positioning ofobjects in the VE, and all the other nodes areattached to it. The Leaf nodes (ShapeDef, Shape-Rig, ViewPlataform, and L) represent sceneproperties such as geometry and light, whilethe NodeComponent nodes (L1, L2, appearance,and geometry) are responsible for specifyingthe properties of an object. The other objects(View, Canvas3D, Screen3D, PhysicalBody, andPhysicalEnvironment) represent classes responsi-ble for visualization, VE location, and userposition in the VE, respectively.

Y Generalization of parameters: one of the diffi-culties in implementing classes to a frameworkis making them sufficiently generic to ensure anefficient instantiation. In ViMeT, the function-alities receive values from parameters that canbe registered in a database in order to allow themaintenance of new applications or the generationof new applications from one previously createdby using the framework.

Y Database integration: this activity involved thedevelopment of a database to store all data ofthe modeled objects and generated application,as mentioned before. The DBMS Derby19 wasused, which is developed in Java; thus, theintegration process of the ViMeT becomes easier.

Y Instantiation tool building: in this activity, theViMeTWizard tool was developed simultane-ously to the ViMeT development. This toolmanages the instantiation of classes and methods,as described in “METHODOLOGY.”

(e) Step 5, tests: in parallel to the implementationphase, the testing phase was performedthrough the direct instantiation of classes(white box) and by the ViMeTWizard tool(gray box). In this step, the tests wereconducted in order to prove the developmentfacilities using the Java programming languageand API Java 3D. During each activity, newapplications were created in order to exercisethe implemented code, thus enabling to verifyits accordance with the requirements. The goalof the tests conducted was to verify and provethe flexibility of the ViMeT. For that, several

Fig. 5. Scene Graph generated by ViMeT (application with stereoscopy).

712 DE OLIVEIRA AND MARQUES

Page 8: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

applications were developed, for instance, anapplication varying the number of function-alities (deformation, collision detection, andstereoscopy), the number of vertices andedges, modeled objects, and the parameters’values (scale, rotation, translation, mass, parallax,and others). The application was executed, henceverifying the computer and visual performance ofthe generated application. The behavior of eachfunctionality related to the different parameterswas also evaluated.

(f) Step 6, documentation: a Cookbook was builtin the documentation phase. This is a documentto assist in the use of ViMeT and ViMeTWizard,where the main classes and methods aredescribed. Furthermore, the javadoc documenta-tion was developed, a standard used by Sun,which presents every hierarchic structure ofsuper and subclasses. The cookbook consists ofa ViMeT installation manual, also explainingdetails about the configuration of the DBMSDerby’s database. In addition, it contains adetailed explanation of how to store a modeledobject, alter a generated and stored application,how to use the ViMeTWizard, and develop anapplication through the ViMeT’s class packages.The documentation of the ViMeT allows theprogrammer to have a clear view of the ViMeT,and therefore, it is possible to use it in thedevelopment of several applications. This infor-mation is available at http://www.each.usp.br/lapis/vimet.

The ViMeTWizard Tool

The ViMeTWizard is a tool developed tomake theViMeT instantiation easier. The interface was devel-oped with guides in order to facilitate the visual-ization of the functionalities and their parameters.Using the interface, the user can select the

objects that represent human organs and medicalinstruments, define the objects’ characteristicsrelated to the scale, translation, and rotation, as wellas to define which functionalities will compose theapplication.After choosing the characteristics and the

objects, the system creates the VE, generates andcompiles the source code, thus creating a finalapplication. Every selected characteristic is stored

in the database for future changes or review. Fromthe available source code, the user can includecertain particular characteristics, hence generatinga derived application. Figure 6 shows the develop-ment of an application and presents the “Loader”guide, in which the user can choose the objects orload an existing application and then modifyparameters, such as scale, translation, and rotation.The development of the ViMeTWizard demanded

the use of a DBMS to store the data of the modeledobjects and generated applications. In order tofacilitate the instantiation of the ViMeT classes,the DBMS should be simple; thus; the Derby waschosen because it constitutes a simple Java API.Besides, it is an open source software, which allowsdeveloping a low-cost application and source codeaccess.The database has two tables for data persistence.

The first one, named OBJECTS, stores data of the3D modeled objects, which can be representations ofhuman organs (for instance: breast, leg, arm, andothers) or medical instruments used in training(needle, syringe, scalpel, among others). The secondone, named APPLICATION, is used to store data ofthe applications generated for later maintenance.

CASE STUDIES AND DISCUSSION

The expected results of a framework are thereuse of classes in order to generate new applica-tions, simple development, in addition to guaran-teeing that the applications comply with therequirements defined in the domain analysis. Asaforementioned, there are two ways of using theViMeT: direct instantiation of the classes andinstantiation through the ViMeTWizard. The“white-box” instantiation9 was chosen for themanual use and the “gray-box”9 for instantiationusing the ViMeTWizard. The manual instantiationuses the ViMeT classes straightforwardly, and thedeveloper can implement new functionalities, asdeemed necessary. In the gray-box manner, theinstantiation is automatic because the ViMeTWi-zard executes it. In order to verify the results, fivevirtual objects were selected: two referring tomedical equipment (a needle and a syringe) andthree representing human organs (a breast, a leg,and a buttock) as determined in the domainanalysis.

BUILDING A OPEN SOURCE FRAMEWORK FOR VIRTUAL MEDICAL TRAINING 713

Page 9: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

Combinations were performed among theseobjects, with a variation of size and localizationparameters in the VE, selection of functionalities,and parameters inherent to the each developedfunctionality. It is important to point out that thiscombination and the parameters variation generatedifferent applications.Figure 7 shows examples of applications gener-

ated using the ViMeTWizard tool. Figure 7a presentsan application with an object simulating one breastand a thin-needle syringe, including the function-alities of deformation, collision detection, and stereo-scopy. Figure 7b shows an application with an objectsimulating the buttocks and using the same syringeof the previous case, and the functionalities usedwere deformation and collision detection, whileFigure 7c shows an object simulating a leg with alarger number of vertices and edges. The function-alities used were deformation and collision detection.Figure 8 presents an application generated

directly from the manual instantiation of theViMeT classes; it used an object simulating abreast and another one simulating the medical

instrument, considering the functionalities ofdeformation and collision detection.Figure 9a exhibits an application generated with

the assistance of the ViMeTWizard. Figure 9bshows the source code generated by the tool.From the ViMeT development and the obtained

results, some observations related to the faceddifficulties, solutions, and contributions of ViMeTare pointed out. First, it was possible to notice thatthe methodology used25 did not foresee the use offinished applications. The difficulties found forthis point were regarding the standardization of theloader methods, the interaction and interface ofeach one of the three reused applications, and thelack of documentation. Therefore, we realized thata previous planning should be conducted when theteam intends to reuse source code from previouslydeveloped applications. This is necessary becausedifferent programmers use different ways of writingand documenting their codes. If a standardization isnot established for all applications, substantial effortto adapt the code to the framework is necessary, aswas the case for the ViMeT project.

Fig. 6. ViMeTWizard Interface with an example of an application development.

714 DE OLIVEIRA AND MARQUES

Page 10: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

In the VR area, particularly, it is interesting to havea standardization in the definition of the VE and inthe building of the scene graph, using the samemethods to import and create the interaction with thevirtual objects. Regarding the documentation, it isextremely important to build it in a clear andobjective manner, without ambiguities, and prefera-bly using tools that assist in the standardization.Using the Java language—the case of the presentproject—a good standardization is offered whenjavadoc is used because it is already well establishedin the users’ community of this language.Another interesting difficulty is the definition of

technical questions, like the choice of the best type of

VE, the best method to load objects, as well as thebest ways for the VE interaction. An in-depth researchof these questions and solutions were conducted withthe Java language as background. The choice shouldconsider flexibility features and simple integration.Then, we opted for the VirtualUniverse for the VE,Object File for the loader, and Sensor Class for theinteraction. With these definitions, the ViMeT pro-vides user flexibility, without which the developerhas to worry about these questions related to the basicenvironment of creation.The used methodology is very suitable to assist

the mentioned standardization process and thecorrection of errors because it allows for adaptationsin its stages. Therefore, it offers the possibility ofchanging the project during the implementation, butit has a testing stage, parallel to the entire process thatenables discovering and correcting errors easily, inthe course of any development phase.Another important issue is that an object

orientation allows the development of frameworksin the VR area, making possible faster applicationsinside a specific domain, hence providing betterquality. ViMeT was built in order to act as astandard for the development of new applications.From now on new functionalities must be imple-mented as part of a bigger project rather thanisolated applications. The current results allowfuture developers to focus only on the implemen-tation of new functionalities once the ViMeTalready provides the interface and the VE. Thus,the time spent with the development of futureapplications can be better used in the specificobjectives of each application.

Fig. 7. a–c: Applications developed through ViMeTWizard(gray box).

Fig. 8. Application developed directly from ViMeT’s classes(white box).

BUILDING A OPEN SOURCE FRAMEWORK FOR VIRTUAL MEDICAL TRAINING 715

Page 11: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

It is important to point out that ViMeTWizardfacilitated the ViMeT instantiation for the alterationsof the parameters, showing that the manipulation ofthese parameters in the database is simple and doesnot imply in performance loss. The generated sourcecode can be adapted by developers accustomed tousing the Java programming language to customize

new applications, and the application generatedthrough ViMeTWizard can be generated as manytimes as the user desires, until the expected result isobtained.In this manner, themain advantages verified for the

ViMeT are the simple and quick manner to developnew applications in the framework’s domain, the

Fig. 9. a) Example of application development in the ViMeTWizard and application results. b) Source code generated by ViMeTWizard.

716 DE OLIVEIRA AND MARQUES

Page 12: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

possibility of manipulating the applications, and theeasy integration of new classes representing newfunctionalities and interaction techniques.Among the mentioned methodologies, the chosen

one contains a testing phase that assists the soft-ware’s development with quality, in addition to thefact that it seems to be like the standard developmentof an object-oriented software for documentation.Finally, it is important to show a comparison of

ViMeT’s characteristics with other VR frameworksmentioned in “OBJECT-ORIENTED FRAME-WORKS AND VR FRAMEWORKS.” Table 1shows their main features. It is possible under-standing that ViMeT is the only one that joins twoimportant characteristics: open source, also includinga free DBMS, and multiplatform. The use of Javalanguage makes the application intrinsically multi-platform, so the programmer does not need to knowwhich is the execution environment. It is important tostress that none of them uses an automatic instantia-tion tool, except for ViMeT. On the other hand, thiscomparison highlights some aspects of the ViMeTthat must be improved in the future: offering otherfree BDs and extension of domain.

INTEGRATION OF THE VIMET WITH OTHERPROJECTS

The ViMeT framework, as previously mentioned,is not a finished project, in view of the fact that it isrelated to a research field that requires high degrees

of realism and accuracy, ViMeT is integrated withother projects: (a) simulation of 3D objects, (b)interaction module, and (c) evaluation by doctors andmedical students.In relation to the first one, in parallel to the

building of the ViMeT, a 3D simulation systemusing image processing and VR techniques weredeveloped aiming at extracting the shape andmeasures from 2D images from a mammography.28

The second project is related to a system thatincludes classes in the ViMeT to allow interactionby using dataglove and haptic devices. The thirdproject is for the evaluation of generated applications,which will be detailed as follow.After the interaction module integration, the

generated applications were evaluated by healthprofessionals and a computer professional (volun-teers for the tests) through training simulationsusing conventional (mouse and keyboard) andnon-conventional (dataglove and haptics) devices.Examples of simulations using non-conventionalequipments are shown in Figures 10 and 11. Thetask requested to the users was to manipulatethe virtual medical instrument until a collision withthe virtual human organ was detected by thesystem. A list of questions was used to collectinformation [29] about the applications, devices, andsensations that the users noticed in the simulations.In this evaluation, objects considering two ways

of texture were available (Fig. 12). The first modelused texture composed by colors, and the secondone used a file in JPEG format added to the

Table 1. Comparison between ViMeT and other VR Frameworks

Frameworks Compared features

Way the reuse Were designpatterns used?

WereComponentsused?

Programminglanguage

DBMS Platform Domain

Avango White-box No No C++ eScheme

No Linux and IRIX Distributed applications

SSVE White-box No No C++ No Windows, IRIX,Linux, andSolaris

Dynamic and collaborativegroups

IVORY White-box No No Java SQL, DB2 eDbase

Multiplatform Visualization of Physics-based data

Basho White-box No No C++ No Linux and MacOSX

VE which supportsdifferent renderings

SOFA White-box No No C++ No Windows andMac OS

Medical simulation inreal time

ViMeT White-box andGray-box

No Yes Java andAPI Java3D

Dervy Multiplatform Biopsy exams simulation

BUILDING A OPEN SOURCE FRAMEWORK FOR VIRTUAL MEDICAL TRAINING 717

Page 13: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

wireframe object. However, the users consideredthat the objects with textures presented moredifficulty to manipulate and to notice a sense ofdepth. Therefore, for the following tests, it wasdecided to maintain only the wireframe objects. Aresearch about more suitable textures is currentlybeing conducted, and this question will be improvedin future versions of ViMeT.As described by Correa et al.,28 the volunteers

had difficulties mainly with the mouse and hapticdevice because of the type of task requested. Thesuggestions given by the volunteers were veryimportant to define ways for improving the ViMeTand for the building of other frameworks of thisnature or medical applications. One of the mainchanges brought about from this evaluation is themodeling of objects. Users considered that a morecomplex object representing the human body couldbe better to provide the spatial localization. As aresult, new objects were built, as shown in

Figure 13. These objects consider other layersbesides the surface used before. As can beobserved, they include inner structures like anodule and breast ducts. The volunteers believethat VR systems can help in the medical trainingthat is used in several procedures.

CONCLUSION AND FUTURE WORK

This paper presented the development processof an OOF for medical training using VRtechniques, including deformation, collision detec-tion, stereoscopy, and VE dynamic. One of therequirements during the ViMeT development wasa structure of classes that allowed the integrationof new functionalities and other interaction devi-ces. Such purpose was achieved with the help ofthe objected orientation paradigm using Javaprogramming language and the Java3D API. Thus,it was confirmed that the use of a framework couldavoid the dependency of a single developer. TheJava 3D API also allowed the reduction of thenumber of classes because it enabled the buildingof a hierarchic structure of classes composed bysuperclasses, subclasses, and methods that facilitatedthe implementation of VEs considering a number ofalready foreseen functionalities.

Fig. 10. Example of simulation using haptic device.

Fig. 11. Example of simulation using dataglove.

Fig. 12. Examples of objects with textures: a) Texture usingcolors, b) Texture using an image in JPEG format.

Fig. 13. Example of the more complex objects: a) breastwithducts and others tissues; b) breast with nodule.

718 DE OLIVEIRA AND MARQUES

Page 14: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

It was noticed that, in addition to the concern ofbuilding an OOF, there is a great concern withregards to the classes hierarchy imposed by the scenegraph structure, which contributed to the general-ization of parameters, to transforming the objectswhich became dynamic, as well as the addition andremoval of the objects in the VE.The applications can be generated using the

ViMeTWizard innumerable times until the expectedresult is achieved. Another question was about theperformance of the applications generated throughViMeT; however, it was verified that the perform-ance is not altered by the amount of functionalitiesbut by the structures of the modeled objects.It is important to highlight that, although only

biopsy exams case studies were considered,ViMeT classes can be reused in the development ofmedical training applications in several domains. Bythe direct instantiation, it is possible to use them inVR applications that belong to other domains and,thus, expand the use of the presented framework.According to the results obtained in case

studies, it can be verified that ViMeT’s perform-ance is highly satisfactory and that every resultexpected with its implementation was achieved.Initial demonstrations for medical professionalsshow that the tools have full potential to beincluded in medical teaching in a near future.Nevertheless, it was verified that the generatedapplications are at a beginning stage and cannot beapplied to the practice of medical teaching for awhile. In this version, only wireframe objects wereincluded in order to verify the correction of theimplemented functionalities. Nowadays, newobjects considering textures and the internalcomposition of the human organs are under study.The deformation process has also been modified inorder to consider the full composition of objects.Meanwhile, this question does not involve theimplementation or change in ViMeT but only theacquisition or modeling of more suitable objects.The 3D simulation mentioned in “INTEGRATIONOF THE VIMET WITH OTHER PROJECTS” isan initial effort to solve this question. Thus, morerealistic applications can be obtained after theimplementation of the current studies.Although the ViMeT framework has some

aspects to be improved, the generated applicationsshowed that the use of VR application can bepromising to become cheaper, motivating, andmore effective as medical training for students. In

addition, the procedure can be repeated countlesstimes without injuring patients until the studentacquires the desired ability.

ACKNOWLEDGMENTS

We would like to thank the financial support of CNPq.

REFERENCES

1. Oliveira ACMTG, Pavarini L, Nunes FLS, Botega LC,Justo DR, Bezerra A: Virtual reality framework for medicaltraining: implementation of a deformation class using Java. In:ACM SIGGRAPH international conference on virtual-realitycontinuum and its applications in industry, 2006, Hong Kong.Proceedings, Nova York: ACM Press, 2006, pp 347–3512. Liu A, Tendick F, Cleary K, Kaufmann C: A survey of

surgical simulation: application, technology and education, vol.12. Cambridge: MIT Press, 20033. Basdogan C, Sedef M, Harders M, Wesarg S: VR-based

simulators for training in minimally invasive surgery. IEEEComput Graph Appl 27(2):54–66, 20074. Nunes FLS, Oliveira ACMTG, Rossato DR, Machado

MIC: ViMeTWizard: Uma ferramenta para instanciação de umframework de Realidade Virtual para treinamento médico. In:XXXIII Conferencia Latinoamericana de Informática, 2007,San José. Proceedings , 2007, v. 1, p. 1–8

5. Sourin A: Virtual orthopedic surgery training. IEEEComput Graph Appl 20:6–9, 2000

6. Burdea G, Patounakis G, Popescu V, Weiss RE: Virtualreality-based training for diagnosis of prostate cancer. IEEETrans Biomed Eng 46(10):1253–1260, 1999

7. Balaniuk R, Costa I, Melo J: Cosmetic bresat surgerysimulation. VIII symposium on virtual reality, pp. 387–396

8. Costa R, Carvalho L: The acceptance of virtual realitydevices for cognitive rehabilitation: a report of positive resultswith schizophrenia. Comp Methods Prog Biomed 73(3):173–1829. Fayad M, Johnson R, Schmidt D: Building application

frameworks: object-oriented foundation of frameworks design,Nova Iorque: Wiley, 199910. Gamma E, Helm R, Vlissides RJR: Design patterns:

elements of reusable object-oriented softwareReading: Addison-Wesley, 199511. Greenleaf W: Medical Applications of Virtual Reality.

Available at http://www.greenleafmed.com/publications/VR%20Med%20overview.pdf. Accessed Nov. 2005, 200412. Tramberend H: Avango: A Distributed Virtual Reality

Framework. In: Proceedings, Afrigraph '01, ACM, 200113. Linebarger JM, Janneck CD, Kessler GD: Shared simple

virtual environment: an object-oriented framework for highly-interactive group collaboration. In: Proceedings, 7th IEEE DS-RT Conference, 2003. pp 170–180. Available at http://www.cse.lehigh.edu/~dkessler/Publications/LinebargerDS-RT2003.pdf. Accessed 9 Sept 200514. Sprenger TC, Gross M, Bielser D, Strasser T: IVORY -

An Object-Oriented Framework for Physics-Based InformationVisualization in Java In: Proceedings of the IEEE Symposium

BUILDING A OPEN SOURCE FRAMEWORK FOR VIRTUAL MEDICAL TRAINING 719

Page 15: Building a Open Source Framework for Virtual Medical Training · 2019. 5. 11. · Souza/FATEC Garça, 2331 Presidente Vargas Av. Garça, São Paulo, 17400-000, Brazil. 2From the Escola

on Information Visualization (InfoViz'98), IEEE CS Press,1998, pp 79–8615. Hinkenjann A, Mannub F: basho—a virtual environment

framework. In: Proceedings VII Symposium on Virtual Reality.São Paulo: SBC–Brazilian Computer Society, 2004, pp 344–34616. Allard J, Cotin S, Faure F, Bensoussan PJ, Poyer F,

Duriez C, Delingette H: SOFA—an open source framework formedical simulation. In: Proceedings, MMVR, 2007.17. Sun. The JavaTM Tutorial. Available at http://java.sun.

com/docs/books/tutorial. Accessed June 200618. Sun (2007) Java 3D API Tutorial. Circulation electronic

pages: available at http://java.Sun.com/developer/onlineTraining/java3D19. Apache. Apache Derby Tutorial. Available at db.apache.

org/derby/papers/DerbyTut/index.html20. 3D Studio Ma: Autodesk 3ds Max, Home page.

Available at http://www4.discreet.com/3dsmax, Accessed Nov.2006.21. Jude. UML Modeling Tool. Available at http://jude.

change-vision.com/jude-web/product/community.html. Accessedset. 200822. Pree W: Building application frameworks: object-oriented

foundations of framework design, NewYork: Wiley, pp. 379–393,1996

23. Schmidt HA: Framework design by systematic general-ization. In: Fayad M, Johnson R, Schmidt D. Buildingapplication frameworks: object-oriented foundation of frame-works design. New York: Wiley, 1999, pp. 353–378

24. Roberts D, Johnson R (1996) Evolving frameworks: apattern language for developing object-oriented Frameworks.In: Proceedings of Pattern Languages of Programs, Illinois,1996.

25. Bosch J, Molim P, Mattsson M, Bengtsson P, Fayad ME(1999) Building application frameworks: object-oriented founda-tions of framework design. New York: Wiley, pp. 55–82.

26. Choi KS, Sun H, Heng PA, Cheng JCY (2002) ScalableForce propagation approach for the web-based deformablesimulation on soft tissues. In: Proceedings, Web3D’02 ACM,p.185–193, Fevereiro 2002.

27. de Oliveira ACMTG, Delfino SR, Nunes FLS: Integra-tion of a virtual reality framework with a 3D simulation system.In: 16th Medicine Meets Virtual Reality, 2007, Long Beach,California. Proceedings of 16th Medicine Meets Virtual Reality,2007

28. Correa CG, Nunes FLS, Bezerra A: Evaluation of VRmedical training applications under the focus of professionals ofthe health area. In: ACM-SAC Symposium on AppliedComputer, 2009, Honolulu. Proceedings of ACM-SAC 2009Symposium on Applied Computer, 2009

720 DE OLIVEIRA AND MARQUES