Reconstruction of realistic three-dimensional models of biological objects from MR-images for the radiation therapy purposes A.V. Lebedeva1, V.V. Mamontova1 , S.A. Nemnyugin1, A.V. Komolkin1 1 Saint Petersburg State University, 7/9 Universitetskaya emb., 199034, St. Petersburg, Russia Abstract Magnetic Resonance Imaging (MRI) is one of the most widely used medical diagnostic techniques. Digital Imaging and COmmunications in Medicine (DICOM) is standard format to store results of MRI. In the paper methods of visualization of three-dimensional voxel models of human organs from data obtained using MRI are considered. These models may be used both in medical research and for planning of the radiation therapy treatment. The result of the work is a software package developed for medical physics research. Keywords: Magnetic Resonance Imaging; DICOM; biological system modeling; voxel volume model; 3D rendering 1. Introduction Efficient methods of reconstruction of realistic three-dimensional models of biological objects from medical images may be used both to improve quality of human’s life and for medical purposes. For example, they may be used for creating of tool detecting cancer which is one of the leading reasons of mortality [1]. Cancer should be treated on as early stages as possible, so its early diagnostics is extremely important. One of the most widely used techniques of diagnostics is magnetic resonance imaging (MRI). MRI allows imaging in three mutually perpendicular planes. A qualified specialist should have the ability to detect abnormalities in the structure of the body without surgery by viewing the individual images. Reconstructed realistic volume model with possibility of visual transformations makes analysis more efficient. Reconstructed from real tomograms 3D models may be also used for the purposes of computer simulation of processes of radio- and hadron therapy [2-3]. Usage of such models allows getting more reliable results taking into account personal features of the patient, so it should help to develop more rigorous treatment plans. In addition, technologies of augmented reality allow associate preoperative data with the current state of the organism, or to use them in real-time in the operations. MRI is based on the phenomenon of nuclear magnetic resonance. The patient is placed in a scanner which creates cross- sectional images of a human body or other biological object. MRI image should be analyzed and interpreted by physician. Tomographic survey results are stored in the file according to the medical industry standard DICOM 3.0 file [4]. This standard uses its own internal storage technology, so there is a need of efficient conversion of DICOM images to the volume geometrical model which may be used in diagnostics and simulation. 2. Reconstruction of volume models from DICOM files DICOM format (Digital Imaging and Communications in Medicine) is most universal standard in digital medical imaging. It should be supported by software tools for medical diagnostics and simulation. Metadata of patients and medical information are stored in DICOM format as objects with assigned attributes. The hierarchy of DICOM files is presented on Fig.1. Fig. 1. The hierarchy of DICOM files. DICOM objects and attributes have to be defined according to the DICOM Information Object Definitions (IOD). Patient IOD, for example, generally is described by name, medical record number (ID), sex, age, weight, etc. - any clinically relevant patient information. Formally the patient is a set of his attributes. DICOM includes creation of a list of standard attributes. The list is the main part of the DICOM Data Dictionary. DICOM dictionary allows to guarantee consistency of naming and handling attributes [5]. Numerical data are stored in binary format. The primary unit of DICOM is a Data Element (DM). DM includes four mandatory and one optional elements: Group Number, Element Number, Value Length, Value, Value Representation (optional). DICOM data also include tags. For example, if DICOM needs to search for either CT or MR studies it will search by the pattern string "CT \ MR". Information IODs register in the tags. For decoding of DICOM files and extracting both images and metadata there are specialized DICOM viewers. Some of the DICOM viewers provide opportunity to get only two-dimensional images. Such simplified form of visualization is sufficient to formulate diagnosis. More complete and rigorous method of visualization is reconstruction of volume model on the basis of combination of 2D images corresponding to different sections. It may be highly desirable to get not only the visual appearance of the object, but also associate with geometrical volume model its physical characteristics, such as tissue density, chemical composition and so on. 3rd International conference “Information Technology and Nanotechnology 2017” 293 Mathematical Modeling / A.V. Lebedeva, V.V. Mamontova , S.A. Nemnyugin, A.V. Komolkin Distance between successive sections in MRI images in general is greater than size of a two-dimensional pixel in the plane. Volume model is composed from voxels which are 3D generalization of plane pixels. Thus, the geometrical dimensions of the voxels in a volume model may be different in all three dimensions. In this case, the data element consists of voxels having a base corresponding to the size of the pixel which belongs to a plane and a height corresponding to the distance between section images. 3. Method of reconstruction of volume model Method of volume model reconstruction consists of the following steps: processing of the DICOM-file (extracting of metadata, extracting of 2D images and patient IOD), volume model reconstruction, 3D image rendering. 3.1. 2D Image Processing MRI data of each image section have to be converted to image in graphic png format. Color of every pixel is defined by the density of body tissue in the tomogram. In case of MRI DICOM file stores signal intensity. It is necessary to take into account additional information in tags "window width" and "window center" to get an array of densities. In our work algorithm proposed in [6] is used with simple transformation function. Results are presented on Figs.2-3. Fig. 2. Image of the brain. Fig. 3. Image of chicken carcass with MRI markers. 3.2. 3D Image Processing 3D reconstruction implemented by third-party packages has a number of shortcomings, including the specialized formats of output files and lack of information about algorithms of volume model reconstruction, so we realized 3D model reconstruction method in our own software package. From a set of different methods of 3D reconstruction the most common one - voxel-based volume model was used. In the model a voxel is not only a volumetric pixel, but it also contains a color value, generally corresponding to density of biological tissue. Reconstruction of 3D model is based on combining of section images. Distance between the images is defined by orientation of each image in space, as well as its spatial coordinates and thickness of each layer. Serious shortcoming of the voxel-based volume model is in large resulting data files. Processing of such files requires a lot of computer memory and CPU times. To reduce data to be processed in rendering it is necessary to show only those voxels that are not hid by others. 3D image processing is implemented with OpenGL Shading Language. It is high-level shading language with a syntax based on the C programming language. GLSL shaders represent a set of strings that are passed to the hardware vendor’s driver for compilation from within an application using the OpenGL API’s entry points. 4. Results and Discussion Algorithm of the volume model reconstruction from DICOM file was implemented with options of visual transformations of rendered image. Reconstructed models represent not only 3D geometry of biological object from MRI tomogram but they also 3rd International conference “Information Technology and Nanotechnology 2017” 294 Mathematical Modeling / A.V. Lebedeva, V.V. Mamontova , S.A. Nemnyugin, A.V. Komolkin store information on the density of tissues. Three-dimensional model of chicken carcass is presented on fig. 4. Other example is the image of the brain given on fig.5. Fig. 4. 3D rendering of of chicken volum mode based on MRI. Fig. 5. 3D rendering of reconstructed volume model of the head. 5. Conclusion Algorithms of the volume model reconstruction from MRI images in DICOM files were developed and implemented as software program. The program allows reading DICOM file and visualizing its content as two-dimensional image. Volume model could also be reconstructed. It may be rendered to present MRI results more completely. 3D model may be also used for simulation of interaction of the radiotherapeutic beam with tissues of human body or other biological object. It is necessary to optimize the operation of the program, for example, using HPC and parallel programming techniques. The program can be used both for medical purposes and for studies in medical physics. Acknowledgements The authors acknowledge the Physics Department of the St. Petersburg State University. Research was carried out using computational resources provided by the Resource Physics Educational Centre of the Research park of Saint-Petersburg State University. References [1] Office for National Statistics. URL: https://www.ons.gov.uk/ (25.05.2017). [2] Schardt D, Elsasser T. Heavy-ion tumor therapy: Physical and radiobiological benefits. Rev. Mod. Phys. 2010; 82: 383–425. [3] Kalatusha OA, Ruban OV, Nemnyugin SA. Computer Simulation Of Radiation Dose Absorption in Biological Specimens. Math. Mod. Geom. 2016; 4: 1: 41–50. [4] The DICOM Standard. URL: http://dicom.nema.org/standard.html (25.05.2017). [5] Pianykh OS. Digital Imaging and Communications in Medicine (DICOM). Springer-Verlag, First edition, 2008; 383 p. [6] C.11.2.1.2 Window center and window width. URL: https://www.dabsoft.ch/dicom/3/C.11.2.1.2/ (25.05.2017). 3rd International conference “Information Technology and Nanotechnology 2017” 295