14
Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ. A software implementation for detailed volume conductor modelling in electrophysiology using finite difference method. Conputer Methods and Pmgrams in Biomedicine,53: 1.91-203,1999. Repdnted $/ith permission &om Elsevier Science Iteland Ltd.

P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ. A software implementation fordetailed volume conductor modelling in electrophysiology using finite differencemethod. Conputer Methods and Pmgrams in Biomedicine,53: 1.91-203,1999.

Repdnted $/ith permission &om Elsevier Science Iteland Ltd.

Page 2: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

Computer Methods and Programs in Biomedicine 58 (1999) 191–203

A software implementation for detailed volume conductormodelling in electrophysiology using finite difference method

Pasi Kauppinen *, Jari Hyttinen, Paivi Laarne, Jaakko Malmivuo

Ragnar Granit Institute, Tampere Uni6ersity of Technology, FIN-33101 Tampere, Finland

Received 11 August 1997; received in revised form 25 August 1998; accepted 10 September 1998

Abstract

There is an evolving need for new information available by employing patient tailored anatomically accuratecomputer models of the electrical properties of the human body. Because construction of a computer model can bedifficult and laborious to perform sufficiently well, devised models have varied greatly in the level of anatomicalaccuracy incorporated in them. This has restricted the validity of conducted simulations. In the present study, aversatile software package was developed to transform anatomic voxel data into accurate finite difference methodvolume conductor models conveniently and in a short time. The package includes components for model construc-tion, simulation, visualisation and detailed analysis of simulation output based on volume conductor theory. Due tothe methods developed, models can comprise more anatomical details than the prior computer models. Several modelshave been constructed, for example, a highly detailed 3-D anatomically accurate computer model of the humanthorax as a volume conductor utilising the US National Library of Medicine’s (NLM) Visible Human Man (VHM)digital anatomy data. Based on the validation runs the developed software package is readily applicable in analysisof a wide range of bioelectric field problems. © 1999 Elsevier Science Ireland Ltd. All rights reserved.

Keywords: Modelling; Volume conductors; Software package; Finite difference method; Electrophysiology; Computersimulation

1. Introduction

Stimulation and activation of excitable tissuessuch as nerve and muscle cells give rise to electricfields that are distributed throughout the volume

conductor formed by the body. Basically, thesame theories underlie the analyses of bioelectricmeasurements and stimulations [1]. Thus, thesame numerical modelling methods can be appliedto almost all bioelectric field problems.

The level of anatomical detail included in amodel affects the results obtained with it. Forinstance, three-dimensional (3-D) computer mod-

* Corresponding author. Tel.: +358-3-247-4012; fax: +358-3-247-4013; e-mail: [email protected].

0169-2607/99/$ - see front matter © 1999 Elsevier Science Ireland Ltd. All rights reserved.

PII: S 0169 -2607 (98 )00084 -4

Page 3: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203192

els of the thorax developed for studying themeasurement properties of electrocardiography(ECG) generally include no more inhomogeneitiesthan cardiac muscle, intracardiac blood masses,lungs and some bone structures such as sternumand spine [2–4]. Including more inhomogeneitiesimproves the accuracy of numerical simulationswhich in turn helps the interpretation of measureddata providing more assistance in diagnostic deci-sion making [5].

In most of the existing computer models theconductive regions are represented by numericalelement methods such as the finite difference(FDM), finite element (FEM) or boundary ele-ment methods (BEM) [6]. Each element methodprovides certain computational or practicalbenefits and restraints [7]. Of these, the FDMoffers the easiest and the most straightforwardmethod to code and implement the complicatedstructures of the human body in detail. Further-more, an important and unique aspect in theFDM is that it gives the solution at all the ele-ments in the model, providing accurate informa-tion on simulated field distributions. This allowsdetailed analysis of fields, which is important inmany modelling applications [8]. The major draw-back in the FDM approach is the high demand itmakes on computational resources as the model,if accurate, contains several hundreds of thou-sands of computational elements.

Several commercial software products are avail-able for element modelling, especially for theFEM and BEM. This, however, has generally notled to more sophisticated models or simulations.Often separate software is needed for 3-D meshgeneration, solving and post-processing the data[9]. Model construction and mesh generation fromanatomy data may become time consuming andexceedingly problematic. Changes in sourceconfigurations may be difficult and laborious toperform. Furthermore, the types of simulationsand analysis commercially available with a mod-erate amount of work may not suit bioelectricproblems of interest and the costs of commercialsoftware are often high.

In this study, we developed a software packagefor the construction of the volume conductormodels in order to simulate the electrical proper-

ties of the human body and electric fields in itgenerated by different types of internal or exter-nally applied sources. The software was designedto be an easy-to-use package that overcomes theproblem of discretising the complex anatomy datainto simple computational elements. The softwareutilises the FDM and it allows versatile simula-tions and detailed analysis of simulation outputs.The number of inhomogeneities of the volumeconductor model is practically unlimited enablingconstruction of highly accurate models. The soft-ware may be easily applied in a wide range ofbioelectric field problems including the analysisand development of measurements andstimulations.

2. FDM volume conductor modelling

2.1. Introduction

Basic process of volume conductor modelling isillustrated in Fig. 1. First, anatomy information isobtained with a medical imaging device (a) andthe modelled data is segmented and classified bytissue types (b). Model is constructed and simula-tions run (c) for analysis of simulation outputdata (d).

2.2. Human body as a 6olume conductor:computational approach

The human body can be conceived as a piece-wise, homogeneous and resistive system [1]. Gov-erning equation of the electrical properties of thebody as a volume conductor then becomes thePoisson’s equation. In the orthogonal Cartesianco-ordinate system, this equation is

(

(x�

sx

(F(x

�+(

(y�

sy

(F(y

�+(

(z�

sz

(F(z

�= −I6(x, y, z) (1)

where F is potential and, sx, sy and sz are theconductivities in the x, y and z directions, respec-tively and −I6(x, y, z) is the representation of thesource currents, throughout the thorax. The asso-ciated boundary conditions of the equation de-pend on the type of source problem.

Page 4: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203 193

Fig. 1. Major actions involved in a modelling process. (MRI—magnetic resonance imaging, CT—computed tomography).

In the FDM the modelled volume is dividedinto a 3-D resistor network that reflects the hu-man body both geometrically and as a conduc-tor. The structures are represented by a 3-Dgrid of discrete points, called nodes. A networkof resistors is placed between these nodes. Resis-tor values depend on conductivity of the tissuetype and size of the element between the nodepoints. Ohm’s and Kirchoff’s laws are used foreach node to set up the fundamental linear dif-ference equations. The potential at node n as afunction of adjacent nodes is described by

Fn=�1

ra

+1rb

+…+1rf

�−1

·�Fa

ra

+Fb

rb

+…+Ff

rf

�(2)

where ra,…rf are the resistances between node nand the neighbouring nodes and Fa,…Ff the po-tentials of the same nodes. If node n is a sourcenode, then the potential is simply the potentialof the source.

Each equation describes the potential at onenode. The solving of the linear equations isbased on the iterative successive over relaxation(SOR) [10]. The result of the iterative process isthe potential distribution within the model dueto specified source configurations.

2.3. Source models and their applications

In the suggested FDM approach the source isalways set up using constant voltages at the nodesforming the source which gives the driving force forequation solver. Since the model is assumed linear,the source currents may be scaled after the simula-tion to obtain ideal sources of required strengths.The models describing the sources can be classifiedinto two categories, bioelectric and applied.

Equivalent bioelectric sources are used whensolving the forward problem (refer to Fig. 1), whichconstitutes a class of problems where the solutionprovides the potential or current distributionwithin the model and model surface arising fromsources of bioelectric origin. Examples are a poten-tial distribution due to a dipole or double layersources in cardiac muscle or within the brain. Thepotential in Eq. (1) is solved after describing the−I6(x, y, z) in the model structure and by applyingthe subsequent Neumann boundary conditionwhich states that current is continuous acrossboundaries and zero on the surface.

Externally applied sources require the use of amixed boundary condition known as Neumann andDirichlet condition. The Dirichlet boundary condi-tion states that a constant potential (or current) isapplied on a set of surface nodes. Applied sources

Page 5: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203194

are employed to obtain e.g. current flow causedby stimulation electrodes or when calculating thesensitivity distribution of a measurement lead sys-tem. The sensitivity distribution or the lead field[1,11,12] of a measurement such as ECG or elec-troencephalography (EEG) can be obtained byemploying the reciprocity principle [1]. The leadfield is directly associated with the current fieldproduced by injecting a unit reciprocal currentthrough the measurement lead. The lead fieldexpresses how sensitive the lead is to record activ-ity in the model, i.e. the source-lead relationshipexpressed for each node in the model. Once calcu-lated lead fields can be used for further simula-tions of the forward problem as well as for thebasis of fast solutions to in6erse problem (Fig. 1).The reciprocal method can also be applied in theclarification of the measuring sensitivity of electri-cal impedance measurements which do not di-rectly record electrical activity but the subsequentdimensional and conductivity changes. In four-electrode impedance system, where current is in-jected and voltage measured from two differentelectrode pairs, reciprocal current fields of bothelectrode pairs must be calculated [8]. Sensitivityfield is then obtained by taking the dot product ofthe two fields.

3. Description of the software

Earlier work has established a foundation forsimple mesh generation from traced outlineanatomy data and an FDM equation solver[2,13,14]. The preceding versions of the modellingprograms were limited in terms of flexibility andusability requiring understanding of software engi-neering. We developed and implemented severalseparate programs that are needed in the simulationprocess into a common modelling software packagehereafter referred as volume conductor modellingtools (VCMT) which is based on preceding FDMequation generation and solver techniques. VCMTSoftware is capable of converting segmented vol-ume data directly and rapidly into a FDM modeland it allows detailed analysis of simulation outputsof a wide range of source types making it possibleto simulate a variety of bioelectric field problems.

The aim of the software development was:� To provide a complete implementation of mod-

elling and simulation programs and a library offunctions and subroutines for future develop-ment and delivery of the software

� To achieve easy and fast transformation ofanatomy data into a FDM model

� To develop structures of the modelling pro-grams to be compact in size and efficient to use

� To declare administrative data format for thetransfer of information between the differentapplication programs and users of the VCMTpackage.The following text describes the developed data

management scheme and routines of the mod-elling process in brief. Fig. 2 gives a summary ofthe major steps involved in modelling and simula-tion process using the developed software. Theprocess may be divided to four parts: (I) pre-pro-cessing, (II) simulation set-up, (III) solving and(IV) post-processing. Some of the tasks may beby-passed or modified depending on the run op-tions and other parameters specified for the simu-lation or modelling task. The figure also showsinteractions with other applications through fileswhich can be either standard ASCII or binary filesdepending on the selected output options.

3.1. Simulation header data format and tissuecoding

At all times, simulation file header contains alldata and pointers to files for I/O operations bythe different programs. Header data format wasdeclared to collect the necessary information inone defined file format that enables data transferbetween different programs and routines. Data isdivided into administrative and anatomy sectionsshown in Fig. 3. All administrative data is sup-plied in the form of key-value pairs in ASCIIformat. The administrative header section con-tains comprehensive information about theanatomy data, formats, file names, modificationprograms, parameters, results, versions, etc. Stepstaken in the course of the modelling process arewritten in a simulation diary of the header dataand can be returned to when necessary. The userknows what steps have been taken and what

Page 6: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203 195

Fig. 2. Summary of major stages involved in 3-D FDM modelling studies of bioelectric phenomena with the VCMT softwarepackage.

programs have been used in the modelling processreducing the risk of error in simulation and laterpost-processing. Running the programs is semi-automated by the instructions given in the headerdata which forms an efficient interface to theoperations of the programs. It contains predefineddescriptive information about the variables andoptions read into programs that are used in asimulation process. For instance, user does notneed to know about all the different parameters

given to the source-setting program, or does notneed to know what source-setting program to use.All that is required is to declare what type ofsource is desired and its location. Then, a parserroutine will proceed, run required programs withappropriate parameters and update the necessaryfiles and the header information.

Tissue and associated resistivity coding was de-signed to use minimum memory and CPU time.The data coding structure for tissue types was

Page 7: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203196

implemented using direct-address tables. Thetable for tissue codes included a code (ASCII) fortissue type and three corresponding values forresistivities needed for anisotropic conductivity inX, Y and Z directions, respectively. The informa-tion for tissue could be found using two keys.First, the key for a tissue, like kidney or blooddeclared in the administrative data section andused throughout in the modelling programs, isused to access the right location in the table.Then, the associated resistivity value for the re-quired direction is indicated from the list structureof the tissue in that table location. Because manyof the programs in modelling software frequentlyrequire the tissue resistivity information, the effi-ciency of such programs strongly depends on therepresentation of tissue codes. The priority of atissue type may be associated to it by selecting the8-bit code order to suit particular modelling pur-pose. In our model constructions we have appliedthis type of priority classification of tissues fromsegmentation to final post-processing of data[5,15]. The benefits of coding structure are consid-erable in programs that need tissue codes fre-quently. Without change in the efficiency, up to256 different tissue codes can be used. This allowsfuture inclusion of new tissues and e.g. systolicand diastolic conductivity values for tissues. Norestrictions on tissue conductivities or names areset when compiling the source codes, instead,information is read from the header data while

running the programs. This increases the flexibil-ity of the VCMT package. Updating any part ofthe system modules is easy when the structuringof the software supports it.

3.2. Modelling process with VCMT

3.2.1. Pre-processingInitially, a set of medical images is used for

model geometry data formulation. IARD is asegmentation and tissue classification algorithmdeveloped in our laboratory that directly producesvoxel data for the VCMT formatted file [15,16].Anatomy data is presented for each 2-D imagerow by row as a sequence of coded string ofASCII data containing 8-bit code (ASCII) fortissue type and then the number of successivevoxels of the same type. At this stage, voxels areuniform throughout the model. Strength identifi-cation of tissue codes is utilised in segmentationalgorithm when forming the anatomy data.

3.2.2. Setting up a simulation caseBefore a particular simulation case can be re-

alised there are several steps to be taken. Uniformvoxel based segmentation data provided by theIARD algorithm are employed to form the finalsimulation VCMT formatted model file. Anonuniform mesh generation procedure is per-formed to create a downscaled model based onuser defined meshing information. For this pur-pose 2-D meshing parameters are given in headerdata, including options for deciding the generaltissue type of a group of voxels to be converted toone larger voxel. These grouping priority optionsmay be employed when the aim is to maintaindetails such as small vessels when grouping thevoxels. The number of volumetric elements isreduced according to the defined mesh decreasingthe requirements of computational resources also.This downscaled model file may be duplicated andused as a basis for different simulation casesapplying the same model and accuracy. Thus, thesteps taken so far are not needed to be repeated ineach simulation.

The downscaled model data is used to generatea file describing the 3-D anatomy and conductiv-ity structure for setting up the FDM equations.Fig. 3. VCMT formatted modelling file layout.

Page 8: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203 197

Each node has a data structure associated with itcontaining the location in nonuniform mesh, nodenumber, surrounding tissues codes and a data flagexpressing the source nodes which are selectedaccording to the definitions specified by the userin the header data. A matrix of differential equa-tions discretising the Eq. (1) is built up for eachindividual node. Boundary conditions for the par-ticular simulation are defined according to thesource settings in the nodes file and the headersection of the simulation file.

3.2.3. Sol6ing the equationsGenerated equations are the input for the itera-

tive FDM solver. Iterative calculation can be verytime consuming. The performance of the equationsolver can be improved by taking as an input aninitial simulation output file obtained with a simi-lar model and simulation case. Thus, input solu-tion data reduces the number of iterationsdepending on the problem set-up. For instance, ithas proven to be efficient when simulating thesame source configuration with altered tissue re-sistivities. And, in the case of a system hang-up,simulations may be restored using the temporarysolution file as an input data when restarting thesimulation.

The output of the solver is a potential filedescribing the potentials of each node in thevolume conductor model due to the specifiedsource models.

3.2.4. Post-processingThe solver output is post-processed along with

the model anatomy and node data with a varietyof tools enabling statistical analysis, categorisa-tion and visualisation of data. Initially, potentialdata is often converted to electric or current fielddata. Alternatively, a conversion program may beused to read solver output data together with theanatomy and conductivity data to produce filesfor other applications, such as commercial visuali-sation programs and spreadsheet calculations.Several conversion programs are provided in theVCMT package for different combinations andconversions of anatomy and field data. Samplesimulations presented in the next chapter provideexamples of post-processed data in the form of

body surface maps, lead fields and lead fieldanalyses.

3.2.5. Validation of the softwareOriginal FDM programs developed by Walker

[13] were constructed for inverse ECG calculation.The methods were validated by forming a homo-geneous spherical volume conductor model withtwo point current sources inside the heart (abioelectric dipole source) and comparing the re-sulting potential distribution with the known ana-lytic solution. The isopotential contour maps werealmost identical, while the greatest differences oc-curred near the source, as would be expected asthe analytically calculated potential generated bya dipole source approaches infinity. The geometri-cal errors due to the rectangular node structure,which cannot exactly fit the spherical model in-crease the errors on the surface. However, theerrors were still quite small, being in the order of4–5% and decreasing to 1–2% below the surface.

The integrity of the reciprocal (applied) sourcecalculation was checked by calculating the leadvectors of ECG limb lead II from the lead vectorsof leads I and III [14]. In theory, lead II isobtained by adding the lead vectors of leads IIand III. Due to the linearity the result should bethe same as the lead vectors obtained by simulat-ing the lead II. The observed differences were inthe order of 10−3%.

Validation of the VCMT software package hasalso been performed employing an inhomoge-neous spherical model used in EEG studies. Thepotential distributions by the VCMT softwarewere compared with those calculated analyticallywith three concentric spheres models [17]. TheFDM algorithm works correctly providing accept-able accuracy as compared to the analytical solu-tions. Although, accuracy of results stronglydepends on the selected grid size, producing ac-ceptable relative differences of less than 5% with afine grid. A well-chosen, non-uniform grid in-creases the accuracy, while decreasing the numberof equations and thus the number of iterations.

Various other constructed inhomogeneousmodels and test data were used in conductingexperiments to ensure the correct functioning ofthe implemented procedures and programs.

Page 9: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203198

Table 1Tissue types and resistivity values used in thorax and head models

Resistivity (V Detailed thorax HeadOrgan/tissue Standard tho-raxcm)

1010 x x xAirxCerebrospinal fluid 65

xSkeletal muscle 400 xxx2000FatxLeft eye, right eye 300

xBone 2000 xSkull 17 760 x

x230ScalpGray matter 225 x

x500White matterxStomach 400xLiver 600xx1325Left lung, right lung

x xHeart muscle 450xHeart fat 2000

Saline eye 300 xx2500Cartilage

230 xSalivary gland

xBlood masses 150XXLeft atrium, right atrium, left ventricle, right ventricle

XAortic arch, ascending aorta, descending aorta, superior venacava, inferior vena cava, carotid artery, jugular vein, pul-monary artery, pulmonary vein

xx150Other bloodx xOther tissues and organs x460

4. Sample simulations

We have applied the VCMT package for sev-eral volume conductor model constructions andsimulations. As examples of VCMT utilisation inhead and thorax modelling, following models arehere introduced: two thorax models based on theUS National Library of Medicine’s Visible Hu-man Man digital anatomy data [18] and a headmodel based on a set of T1 weighted magneticresonance (MR) images obtained with a GeneralElectric 0.5 T MR device.

4.1. VHM thorax models

A comparison of a highly accurate thoraxmodel with a more standard model was per-formed. Two 404307 element thorax models, de-tailed and standard, were constructed for

simulating cardiac dipole sources. Altogether 28tissue types were included in the detailed modelwhile nine more generally used inhomogeneitieswere included in the standard model. A list oftissues and organs of the models along with theconductivities are listed in Table 1. A nonuniform2-D meshing algorithm was used to approximatethe voxels to reduce the number of computationalelements from the original of more than 3 000 000voxels. The resolution of the final elements variedfrom 0.011 cm3 in the region of the heart to 2.8cm3 further from the heart. The scheme of theVCMT package enabled construction of the stan-dard model simply by modifying the tissue con-ductivities of the unwanted inhomogeneities in theheader data section of the detailed modelfile.

Unit current dipoles in the centre of the heartoriented in X, Y and Z directions were specified inthe models and corresponding node potentials

Page 10: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203 199

were calculated. The strengths of the currentdipole sources were adjusted after the simulationto be equal in each case, 1 mA. Volume basedrendering technique was used to visualise themodel surface and simulation output data shownin Fig. 4. The colourmaps were scaled by theminimum and maximum body surface potentialscalculated for the detailed model. The reference ineach case was the average body surface potentialobtained from the 33 712 surface node locations.Simple dipole source experiment indicates the ef-fects of the model inhomogeneities on the gener-ated surface potentials showing relative errors offew percent in body surface maps between thedetailed and the standard model for X, Y and Zdirected dipole sources, respectively, when calcu-lated as an average for each surface node. Morespecifically, errors using the electrode locations ofthe standard 12-lead ECG for potential measure-ments were remarkably larger, ranging from −23to 15%. This manifests the important contributionfrom the large vessels not included in the standardmodel [19,20].

4.2. Head model

As an example of the head modelling applica-tion a bipolar EEG measurement was simulatedto obtain the measurement sensitivity distributionof the lead system. A 441 454 element highlydetailed model was constructed comprising 14different tissue types listed in Table 1. Uniformmeshing was used to reduce the number of ele-ments with the final size of the elements being0.014 cm3, throughout the model. A reciprocalcurrent was applied to the electrodes T4 and Cz ofthe standard 10–20 EEG electrode system. Thecurrent field was calculated from the potentialdata provided by the solver. Visualised currentfield shown in Fig. 5 is directly related to themeasurement sensitivity (lead field) in each loca-tion. The analyses of the lead field indicated thatmore than 22% of the sensitivity is originated ingrey matter, 18% in white matter and as much as24% is produced by the sources in the scalp andmuscle tissue.

5. Hardware and software specifications

Software development was carried out on aunix workstation in standard ANSI C language.The developed software is portable with minormodifications to any system; requirements to runthe VCMT package are a computer with ANSI Clanguage equipped with sufficient amount ofRAM (depending on the size of the model) and ahard disk.

6. Status report

Trials with test materials and systems haveshown that the modelling software has achievedhigh performance in terms of speed and ease ofuse. Segmented data is converted to an accurateFDM model within minutes. Simulation timesdepend on the number of computational elements,the source configuration and the required solutionaccuracy. To solve a model containing 100 000nodes on a Sun Ultra 1 workstation with 64 Mbof RAM requires less than 10 min of CPU time.Large models containing more than half a millionelements may require more than 10 h of solutiontime.

The work described has successfully imple-mented an operational modelling software pack-age that is easy to use, open to developers and canbe run under several platforms and operatingsystems with minor modifications. It has potentialuse in a variety of bioelectric field problems. Atthe present stage, the VCMT system is used underclinical epileptic foci localisation study and inseveral research projects involving volume con-ductor modelling applied in EEG, ECG,impedance cardiography and electrogastrography.

Approaches taken in VCMT software imple-mentation are well suited for modelling of com-plex structures of the human body as a volumeconductor with high level of anatomical struc-tures. The number of tissue inhomogeneities doesnot have influence on the time needed to modelconstruction or simulation. Model constructionwas achieved to be fast and setting up and modi-fying a simulation case easy to perform.

Page 11: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203200

Fig. 4. Simulated surface potentials on the VHM model due to X, Y and Z oriented current dipoles located in the heart muscle.Relative errors calculated between the detailed and the standard model for (i) all the body surface points and (ii) the 12-lead ECGelectrode locations.

Page 12: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203 201

Fig. 5. Detailed head model: (a) The outlook of the model with the 10–20 system T4 and Cz EEG electrodes shown on the modelsurface. The sensitivity field (lead field) distributions of the electrode set-up visualised on; (b) frontal; (c) sagittal; and (d) transversesection of the model.

7. Future plans and conclusions

Considerable effort has been put into the mod-elling of the bioelectric sources and the surround-ing volume conductor to gain understanding ofvarious measurement systems developed for ob-taining information of functional state of thebioelectric sources. Precise estimations of poten-tial distributions within the thorax and head playa major role in the development of measuringtechnologies to obtain optimal measuring capacity

and to improve the interpretation of clinical data.Clinical diagnostic options are expanding as re-search provides more information with modellingapplications. The VCMT software package wasdeveloped and run on a unix workstation for thisproject but it has also been compiled on Pentiumbased PC with 32Mb of RAM. The widespreaduse of PCs and increasing CPU capacity withdecreasing costs brings the modelling and simula-tion of the human body as a volume conductorwithin reach of a vast number of researchers.

Page 13: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203202

The VCMT software package has proven tobe a powerful and valuable resource for mod-elling the human body as a volume conductor.Model construction is achieved easily and in ashort time. Although VCMT provides a broadvariety of simulation possibilities and availablefunctions in easily adopted form, there may al-ways be demands that are not covered by thepackage. The structuring of the programs andfunctions support easy development of newsource models and functions. If more sophisti-cated graphical user interface is required, it canbe implemented to process ASCII header datain the administrative section of the simulationfile for more straightforward operation of thesimulation programs. The easiest way to realisea graphical interface for user’s platform and op-erating system is obtained with modern develop-er’s tools and by using the provided VCMTformatted I/O functions.

Important feature of many tissues of the hu-man body is the anisotropic conductivity prop-erty. Currently our package only definesanisotropy in x, y and z directions. This is ofcourse, only a simple approximation of the trueanisotropy, but provides considerable strength interms of easy model construction, coding andgeneral handling. True anisotropic conductivitywould require a tremendous amount of data de-scribing the distribution of anisotropic tissuemasses throughout the model, which is not pro-vided by current standard medical imaging tech-niques.

A general but important difficulty encounteredwith the volume conductor modelling of humanbody is the uncertainty of tissue conductivities,which may have inter- and intra-patient varia-tion. Based on the model studies conducted withthe VCMT software it has been shown that theselected conductivity values have a considerableeffect on simulation results and it is of impor-tance to find solutions for selecting correct val-ues for conductivities [5,21]. Currently we arelooking for methods to define patient specificconductivity values based on non-invasiveimpedance measurements and modelling withpatient specific VCMT FDM models.

The VCMT is being developed further to al-low multiple models in time domain, i.e. 4-Dmodelling including the dimensional and con-ductivity changes in time, in one simulation file.It would be particularly valuable in building andsolving models based on ECG gated image sets.4-D models would mimic e.g. the geometricalchanges of a beating heart, which is known tohave effect on the volume conductor propertiesin ECG and impedance cardiography.

The performance of the solver program couldfurther be improved by using rough initial solu-tions obtained with coarser meshes. The possi-bility of using 3-D meshing algorithm withoutchanges in other programs but the node makingprogram has also been examined since, depend-ing on the problem set-up, higher accuracy isonly critical in regions with large gradient. As-pects of implementing the FDM model in paral-lel MASPAR environment with array processorof 16 000 CPUs has also been investigated [22].Parallel processing could be used in researchprojects to obtain fast solutions for highly de-tailed models with millions of computational ele-ments.

8. Availability

The VCMT software package may be avail-able for academic research purposes based onnegotiation. Those interested in additional infor-mation should contact the authors by e-mail [email protected] or by letter to Pasi Kaup-pinen, Ragnar Granit Institute, Tampere Uni-versity of Technology, PO Box 692, 33101Tampere, Finland.

Acknowledgements

This work has been supported financially bythe Academy of Finland, Ragnar Granit Foun-dation, Finnish cultural Foundation (PirkanmaaFund), Wihuri Foundation, Tampere City Sci-ence Foundation and Tampere University ofTechnology. The authors wish to thank DrRami Lehtinen for his advice and assistance.

Page 14: P, MalmivuoJ. A software implementation for electrophysiology … · 2016. 12. 2. · Kauppinen P, HyttinenJ,Laartte P, MalmivuoJ.A software implementation for detailed volume conductor

P. Kauppinen et al. / Computer Methods and Programs in Biomedicine 58 (1999) 191–203 203

References

[1] J. Malmivuo, R. Plonsey, Bioelectromagnetism: Principlesand Application of Bioelectric and Biomagnetic Fields,Oxford University Press, New York, 1995.

[2] S.J. Walker, D. Kilpatrick, Forward and inverse electro-cardiographic calculations using resistor network modelsof the human torso, Circulation Res. 61 (1987) 504–513.

[3] P. Johnston, S. Walker, J. Hyttinen, et al., Inverse elec-trocardiographic transformations-dependence of the num-ber of epicardial regions and body surface data points,Math. Biosci. 120 (1994) 165–187.

[4] G.J. Huiskamp, A. van Oosterom, Tailored versus realis-tic geometry in the inverse problem of electrocardiogra-phy, IEEE Trans. Biomed. Eng. 36 (1989) 827–835.

[5] J. Hyttinen, P. Kauppinen, T. Heinonen, et al., Applica-tion of the visible human man data to calculate thesensitivity of ECG leads to detect myocardial sources,Med. Biol. Eng. Comput. 34 (Suppl. 1, Part 2) (1996)85–86.

[6] C.R. Jonson, Numerical methods for bioelectric fieldproblems, in: Biomedical Engineering Handbook, CRCPress, Boca Raton, FL, 1995.

[7] R.M. Gulrajani, F.A. Roberge, G.E. Mailloux, The for-ward problem of electrocardiography, in: P.W. MacFar-lane, T.D.V. Lawrie (Eds.), ComprehensiveElectrocardiology—Theory and Practice in Health andDisease, Pergamon, New York, 1989, pp. 237–288.

[8] P. Kauppinen, J. Hyttinen, J. Malmivuo, Calculation ofimpedance cardiography measurement sensitivity-applica-tion of reciprocity, Med. Biol. Eng. Comput. 34 (Suppl. 1,Part 2) (1996) 153–154.

[9] D. Panescu, J.G. Webster, W.J. Tompkins, et al., Opti-mization of cardiac defibrillation by three-dimensionalfinite element modeling of the human thorax, IEEETrans. Biomed. Eng. 42 (1995) 185–192.

[10] G.D. Smith, Numerical Solution of Partial DifferentialEquations: Finite Difference Methods, 2, ClarendonPress, Oxford, 1978.

[11] R. Plonsey, Bioelectric Phenomena, McGraw-Hill, NewYork, 1969.

[12] J. Malmivuo, Biomagnetism, in: Biomedical EngineeringHandbook, CRC Press, Boca Raton, FL, 1995.

[13] S.J. Walker, Epicardial potential distributions calculatedfrom body surface measurements using multiple torsomodels, Ph.D. dissertation, University of Tasmania, Aus-tralia, 1985.

[14] J. Hyttinen, Development of regional aimed ECG leadsespecially for myocardial ischemia diagnosis, Ph.D. dis-sertation, Tampere University of Technology, Finland,1994.

[15] T. Heinonen, H. Eskola, P. Kauppinen, et al., Tissuesegmentation of Visible Human Man data using IARDmethod, Med. Biol. Eng. Comput. 34 (Suppl. 1, Part 2)(1996) 239–240.

[16] T. Heinonen, H. Eskola, P. Laarne, et al., Segmentationof T1 MR scans for reconstruction of resistive headmodels, Comput. Meth. Prog. Biomed. 54 (1997) 173–181.

[17] P. Laarne, H. Eskola, J. Hyttinen, et al., Validation of adetailed computer model for the electric fields in thebrain, J. Med. Eng. Technol. 19 (1995) 84–87.

[18] M.J. Ackerman, The visible human project, J. Biocom-mun. 18 (1991) 14.

[19] J. Hyttinen, P. Kauppinen, T. Heinonen, et al., Applica-tion of the visible human man data for modelling of thehuman thorax as a volume conductor, in: Electrocardiol-ogy 96—from cell to body surface, World Scientific,London, 1996.

[20] J. Hyttinen, P. Kauppinen, T. Koobi, et al., Importanceof the tissue conductivity values in modelling the thoraxas a volume conductor, in: Proceedings of the 19th An-nual Conference of the IEEE Engineering in Medicineand Biology Society, Chicago, 1997, pp. 2082–2085.

[21] P. Kauppinen, J. Hyttinen and J. Malmivuo, Effects ofthe fat resisistivity changes on measurement sensitivity ofimpedance cardiography determined by a 3D finite differ-ence element model of the visible human man, in: Pro-ceedings of the 18th Annual Conference of the IEEEEngineering in Medicine and Biology Society, Amster-dam, 1996, paper 238.

[22] J. Hyttinen, R.M. Arthur, P. Kauppinen, et al., Parallelprocessing approach for finite difference modelling ofhuman thorax as a volume conductor, in: Proceedings ofthe 19th Annual Conference of the IEEE Engineering inMedicine and Biology Society, Chicago, 1997, pp. 2458–2460.

.