3D heart model for computer simulations in cardiac surgery

3D heart model for computer simulations in cardiac surgery

Computers in Biology and Medicine 37 (2007) 1398 – 1403 www.intl.elsevierhealth.com/journals/cobm 3D heart model for computer simulations in cardiac ...

644KB Sizes 2 Downloads 147 Views

Computers in Biology and Medicine 37 (2007) 1398 – 1403 www.intl.elsevierhealth.com/journals/cobm

3D heart model for computer simulations in cardiac surgery Primoz Trunk a,∗ , Jaka Mocnik b , Roman Trobec b , Borut Gersak a a Department of Cardiovascular Surgery, University Medical Center, Zaloska 7, 1000 Ljubljana, Slovenia b Department of Communication Systems, Jozef Stefan Institute, 1000 Ljubljana, Slovenia

Abstract For a satisfactory computer simulation, a model, which imitates a natural situation, is needed. The Human heart is an irregular 3D object and thus difficult to reproduce. Basic data was taken from Visible Human Dataset (VHD), National Library of Medicine. The heart area was cut out of the original cross-sections and different tissues segmented. All the slices also had to be aligned to assure precise overlapping of the structures. A 3D computer heart model with the resolution of 1 mm was designed. The heart model was dedicated to simulations of heat transfer during heart surgery however, it is applicable also to other medical simulations. 䉷 2006 Published by Elsevier Ltd. Keywords: Visible Human Dataset (VHD); Tissue segmentation; Heart; Computer simulations; 3D heart model

1. Introduction By exploiting the power of the parallel technologies currently available, it is possible to simulate both natural phenomena and experiments that would cost vast amounts of money, or those, that are ecologically problematic or dangerous for humans. Computer simulations in medicine are less expensive and faster than experimental studies. Performing in vivo experiments and measurements is often difficult, dangerous or even impossible, while simulation can provide insights into physiological processes without any harm. High performance parallel computers could lead to the improved analyses of different surgical techniques, for example various methods of heart cooling during the hypothermic cardiac arrest induced during open heart surgery, the prediction of temperature elevation following coronary artery occlusion, the interpretation of electrical cardiac signals and many other medical applications. High performance parallel computers provide the computational rates necessary for advanced biomedical computing [1]. The human heart is an irregularly shaped 3D object and thus difficult to represent as a computer model. In most scientific computing applications a physical system is represented by a mathematical model. The continuous physical domain has to be replaced by a discrete representation that is suitable for a ∗ Corresponding author. Tel./fax: +386 1 5222583.

E-mail address: [email protected] (P. Trunk). 0010-4825/$ - see front matter 䉷 2006 Published by Elsevier Ltd. doi:10.1016/j.compbiomed.2006.11.003

numerical solution. Usually, the physical domain is partitioned into many small subdomains by imposing a grid. Solving the mathematical model over a discretized domain involves obtaining the values of a certain physical quantity at every grid point for each time interval. A grid point is influenced only by the surrounding grid points, usually with a simple local rule. Each calculation step gives new values of the physical quantity for the next interval of the real time. The EFD (explicit finite difference) method that imposes a regular grid on the physical domain can be used for simulation of heat transfer in the heart during cardiac operation [2]. To get a 3D model of the heart that is intended for the computer simulations, accurate anatomical data, which can be digitalized properly, is needed. First attempts were made from a series of CT scans of the heart [3,5]. This heart model had very low resolution and only a limited number of structures could be denoted. Later, much more accurate anatomical data became available, as the National Library of Medicine issued the Visible Human Dataset (VHD) [4]. 2. Materials and methods 2.1. Tissue segmentation To get the 3D heart model, 156 consecutive slices of VHD were used. The Z direction represented the heart axis from the apex toward the base. It was necessary to guarantee the exact

P. Trunk et al. / Computers in Biology and Medicine 37 (2007) 1398 – 1403

1399

Fig. 1. A VHD cross-section and the heart area marked with the square. The circle on the top-right side was used for cross-sections alignment.

overlapping of all slices because of the integrity of the model. Before digitalization two reference points on every picture were marked in order to adjust all the data. Besides that, several impurities and other errors in the pictures (photographs) had to be discarded. Finally, the edges between different substances had to be determined. To perform all the above-mentioned actions, a standard software package for digital picture processing was used, and more specialized custom programs were also implemented. Fig. 1 shows the VHD cross-section through the human male thorax. The heart area, which is to be cropped, is marked. The selection of the appropriate set of cross-sections from the complete VHD, which include the entire heart, was implemented by VHD files numbered from 1350 to 1505. Then a cropping of the selected cross-sections was implemented in order to extract only the heart area. The size of the cropped picture was 512 × 512 pixels. The cropped picture with the heart area is shown in Fig. 2. It was noticed that all the cross-sections were not positioned correctly in the Z direction. Some picture elements had to be trimmed into the axial position of the crosssections. The small circle on the top-right side of each crosssection was selected for this purpose. A simple program found the center of this circle and with this, an absolute position on each cross-section. Then the tissue segmentation started. The most important and, in quantity, the most represented tissues in the heart are the myocardium, the adipose tissue and the pericardium. The heart chambers and the coronary vessels, which are normally filled with blood, also represent the great volume. To enable the computer to distinguish between these main different tissues, they were painted with six different colors, including the surrounding tissue, which was colored white. Adobe Photoshop 4.0 was used for the basic graphic manipulation of the slices. First, the pericard was painted with black color. Everything around the pericard not belonging to the heart was painted white and so excluded from the model. Then, all the heart chambers were painted in a similar way, the left atrium and ventricle with red and the right atrium and ventricle

Fig. 2. The cropped heart area.

with blue. The great vessels, originating from heart chambers were also painted with the same colors. They were all dark on the photographs and thus easily distinguished from neighboring structures. The wall of the great vessels originating in the heart chambers was also painted black, like the pericardium. The myocardium was clearly separable from other tissues and painted brown. Finally, the adipose tissue with the coronary vessels remained. The adipose tissue was white-yellow on the photographs and the blood vessels dark spots of different sizes in it. It was colored yellow and the coronary vessels green. The described procedure was implemented on each of the 156 crosssections, from the heart apex to the base. Cross-section 1450 as it appeared after processing and transformed in grayscale is given in Fig. 3.

1400

P. Trunk et al. / Computers in Biology and Medicine 37 (2007) 1398 – 1403

Fig. 3. X–Y cross-section No. 1450 with segmented tissues in the resolution of 512 × 512 pixels. Pericardium—black, myocardium—gray, arterial blood and coronary vessels—light gray, venous blood—dark gray, and fat—white.

Fig. 5. Cross-section of the 3D model of the human heart. Different tissues are marked in the same color scale as in Fig. 3.

After the final editing, all cross-sections were put together and the 3D model was generated. The resulting 3D model is given in Fig. 5. 2.2. Spatial editor

Fig. 4. Generated X–Z cross-section No. 50 and Y –Z cross-section No. 75 in the resolution of 146 × 151 cubes and 152 × 151 cubes. There are no errors left in tissue determination. The pericardium is closed and other tissues are also connected. The color scale is the same as in Fig. 3.

It was difficult to spot all the coronary vessels in one crosssection from the beginning, thus we segmented them separately. Every major vessel was followed from its origin in the aorta to the periphery as long as it was distinguishable from the surrounding tissue. The same was done with its branches. The 3D model of coronary vessels was later incorporated into the model of other tissues. The resulting painted cross-sections were rescanned in a resolution similar to that in the Z direction, which was 1 mm. Then they were put together into a 3D model of the heart. Now all the mistakes that were made in the 2D editing, especially those, where the drawing was done subjectively, could be seen. They were corrected on a series of Y –Z cross-sections that were derived from the 3D model. Finally, also the X–Z cross-sections were edited, to spot the mistakes that have not been seen in the X–Y and Y –Z planes. Fig. 4 shows the X–Z and Y –Z crosssection, generated from the 3D model, where final editing of the model was done.

This model was built from processed VHD cross-sections in such a manner that each pixel represented a cube in 3D space. Due to the high resolution of the original VHD picture, which was retained in further, cropped cross-sections, there were an enormous number of cubes or voxels in the 3D heart model. To minimize the number of objects, the cubes that are fully obscured have been extracted and eliminated in the graphical presentation. Additionally, identical neighboring cubes have been represented as a single larger object. The number of objects still remains too large to allow a smooth interactive work and rendering of the model in less powerful computers; therefore, the redisplaying of the 3D model is done only upon user request (Fig. 6). The editor can display any of six different tissues or all of them in a selectable portion of the 3D model. The selected portion of the heart can be rotated and zoomed in and out in order to note all the desired details. The selected cross-section is shown in the 3D view window as a semi-transparent plane. Model can be corrected on a set of three 2D windows that allow the simultaneous display of the three consecutive cross-sections: previous, selected and next. Drawing is possible on the selected cross-section with brushes of various sizes in any of the six tissue colors, which correspond to adding/removing portions of a tissue to/from the crosssection. The position of the actual brush is shown in all three sections. Any change on the selected cross-section can be done with the insight, how this change will affect the preceding and succeeding cross-sections. Immediately after a change is made

P. Trunk et al. / Computers in Biology and Medicine 37 (2007) 1398 – 1403

1401

Fig. 6. Typical 3D editor environment. Selected portion of the 3D model and three 2D editing windows.

in the 2D window, it is also applied to the 3D model, keeping it consistent with actual changes on the selected cross-section. The editor also contains some tools for automatic editing of the 3D models. It enables the reduction of the model size by a factor n in all directions and repair of eventual small openings or discontinuities in the selected tissue by adding small portions of missing tissue onto the corresponding cross-sections. 3. Results A 3D model with a resolution of 512×512 pixels in the X–Y plane and with a resolution of 1 mm (156 cross-sections) in the Z direction was produced. Any of six main tissues in the heart can be selected and drawn in 3D space. The heart model can be rotated in all directions and zoomed in and out. This model is intended for use in graphic presentations and anatomical studies or simulations. The entire volume of the human heart is covered (Fig. 7). 4. Discussion During tissue segmentation we found some problems regarding the desired high precision of the heart model. Due to the high resolution of VHD cross-sections, we wanted to retain the details of the heart structure as much as possible. This was also desired from the aspect of further planned computer simulations. The accuracy of simulations relies on the resolution of the model, which serves as the substrate for the simulation. It was impossible to distinguish between the epicard and pericard on the photographs, therefore we did not differentiate between these two tissues. The wall of the great vessels originating in the heart chambers was also painted black, like the pericardium. The thermal properties of the connecting tissue in the vessel wall are more similar to the pericard than the blood in the

Fig. 7. 3D model of heart chambers and coronary vessels in the resolution of 146 × 152 × 156 cubes with an approximated cube edge length of 1 mm.

vessels. Myocardial tissue contains several layers of muscular fibers, which run in different directions. This influences heat propagation through this tissue, but these layers could not be distinguished on the original cross-sections. Thus, the myocard is presented as a homogenous mass of muscular tissue. The left ventricle, usually much larger in the working heart, is quite

1402

P. Trunk et al. / Computers in Biology and Medicine 37 (2007) 1398 – 1403

small in our model and looks like a fissure. On the contrary, the right ventricle is huge and round shaped. The endocard, which normally lines the entire interior, is microscopically thin, so it could not differentiated in this model. Sometimes it was quite difficult to decide where to draw the border between the two tissues because of similar pixel color. In such cases the borders were drawn subjectively according to anatomy knowledge of the drawer. The main problems were in the area of pulmonary vessels at the base of the heart. Some parts of them, usually the upper and the lower part, were missing on the segmented cross-sections. This happened because the process of segmentation was done in the direction from the heart apex to the base. These vessels were recognized only when they were connected with the heart chambers and missed in some earlier and later cross-sections from the beginning. Also, the pericardium was discontinued in some places, particularly on the posterior surface of the heart, because it was not distinguishable from the color of surrounding tissues on the posterior side of the heart. In that case, the border of the heart tissue was drawn subjectively with some variations in consecutive cross-sections. These problems were the main source of errors made during tissue segmentation that had to be corrected later in other planes, generated from the 3D model. Also some problems arose with the small coronary vessels. The left and right coronary arteries, the circumflex artery and the largest veins are visible and one can follow such vessels from their origin to the periphery. On the periphery, coronary arteries and veins sometimes lie in close proximity and look like one large vessel. Some vessels did not have a uniform course in the 3D view. There were also some discontinuations, which occurred because they were not recognized on every cross-section and were omitted on some of them. There are also some artifacts, such as spots painted on some cross-sections as vessels, but actually not corresponding to vessel tissues. They look like a single pixel or group of pixels apart from the coronary vessels. Thus, the coronary vessel system was segmented separately as described above. All mentioned mistakes in the generated spatial heart model had to be corrected, either manually or automatically, by a computer program. It is very difficult to imagine the failures in space or to see their relationship to other tissues in space. It was expected that a kind of 3D editing would be of great help in improving the spatial heart model. The primary goal in designing the spatial editor was to allow the user to easily spot and correct the smaller failures in the generated 3D models. The spatial editor also allowed some automatic modifications of the 3D model. One of them is the reduction of the model size by a factor n in all directions. Portions of the input model made of n × n × n pixels were taken and replaced by a single pixel in the output model, representing the tissue most common in the reduced portion. Another function can find eventual small openings or discontinuities in the selected tissue (exposing other tissues) and repair them by adding small portions of missing tissue onto the corresponding cross-sections. In this way the small holes in the pericardium have been automatically filled.

Because the number of elements (cubes) of the model is large, the simulation of physiological processes requires great computational power of the computers. Such computers are not generally accessible. To run simulations on less powerful computers, the number of elements in the model was reduced to the resolution of 146×152×156 cubes with approximated edge length of 1 mm. If the computer power still remains a problem, the 3D model can be further scaled down to 73 × 76 × 78 or even 36×38×39 cubes. In these cases details in the simulation process are lost, but the results are still indicative enough to be useful for the surgeon. 5. Conclusion This paper presented some initial attempts and results connected with 3D modeling of irregularly shaped bodies. The basic data were taken from the VHD. New pre-processing and editing tools were developed in order to manage the spatial modeling. The resulting procedure is quite general and not too complicated. It can also be used in some other areas of medicine. We also discuss some technical problems we encountered during the tissue segmentation. This human heart model has so far been used for several computer simulation of heat transfer, described in details elsewhere [6,7]. It could also be used for the simulation of electrical cardiac signals [8] and other medical applications. The 3D model can be further improved with the inclusion of more different types of tissue, such as distinctly different myocardium layers and with some advanced functions for automatic 3D editing. 6. Summary In our time, computer simulations provide great help in research. For good simulation, a computer model, which imitates a natural situation as close as possible is needed. Human heart is a irregular 3D object and thus difficult to reproduce. In recent years, very accurate anatomical data is available, which made the construction of the human heart model possible. This model was intended for different simulations. Basic data was taken from the Visible Human Dataset (VHD), National Library of Medicine. The heart area was cut out of the original cross-sections as a square and all tissues in this square, not belonging to the heart were removed. Then all the different tissues in the heart had to be segmented—the left and right heart chambers, coronary vessels, myocardium, fat tissue and pericardium. They were painted with different colors. One hundred and fifty six cross-sections were processed from the heart base to the apex. All the slices also had to be aligned to assure precise overlapping of the structures. Finally all of the slices were put together and the 3D model was formed and some mistakes, seen on the 3D model were corrected. As a result, a 3D computer heart model with a the resolution of 1 mm in all dimensions was designed. The model is intended to be used for simulations of heat transfer during heart surgery or action potential propagation through the myocardium. It could also be used for graphical presentation or as a learning tool for heart surgery.

P. Trunk et al. / Computers in Biology and Medicine 37 (2007) 1398 – 1403

References [1] R.L. Martino, C.A. Johnson, E.B. Suh, B.L. Trus, T.K. Yap, Parallel computing in biomedical research, Science 265 (1994) 902. [2] J.D. Hoffman, Numerical Methods for Engineers and Scientists, McGrawHill, New York, 1993. [3] R. Trobec, B. Slivnik, B. Gersak, T. Gabrijelcic, Computer simulation and spatial modelling in heart surgery, Comput. Biol. Med. 28 (4) (1998) 393. [4] B. Gersak, T. Gabrielcic, R. Trobec, B. Slivnik, Temperature distribution in human heart during hypothermic cardioplegic arrest, Cor Europaeum 6 (1997) 172. [5] Visible Human Dataset, National Library of Medicine, Bethesda, 1997. [6] P. Trunk, J. Moˆcnik, G. Pipan, R. Trobec, B. Geršak, Visualization of computer simulated heart temperature during topical cooling, Pflügers Arch. 442 (6) (2001) R139. [7] P. Trunk, B. Geršak, R. Trobec, Topical cardiac cooling—computer simulation of myocardial temperature changes, Comput. Biol. Med. 33 (2003) 203. [8] F. Pinciroli, P. Valenza, E. Pozzi, Heart electrical activity visualized on the visible human, First Users Conference of the National Library of Medicine’s Visible Human Project, Bethesda, October 7–8, 1996. Primoz Trunk finished the medical school in University of Ljubljana, Solvenia in 2000. In 2001 he started postgraduate course in Biomedicine in Univeristy of Ljubljana. Since year 1996, he worked in Department for

1403

Cardiovascular Surgery, University Medical Center in Ljubljana. His research interests are in computer heart modeling and simulations, myocardial protection during heart surgery and aortic valve surgery. Jaka Moˇcnik received his B.S. in Computer Sciences from University of Ljubljana in 2001, and enrolled in a postgraduate course in CS at University of Ljubljana. As a student he worked part-time at the Jozef Stefan Institute, and then at various companies invoved in design and development of distributed systems. His research interests in CS include distributed systems, parallel computing, peer-to-peer networks and protocols, service-oriented architectures, and programming languages. Roman Trobec received his B.S, M.S and Ph.D. in Electrical Engineering from the University of Ljubljana. Since 1979 he has been with the Jozef Stefan Institute. Currently he is a principal investigator in the Department of Communication Systems. His group is involved in the design and development of parallel computing, computer simulations, medical data processing and digital transmission systems. Borut Gersak received his B.S, and M.S. and Ph.D. at Medical Faculty, University of Ljubljana, School of Medicine. Since 1986 he has been with the Department of Cardiovascular Surgery, University Medical Center, where he is an Associate Professor of Cardiovascular Surgery. His research interests extend beyond pure cardio-surgery to interdisciplinary approaches in surgery, biomedical engineering and computer simulations of procedures used in cardiovascular surgery.