6
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 cur- rently available, it is possible to simulate both natural phenom- ena 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 exper- iments and measurements is often difficult, dangerous or even impossible, while simulation can provide insights into physio- logical processes without any harm. High performance parallel computers could lead to the improved analyses of different sur- gical techniques, for example various methods of heart cool- ing during the hypothermic cardiac arrest induced during open heart surgery, the prediction of temperature elevation follow- ing coronary artery occlusion, the interpretation of electrical cardiac signals and many other medical applications. High performance parallel computers provide the computa- tional 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 obtain- ing 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 dif- ference) 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 com- puter simulations, accurate anatomical data, which can be dig- italized 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 Visi- ble 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

3D heart model for computer simulations in cardiac surgery

Embed Size (px)

Citation preview

Page 1: 3D heart model for computer simulations in cardiac surgery

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

3D heart model for computer simulations in cardiac surgery

Primoz Trunka,∗, Jaka Mocnikb, Roman Trobecb, Borut Gersaka

aDepartment of Cardiovascular Surgery, University Medical Center, Zaloska 7, 1000 Ljubljana, SloveniabDepartment 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 objectand thus difficult to reproduce. Basic data was taken from Visible Human Dataset (VHD), National Library of Medicine. The heart area wascut out of the original cross-sections and different tissues segmented. All the slices also had to be aligned to assure precise overlapping ofthe structures. A 3D computer heart model with the resolution of 1 mm was designed. The heart model was dedicated to simulations of heattransfer 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 cur-rently available, it is possible to simulate both natural phenom-ena and experiments that would cost vast amounts of money,or those, that are ecologically problematic or dangerous forhumans. Computer simulations in medicine are less expensiveand faster than experimental studies. Performing in vivo exper-iments and measurements is often difficult, dangerous or evenimpossible, while simulation can provide insights into physio-logical processes without any harm. High performance parallelcomputers could lead to the improved analyses of different sur-gical techniques, for example various methods of heart cool-ing during the hypothermic cardiac arrest induced during openheart surgery, the prediction of temperature elevation follow-ing coronary artery occlusion, the interpretation of electricalcardiac signals and many other medical applications.

High performance parallel computers provide the computa-tional rates necessary for advanced biomedical computing [1].The human heart is an irregularly shaped 3D object and thusdifficult to represent as a computer model. In most scientificcomputing applications a physical system is represented by amathematical model. The continuous physical domain has tobe 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 partitionedinto many small subdomains by imposing a grid. Solving themathematical model over a discretized domain involves obtain-ing the values of a certain physical quantity at every grid pointfor each time interval. A grid point is influenced only by thesurrounding grid points, usually with a simple local rule. Eachcalculation step gives new values of the physical quantity forthe next interval of the real time. The EFD (explicit finite dif-ference) method that imposes a regular grid on the physicaldomain can be used for simulation of heat transfer in the heartduring cardiac operation [2].

To get a 3D model of the heart that is intended for the com-puter simulations, accurate anatomical data, which can be dig-italized properly, is needed. First attempts were made from aseries of CT scans of the heart [3,5]. This heart model had verylow resolution and only a limited number of structures couldbe denoted. Later, much more accurate anatomical data becameavailable, as the National Library of Medicine issued the Visi-ble Human Dataset (VHD) [4].

2. Materials and methods

2.1. Tissue segmentation

To get the 3D heart model, 156 consecutive slices of VHDwere used. The Z direction represented the heart axis from theapex toward the base. It was necessary to guarantee the exact

Page 2: 3D heart model for computer simulations in cardiac surgery

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 weremarked in order to adjust all the data. Besides that, several im-purities and other errors in the pictures (photographs) had to bediscarded. Finally, the edges between different substances hadto be determined. To perform all the above-mentioned actions,a standard software package for digital picture processing wasused, and more specialized custom programs were also imple-mented. Fig. 1 shows the VHD cross-section through the hu-man male thorax. The heart area, which is to be cropped, ismarked.

The selection of the appropriate set of cross-sections fromthe complete VHD, which include the entire heart, was imple-mented by VHD files numbered from 1350 to 1505. Then acropping of the selected cross-sections was implemented in or-der to extract only the heart area. The size of the cropped pic-ture was 512 × 512 pixels. The cropped picture with the heartarea is shown in Fig. 2. It was noticed that all the cross-sectionswere not positioned correctly in the Z direction. Some pictureelements had to be trimmed into the axial position of the cross-sections. The small circle on the top-right side of each cross-section was selected for this purpose. A simple program foundthe center of this circle and with this, an absolute position oneach cross-section.

Then the tissue segmentation started. The most importantand, in quantity, the most represented tissues in the heart arethe myocardium, the adipose tissue and the pericardium. Theheart chambers and the coronary vessels, which are normallyfilled with blood, also represent the great volume. To enablethe computer to distinguish between these main different tis-sues, they were painted with six different colors, including thesurrounding tissue, which was colored white.

Adobe Photoshop 4.0 was used for the basic graphic ma-nipulation of the slices. First, the pericard was painted withblack color. Everything around the pericard not belonging to theheart was painted white and so excluded from the model. Then,all the heart chambers were painted in a similar way, the leftatrium and ventricle with red and the right atrium and ventricle

Fig. 2. The cropped heart area.

with blue. The great vessels, originating from heart chamberswere also painted with the same colors. They were all dark onthe photographs and thus easily distinguished from neighbor-ing structures. The wall of the great vessels originating in theheart chambers was also painted black, like the pericardium.The myocardium was clearly separable from other tissues andpainted brown. Finally, the adipose tissue with the coronaryvessels remained. The adipose tissue was white-yellow on thephotographs and the blood vessels dark spots of different sizesin it. It was colored yellow and the coronary vessels green. Thedescribed procedure was implemented on each of the 156 cross-sections, from the heart apex to the base. Cross-section 1450as it appeared after processing and transformed in grayscale isgiven in Fig. 3.

Page 3: 3D heart model for computer simulations in cardiac surgery

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 resolutionof 512 × 512 pixels. Pericardium—black, myocardium—gray, arterial bloodand coronary vessels—light gray, venous blood—dark gray, and fat—white.

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

It was difficult to spot all the coronary vessels in one cross-section from the beginning, thus we segmented them separately.Every major vessel was followed from its origin in the aortato the periphery as long as it was distinguishable from thesurrounding tissue. The same was done with its branches. The3D model of coronary vessels was later incorporated into themodel of other tissues.

The resulting painted cross-sections were rescanned in a res-olution similar to that in the Z direction, which was 1 mm. Thenthey were put together into a 3D model of the heart. Now allthe mistakes that were made in the 2D editing, especially those,where the drawing was done subjectively, could be seen. Theywere corrected on a series of Y–Z cross-sections that were de-rived from the 3D model. Finally, also the X–Z cross-sectionswere edited, to spot the mistakes that have not been seen in theX–Y and Y–Z planes. Fig. 4 shows the X–Z and Y–Z cross-section, generated from the 3D model, where final editing ofthe model was done.

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

After the final editing, all cross-sections were put togetherand the 3D model was generated. The resulting 3D model isgiven in Fig. 5.

2.2. Spatial editor

This model was built from processed VHD cross-sections insuch a manner that each pixel represented a cube in 3D space.Due to the high resolution of the original VHD picture, whichwas retained in further, cropped cross-sections, there were anenormous number of cubes or voxels in the 3D heart model.To minimize the number of objects, the cubes that are fully ob-scured have been extracted and eliminated in the graphical pre-sentation. Additionally, identical neighboring cubes have beenrepresented as a single larger object. The number of objects stillremains too large to allow a smooth interactive work and ren-dering of the model in less powerful computers; therefore, theredisplaying of the 3D model is done only upon user request(Fig. 6).

The editor can display any of six different tissues or all ofthem in a selectable portion of the 3D model. The selectedportion of the heart can be rotated and zoomed in and out inorder to note all the desired details.

The selected cross-section is shown in the 3D view windowas a semi-transparent plane. Model can be corrected on a set ofthree 2D windows that allow the simultaneous display of thethree consecutive cross-sections: previous, selected and next.Drawing is possible on the selected cross-section with brushesof various sizes in any of the six tissue colors, which corre-spond to adding/removing portions of a tissue to/from the cross-section. The position of the actual brush is shown in all threesections. Any change on the selected cross-section can be donewith the insight, how this change will affect the preceding andsucceeding cross-sections. Immediately after a change is made

Page 4: 3D heart model for computer simulations in cardiac surgery

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, keepingit consistent with actual changes on the selected cross-section.

The editor also contains some tools for automatic editing ofthe 3D models. It enables the reduction of the model size by afactor n in all directions and repair of eventual small openingsor discontinuities in the selected tissue by adding small portionsof 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 theZ direction was produced. Any of six main tissues in the heartcan be selected and drawn in 3D space. The heart model canbe rotated in all directions and zoomed in and out. This modelis intended for use in graphic presentations and anatomicalstudies or simulations. The entire volume of the human heartis covered (Fig. 7).

4. Discussion

During tissue segmentation we found some problems regard-ing the desired high precision of the heart model. Due to thehigh resolution of VHD cross-sections, we wanted to retain thedetails of the heart structure as much as possible. This was alsodesired from the aspect of further planned computer simula-tions. The accuracy of simulations relies on the resolution ofthe model, which serves as the substrate for the simulation. Itwas impossible to distinguish between the epicard and pericardon the photographs, therefore we did not differentiate betweenthese two tissues. The wall of the great vessels originating inthe heart chambers was also painted black, like the pericardium.The thermal properties of the connecting tissue in the vesselwall are more similar to the pericard than the blood in the

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

vessels. Myocardial tissue contains several layers of muscularfibers, which run in different directions. This influences heatpropagation through this tissue, but these layers could not bedistinguished on the original cross-sections. Thus, the myocardis presented as a homogenous mass of muscular tissue. Theleft ventricle, usually much larger in the working heart, is quite

Page 5: 3D heart model for computer simulations in cardiac surgery

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, theright ventricle is huge and round shaped. The endocard, whichnormally lines the entire interior, is microscopically thin, so itcould not differentiated in this model.

Sometimes it was quite difficult to decide where to draw theborder between the two tissues because of similar pixel color.In such cases the borders were drawn subjectively accordingto anatomy knowledge of the drawer. The main problems werein the area of pulmonary vessels at the base of the heart. Someparts of them, usually the upper and the lower part, were miss-ing on the segmented cross-sections. This happened becausethe process of segmentation was done in the direction fromthe heart apex to the base. These vessels were recognized onlywhen they were connected with the heart chambers and missedin some earlier and later cross-sections from the beginning.Also, the pericardium was discontinued in some places, par-ticularly on the posterior surface of the heart, because it wasnot distinguishable from the color of surrounding tissues on theposterior side of the heart. In that case, the border of the hearttissue was drawn subjectively with some variations in consec-utive cross-sections. These problems were the main source oferrors made during tissue segmentation that had to be correctedlater 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 andthe largest veins are visible and one can follow such vesselsfrom their origin to the periphery. On the periphery, coronaryarteries and veins sometimes lie in close proximity and looklike one large vessel. Some vessels did not have a uniformcourse in the 3D view. There were also some discontinuations,which occurred because they were not recognized on everycross-section and were omitted on some of them. There are alsosome artifacts, such as spots painted on some cross-sectionsas vessels, but actually not corresponding to vessel tissues.They look like a single pixel or group of pixels apart fromthe coronary vessels. Thus, the coronary vessel system wassegmented separately as described above.

All mentioned mistakes in the generated spatial heart modelhad to be corrected, either manually or automatically, by acomputer program. It is very difficult to imagine the failuresin space or to see their relationship to other tissues in space.It was expected that a kind of 3D editing would be of greathelp in improving the spatial heart model. The primary goalin designing the spatial editor was to allow the user to eas-ily spot and correct the smaller failures in the generated 3Dmodels.

The spatial editor also allowed some automatic modificationsof the 3D model. One of them is the reduction of the modelsize by a factor n in all directions. Portions of the input modelmade of n × n × n pixels were taken and replaced by a singlepixel in the output model, representing the tissue most com-mon in the reduced portion. Another function can find eventualsmall openings or discontinuities in the selected tissue (expos-ing other tissues) and repair them by adding small portions ofmissing tissue onto the corresponding cross-sections. In thisway the small holes in the pericardium have been automaticallyfilled.

Because the number of elements (cubes) of the model islarge, the simulation of physiological processes requires greatcomputational power of the computers. Such computers arenot generally accessible. To run simulations on less powerfulcomputers, the number of elements in the model was reduced tothe resolution of 146×152×156 cubes with approximated edgelength of 1 mm. If the computer power still remains a problem,the 3D model can be further scaled down to 73 × 76 × 78 oreven 36×38×39 cubes. In these cases details in the simulationprocess are lost, but the results are still indicative enough to beuseful for the surgeon.

5. Conclusion

This paper presented some initial attempts and results con-nected with 3D modeling of irregularly shaped bodies. The ba-sic data were taken from the VHD. New pre-processing andediting tools were developed in order to manage the spatialmodeling. The resulting procedure is quite general and nottoo complicated. It can also be used in some other areas ofmedicine. We also discuss some technical problems we encoun-tered during the tissue segmentation. This human heart modelhas so far been used for several computer simulation of heattransfer, described in details elsewhere [6,7]. It could also beused for the simulation of electrical cardiac signals [8] and othermedical applications. The 3D model can be further improvedwith the inclusion of more different types of tissue, such as dis-tinctly different myocardium layers and with some advancedfunctions for automatic 3D editing.

6. Summary

In our time, computer simulations provide great help in re-search. For good simulation, a computer model, which imitatesa natural situation as close as possible is needed. Human heartis a irregular 3D object and thus difficult to reproduce. In re-cent years, very accurate anatomical data is available, whichmade the construction of the human heart model possible. Thismodel 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 ofthe original cross-sections as a square and all tissues in thissquare, not belonging to the heart were removed. Then all thedifferent tissues in the heart had to be segmented—the left andright heart chambers, coronary vessels, myocardium, fat tissueand pericardium. They were painted with different colors. Onehundred and fifty six cross-sections were processed from theheart base to the apex. All the slices also had to be aligned toassure precise overlapping of the structures. Finally all of theslices were put together and the 3D model was formed andsome mistakes, seen on the 3D model were corrected.

As a result, a 3D computer heart model with a the reso-lution of 1 mm in all dimensions was designed. The modelis intended to be used for simulations of heat transfer duringheart surgery or action potential propagation through the my-ocardium. It could also be used for graphical presentation or asa learning tool for heart surgery.

Page 6: 3D heart model for computer simulations in cardiac surgery

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

References

[1] R.L. Martino, C.A. Johnson, E.B. Suh, B.L. Trus, T.K. Yap, Parallelcomputing in biomedical research, Science 265 (1994) 902.

[2] J.D. Hoffman, Numerical Methods for Engineers and Scientists, McGraw-Hill, New York, 1993.

[3] R. Trobec, B. Slivnik, B. Gersak, T. Gabrijelcic, Computer simulation andspatial modelling in heart surgery, Comput. Biol. Med. 28 (4) (1998) 393.

[4] B. Gersak, T. Gabrielcic, R. Trobec, B. Slivnik, Temperature distributionin human heart during hypothermic cardioplegic arrest, Cor Europaeum6 (1997) 172.

[5] Visible Human Dataset, National Library of Medicine, Bethesda, 1997.[6] P. Trunk, J. Mocnik, G. Pipan, R. Trobec, B. Geršak, Visualization of

computer simulated heart temperature during topical cooling, PflügersArch. 442 (6) (2001) R139.

[7] P. Trunk, B. Geršak, R. Trobec, Topical cardiac cooling—computersimulation of myocardial temperature changes, Comput. Biol. Med. 33(2003) 203.

[8] F. Pinciroli, P. Valenza, E. Pozzi, Heart electrical activity visualized onthe visible human, First Users Conference of the National Library ofMedicine’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 Biomedicinein Univeristy of Ljubljana. Since year 1996, he worked in Department for

Cardiovascular Surgery, University Medical Center in Ljubljana. His researchinterests are in computer heart modeling and simulations, myocardial protec-tion during heart surgery and aortic valve surgery.

Jaka Mocnik received his B.S. in Computer Sciences from University ofLjubljana in 2001, and enrolled in a postgraduate course in CS at Universityof Ljubljana. As a student he worked part-time at the Jozef Stefan Institute,and then at various companies invoved in design and development of dis-tributed systems. His research interests in CS include distributed systems,parallel computing, peer-to-peer networks and protocols, service-oriented ar-chitectures, and programming languages.

Roman Trobec received his B.S, M.S and Ph.D. in Electrical Engineeringfrom the University of Ljubljana. Since 1979 he has been with the JozefStefan Institute. Currently he is a principal investigator in the Department ofCommunication Systems. His group is involved in the design and developmentof parallel computing, computer simulations, medical data processing anddigital 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 withthe Department of Cardiovascular Surgery, University Medical Center, wherehe is an Associate Professor of Cardiovascular Surgery. His research interestsextend beyond pure cardio-surgery to interdisciplinary approaches in surgery,biomedical engineering and computer simulations of procedures used incardiovascular surgery.