Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2012 Apr 26.
Published in final edited form as: Conf Proc IEEE Eng Med Biol Soc. 2011;2011:267–270. doi: 10.1109/IEMBS.2011.6090052

A Toolkit for Forward/Inverse Problems in Electrocardiography within the SCIRun Problem Solving Environment

Brett M Burton 1, Jess D Tate 2, Burak Erem 3, Darrell J Swenson 4, Dafang F Wang, Michael Steffen 5, Dana H Brooks 6, Peter M van Dam 7, Rob S Macleod 8
PMCID: PMC3337752  NIHMSID: NIHMS369605  PMID: 22254301

Abstract

Computational modeling in electrocardiography often requires the examination of cardiac forward and inverse problems in order to non-invasively analyze physiological events that are otherwise inaccessible or unethical to explore. The study of these models can be performed in the open-source SCIRun problem solving environment developed at the Center for Integrative Biomedical Computing (CIBC). A new toolkit within SCIRun provides researchers with essential frameworks for constructing and manipulating electrocardiographic forward and inverse models in a highly efficient and interactive way. The toolkit contains sample networks, tutorials and documentation which direct users through SCIRun-specific approaches in the assembly and execution of these specific problems.

I. Introduction

Forward and inverse modeling in electrocardiography permits researchers to study the relationship between cardiac activity and body surface potentials (BSPs) while eliminating the highly invasive component of experimental models. Such computational models are often associated with complicated, numerical, problem-solving strategies – limiting them to researchers with advanced computational background. Additionally, there are difficulties associated with the need for large, complex, geometric models; with acquisition of useful data; and with simulation validation. Successful research and evaluation of methodological approaches requires the ability to solve these various challenges, resulting in significantly impeded progress in this area.

To address these complex challenges, the CIBC maintains, and continues to expand, the SCIRun problem solving environment, which is a general-purpose software package that provides users with an intuitive, visual, programming interface allowing users to generate large-scale models without an advanced knowledge of computer programming. New to SCIRun is the Forward/Inverse toolkit, which provides researchers with an expanded set of tools and sample networks.

For clarity, the forward problem of electrocardiography is to predict, computationally, potentials on a surface that is accessible to measurements (typically, the body surface, although probes in the heart chambers can also play this role), given a description of cardiac electrical activity and the relevant torso and heart geometries. The inverse problem, by contrast, is to estimate a useful characterization of cardiac sources given the same geometric description and the measured body surface (or probe) potentials [1], [2].

Our goal with this toolkit is not only to make available an integrated and documented set of tools to relevant research (and industrial) communities. We also want to facilitate the ability to link to other compatible and complementary software and to enable users to test their own algorithms, geometries, and data. As part of this effort our toolkit is capable of exchanging data and models with ECGSim [3], a widely-used software tool for simulating forward solutions from highly-interactive, user-controlled formulations of cardiac sources. Using SCIRun's built-in ability to communicate with Matlab we can also allow users to develop prototype algorithms in Matlab and run them from SCIRun, thus enabling easier comparison of new results with existing standards.

II. Forward/InverseToolkit

SCIRun supplies researchers with problem-solving tools capable of preparing, executing, solving and visualizing scientific simulations [4]. The SCIRun environment works on a component-based, visual programming model in which researchers are able to link together complex networks of individual, purpose-specific modules that can be interactively modified as the simulation demands [5]. Figure 1 illustrates SCIRun's module-based programming interface in action with gray (completed), green (active) and yellow (pending) modules.

Fig. 1.

Fig. 1

The module based layout of SCIRun provides and intuitive, visual approach to programming complicated forward/inverse networks.

In addition to an intuitive user interface, SCIRun also provides topic-specific toolkits that target individual types of computational problems and scientific phenomena. Toolkits are repositories of sample networks and data that can be altered to suit the needs of the user. The Forward/Inverse toolkit contains an array of sample networks and purpose defined modules while utilizing open-source data sets upon which electrocardiographic simulations can be performed.

Table I shows available tools within the Forward/Inverse toolkit. Both forward and inverse sets consist of full simulation example networks that illustrate potential and activation-based forward models utilizing finite element (FEM) and boundary element (BEM) approximation techniques. Simulation specific tools, such as lead field and stiffness matrix generators as well as regularization modules are also included.

TABLE I.

TOOLS WITHIN THE FORWARD/INVERSE TOOKIT.

Forward tools Inverse Tools
Potential-Based FEM/BEM Potential-Based *FEM/*BEM
Activation-Based FEM/BEM Activation-Based *FEM/*BEM
FEM Lead Field Calculation Regularization Methods
Stiffness Matrix Calculation - *Isotropy method
- *Gauss-Newton Method
- *Wavefront based reconstruction
- Tikhonov
- Tikhonov SVD
- Truncated SVD
- Total Variation

PENDING COMPLETION.

*

MATLAB CENTERED.

To demonstrate the utility and functionality of the Forward/Inverse toolkit, consider two case studies. Case Study 1 (Section III-A) supplies an example of a potential-based, FEM, forward modeling method as it is applied to a clinical defibrillation model. Case Study 2 (Section ??) is a boundary element approximation of the activation based inverse solution. That is, the torso potentials are provided as the known values. Given these values, as well as certain properties of the volume conducting torso, the activation times of the cardiac tissue are extracted.

III. Case Studies

A. Defibrillation Surface Potentials: A Forward Study

Implantable Cardioverter Defibrillators (ICDs) are relatively common, implantable devices that provide an electric shock to treat fatal arrhythmias in cardiac patients. Though ICDs are common, they have not been rigorously optimized for pediatric patients. Children, due to their smaller size and often abnormal anatomy, require more specialized ICD configuration than adult patients. Forward problems can be used to determine optimal energy discharge and placement of the ICD. The following case study illustrates how these forward solutions can, and have, aided clinicians implanting ICDs for maximum efficiency [6].

Determining the optimal energy required for defibrillating a patient, or defibrillation threshold (DFT), involves generating ICD and patient-specific geometries, solving the forward problem for BSPs, and calculating the DFT from the solution. Figure 2 shows the pipeline involved in this process. Segmentation of patient MRI or CT data provides the torso geometry into which ICD geometry is interactively placed. Local mesh refinement around the ICD reduces the overall number of elements while maintaining crucial details.

Fig. 2.

Fig. 2

The Defibrillation Forward Problem Pipeline. (A) A mesh is generated from patient MRI or CT data and ICD geometry is embedded. (B) Forward simulations are performed to determine BSPs and, (C) DFT is computed from scaled BSPs.

All tissues are modeled as passive with ICD geometry locations acting as sources and sinks. This allows the solution to be approximated via FEM by satisfying Poisson's equation. The DFT is found by scaling the calculated potential field so that the electric field throughout the myocardial tissue satisfies the critical mass hypothesis [7], that is 95% of the myocardium has an electric field strength greater than 5 V/cm. The scaled potential field magnitude is then used to calculate the DFT. Jolley et. al. provides parameters for the present case study.

B. Cardiac Activation Times From Body Surface Potentials: An Inverse Study

During a cardiac cycle, tissues throughout the heart activate at differing times. Coordination of activation throughout the myocardium produces synchronous heart beats. Alterations in cellular activation times (and therefore contraction times) may lead to serious, even fatal, consequences. BSPs over the course of a cardiac cycle contain information about myocyte activation time that may be clinically useful in diagnosis of patients with abnormal cardiac activity.

Generating a computational inverse model to find cardiac activation times requires knowledge of both the BSPs during the QRS segment as well as properties of the volume conducting torso [8], [3]. The epicardial wavefront is treated as a state model where cells transition for the `off' (resting) to `on' (depolarized) states. An initial guess of the activation times (time when cells switch from off to on) is supplied by the user. The initial guess supplied for this simulation was derived from an array of electric potential waveforms generated by a canine heart positioned within a phantom torso tank. An ionized solution surrounded the heart within the tank so as to provide homogeneous conductivity from the epicardium to the torso surface. Cardiac values were mapped to the ECGSIM normal male heart geometry, while psuedorandom noise was added to the torso potential values with a signal-to-noise ratio of 30dB in order to simulate measurement erros. From these simulated measurements of torso potentials a Gauss-Newton optimization routine is used to find the local minima of the Tikhonov objective function.

min(AX(τ)Y2+λLX(τ)2) (1)

where L is the regularization matrix, A is the forward solution matrix, Y is the observation matrix, and X is the source matrix parameterized by the activation times τ.

In essence, the inverse solution requires the algorithm to perform multiple forward simulations that are subtracted from the original torso potentials. This residual plus a regularization term is incrementally minimized through Gauss-Newton optimization until suitable activation times are obtained. The Forward/Inverse toolkit provides mathematical manipulation tools and solvers, as well as external interfacing tools through which the optimization can take place. Figure 3 shows an isochronal, cardiac activation map that was derived from an isopotential torso map. Such results may offer clinicians substantially more information than current ECG techniques, making diagnosis of activation time sensitive maladies more efficient and accurate.

Fig. 3.

Fig. 3

Activation-time Inverse Solution. From the body surface potentials (A) observed on the surface of the torso during a QRS segment, Isochronal values on the ventricular epicardium and endocardium (B) can be extracted.

IV. Discussion & Conclusions

A. Discussion

SCIRun's Forward/Inverse toolkit provides users with resources for defining, computing and visualizing components of forward and inverse problems. Through clinically relevant sample networks, users obtain a basic sense of these problems as well as an introduction to the interactivity and performance of the SCIRun environment. External interface options allow for custom data manipulation within the SCIRun environment, while collaborative efforts with major educational and industrial packages (such as ECGSIM [3], CHASTE [9] and CARP [10]) aim to generate output files that are compatible between programs.

Interfacing with these more specialized, external packages allows SCIRun to maintain its generality as a problem solving environment while taking advantage of the more accessible user interfaces of development-specific tools. Indeed, general purpose tools, such as SCIRun, generate a large amount of complexity. Complexity that is usually apparent in user interfacing and software developmental expansion. External package integration and compatibility as well as intuitive visualization tools are ways that SCIRun is able to reduce apparent complexity while extending a broad range of usable tools to users. Furthermore, recent updates in the SCIRun source code structure has added fast, parallel computing feature and allowed for more accessibility to users and developers in updating and extending its capabilities.

B. Conclusion

The Forward/Inverse toolkit, available in the SCIRun problem solving environment, has been able to address many of the software needs of researchers performing forward and inverse simulations in electrocardiography. This new feature of the SCIRun software package, provides researchers with a compilation of illustrative networks, sample data sets and modeling strategies. Due to limited exposure, the Forward/Inverse toolkit has only been utilized and tested on the electrocardiographic methods listed in Table I. With extended use, a framework for other simulations will be generatred and unforeseen limitations will be exposed. Current limitations of the toolkit include a dependence on the proprietary MATLAB programming package for some of the simulations and lack of node level interactivity of the system. These limiting factors are being addressed by porting MATLAB based algorithms into specifically designed modules within the SCIRun environment, while interactivity can be exported to alternative, open source tools that allow a higher degree of user interactivity. The expansion and continued development of the Forward/Inverse toolkit in the SCIRun environment has and will make accessible a large body of tools that will aid researchers in improving scientific knowledge in cardiac electrophysiology.

ACKNOWLEDGMENTS

This work was made possible in part by software from the NIH/NCRR Center for Integrative Biomedical Computing, 2P41 RR0112553-12. We gratefully acknowledge the support of Dr. Thomas Pilcher and the Primary Children's Hospital PCMCF Early Career Development Award.

This work was supported by the Center for Integrative Biomedical Computing (CIBC)

References

  • [1].Macleod R. The forward problem of electrocardiography. In: MacFarlane P, Janse M, Oosterom AV, Pahlm O, Kligfield P, Camm J, editors. Comprehensive Electrocardiology. ch. 8. vol. 1. Springer; 2011. pp. 247–298. [Google Scholar]
  • [2].Pullan A, Cheng L, Nash M, Ghodrati A, Macleod R, Brooks D. The inverse problem of electrocardiography. In: MacFarlane P, Janse M, Oosterom AV, Pahlm O, Kligfield P, Camm J, editors. Comprehensive Electrocardiology. ch. 8. vol. 1. Springer; 2011. pp. 299–344. [Google Scholar]
  • [3].van Oosterom A, Oostendorp T. ECGSIM: an interactive tool for studying the genesis of QRST waveforms. Heart. 2004 Feb;vol. 90:165–168. doi: 10.1136/hrt.2003.014662. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [4].Macleod R, Weinstein D, de St. Germain J, Brooks D, Johnson C, Parker S. Proceedings of the Int. Symp. on Biomed. Imag. Apr, 2004. Scirun/biopse: Integrated problem solving environment for bioelectric field problems and visualization; pp. 640–643. [Google Scholar]
  • [5].Shepherd J, Johnson C. Hexahedral mesh generation for biomedical models in scirun. Engineering with Computers. 2009;25(1):97–114. [Google Scholar]
  • [6].Jolley M, Stinstra J, Pieper S, MacLeod R, Brooks DH, Cecchin F, Triedman JK. A computer modeling tool for comparing novel ICD electrode orientations in children and adults. 2008;5(No 4):565–572. doi: 10.1016/j.hrthm.2008.01.018. April 2008. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [7].Jorgenson DB, Schimpf PH, Shen I, Johnson G, Bardy GH, Haynor DR, Kim Y. Predicting cardiothoracic voltages during high energy shocks: methodology and comparison of experimental to finite element model data. IEEE Trans Biomed. Eng. 1995 Jun;42:559. doi: 10.1109/10.387195. ID: 14; LR: 20041117; PUBM: Print; JID: 0012737; ppublish 0018-9294 Journal. [DOI] [PubMed] [Google Scholar]
  • [8].Pullan A, Buist M, Cheng L. Mathematically Modeling the electrical activity of the heart. World Scientific Co; Singapore: 2005. [Google Scholar]
  • [9].Bernabeu M, Bordas R, Pathmanathan P, Pitt-Francis J, Cooper J, Garny A, Gavaghan D, Rodriguez B, Southern J, Whiteley J. Chaste: incorporating a novel multi-scale spatial and temporal algorithm into a large-scale open source library. Philos Transact A Math Phys Eng Sci. 2009 May;367:1907–1930. doi: 10.1098/rsta.2008.0309. [DOI] [PubMed] [Google Scholar]
  • [10].Vigmond E, Hughes M, Plank G, Leon L. Computational tools for modeling activity in cardiac tissue. J. Electrocardiol. 2003;36:69–74. doi: 10.1016/j.jelectrocard.2003.09.017. [DOI] [PubMed] [Google Scholar]

RESOURCES