Skip to content

Commit d06dc04

Browse files
authored
Merge pull request #52 from jessdtate/ibbm_release
Ibbm release
2 parents 67caae1 + cb4bbf1 commit d06dc04

19 files changed

+3569
-2862
lines changed

Documentation/ECGTool_math.tex

Lines changed: 56 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,36 @@ \chapter{Mathematical Background} \label{sec:math}
22

33
\section{Overview}
44

5-
In this chapter we describe the basic mathematical formulations, and some
5+
In this chapter we describe the basic mathematical formulations and some
66
solution approaches to the forward and inverse problems of
7-
electrocardiography. The goal of solutions to the forward problem is to
7+
electrocardiography. The goal of solutions to the forward problem, also called ECG
8+
forward Simulation, is to
89
predict potentials that could be measured in any accessible location
910
(usually the surface of the torso) given a description of the cardiac
10-
electrical sources as well as the geometry and conductivities of the torso involved. The goal of
11-
solutions to the inverse problem is to predict cardiac sources given a set
11+
electrical sources as well as the geometry and conductivities of the torso involved.
12+
The goal of solutions to the inverse problem, also called ECG imaging or ECGI,
13+
is to predict cardiac sources given a set
1214
of measurements and the same geometry and conductivity information. It is
13-
important to note that a solution to the inverse problem presupposes an
14-
available solution to the forward problem. There exists a large literature on
15-
both of these problems as well as tutorial articles
16-
(see \url{http://www.ecg-imaging.org/home/publications}), and many excellent textbook
17-
and reference chapters. Here we briefly summarize the
18-
basic background to facilitate our description of the toolkit capabilities
19-
in subsequent chapters.
20-
21-
Both forward and inverse solutions require a specific model formulation of
22-
the cardiac electrical sources. This toolkit treats two different
23-
equivalent source models. (These two models are arguably the two dominant
24-
formulations in current forward and inverse problem research.) One model,
25-
which we will refer to as the ``activation-based'' source model, assumes
26-
that the dominant feature of cardiac electrical activity is the timing of
27-
the arrival of the depolarization wavefront (known as ``activation times'')
15+
important to note that a solution to ECG Imaging presupposes an
16+
available solution to the forward simulation.
17+
Here we briefly summarize the basic background to
18+
facilitate our description of the toolkit capabilities in subsequent chapters.
19+
Please refer to the list of literature on the CEI webpage
20+
for more information (\url{http://www.ecg-imaging.org/home/publications}).
21+
22+
23+
Solving both forward and inverse problems requires a specific model formulation of
24+
the cardiac electrical sources. This toolkit contains examples from the two arguably
25+
most dominant equivalent source models used in current forward and inverse
26+
problem research. One model, which we will refer to as the ``activation-based''
27+
source model, assumes that the dominant feature of cardiac electrical activity
28+
is the timing of the arrival of the depolarization wavefront (known as ``activation times'')
2829
at each location in the heart. (A similar problem, in which the equivalent
2930
sources called ''recovery times'' are the timing of repolarization at each
30-
location, is solved in a similar fashion.) Classical
31-
results have shown that, under assumptions of isotropy and homogeneity of
31+
location, is solved in a similar fashion.) Classical results have shown that,
32+
under assumptions of isotropy and homogeneity of
3233
the myocardium, activation-based models can be reduced to the activation
33-
times on the surface of the heart. In this context, this is usually taken as
34+
times on the surface of the heart \cite{RSM:Oos2004}. In this context, this is usually taken as
3435
the epicardial (outer) and endocardial (inner) heart surfaces, connected
3536
across the base of the heart by an imaginary connecting surface. The source
3637
in this case can be modeled by a moving set of current dipoles aligned
@@ -90,9 +91,11 @@ \section{Solutions to the Forward Problem in the Forward/Inverse Toolkit}
9091
\noindent where $\BM{\sigma}$ contain the relevant conductivities and $\Phi$ the
9192
electrical potentials. The boundary conditions are given by:
9293
\begin{align} \Phi(x,y,z)|_{\Omega_k} &= V_k\\ \left. \frac{\partial
93-
\Phi}{\partial n} \right|_\Omega &= 0 \label{eq:bc}
94+
\Phi}{\partial \hat{n}} \right|_\Omega &= 0 \label{eq:bc}
9495
\end{align}
95-
\noindent where $\Omega_{k}$ is the surface on which the sources are located.
96+
\noindent where $\Omega_{k}$ is the surface on which the sources are located,
97+
$V_k$ are the potentials on that surface, and $\hat{n}$ are the surface normals
98+
of the surface.
9699

97100
As an alternative to solving this problem directly, a (weighted) integral
98101
can be taken over the solution domain on both sides of Eq.~(\ref{eq:eq})
@@ -105,8 +108,9 @@ \section{Solutions to the Forward Problem in the Forward/Inverse Toolkit}
105108
In a tractable geometry, such as a set of concentric or even eccentric
106109
spheres, this PDE can be solved via analytical expansions. However in
107110
complex geometries such as realistic torso models, numerical solutions must
108-
be applied. Again there is a large literature on such numerical
109-
methods. Two of these methods have predominated in the literature for
111+
be applied.
112+
%Again there is a large literature on such numerical methods.
113+
Two of these methods have predominated in the literature for
110114
forward electrocardiography: the Finite Element Method (FEM) and the
111115
Boundary Element Method (BEM). It is these two methods which have been
112116
implemented in this toolkit. Thus, in the rest of this subsection, we give a
@@ -123,9 +127,9 @@ \section{Solutions to the Forward Problem in the Forward/Inverse Toolkit}
123127
these surfaces is then discretized into a mesh. In other words, in both FEM
124128
and BEM there exists a collection of points, called nodes, which define the
125129
respective volume or surface elements. The potential $\Phi$ (and the
126-
current, $\BM{\sigma} \nabla \Phi)$, is approximated by interpolation of
127-
potential and current across those elements, based on its value at the
128-
nodes, using known (usually polynomial) interpolation functions. Thus,
130+
current, $\BM{\sigma} \nabla \Phi)$, is approximated by interpolating the
131+
potential and current across those elements based on its value at the
132+
nodes using known (usually polynomial) interpolation functions. Thus,
129133
numerical integration can be applied to the weak form, and the node values
130134
come out of the integrals, leaving subintegrals over known functions which
131135
result in a set of weights. The result in either case is a system of
@@ -243,12 +247,10 @@ \subsection{FEM in the Forward/Inverse Toolkit}
243247
this reduces to replacing the $0$'s on the right hand side by known
244248
currents or fixing some values of the vector $\BM{\Phi}$ to correspond to
245249
known voltages. There are a variety of ways to accomplish this to preserve
246-
certain numerical properties of the matrix equation, and again we refer the
247-
reader to the vast literature on this subject for details. If the
250+
certain numerical properties of the matrix equation. If the
248251
measurement electrodes are treated as being larger than one node in size,
249252
this can lead to additional boundary conditions which in turn leads to
250-
additional modifications of the equations, and again we refer the reader to
251-
the literature.
253+
additional modifications of the equations.
252254

253255
The result is a matrix equation whose size is the total number of nodes in
254256
the volume, which tends to result in a relatively large system. However, as
@@ -282,10 +284,10 @@ \subsection{FEM in the Forward/Inverse Toolkit}
282284
provided an example SCIRun network to implement one of them, the so-called
283285
``lead field'' method, which solves the matrix equation repeatedly for
284286
source vectors consisting of a $1$ at each source node in turn and $0$ at
285-
all other source nodes. From this collection of solutions we can obtain the
286-
desired transfer matrix, which we will denote a $\mathbf{A}$. This network is described below in
287-
Ch.~\ref{ch:fwd} and once again the details are available to the interested
288-
reader in the literature.
287+
all other source nodes \cite{JDT:Gul97}. From this collection of solutions we
288+
can obtain the desired transfer matrix, which we will denote as $\mathbf{A}$
289+
as used in eq.~\ref{eg:TransMat}.
290+
This network is described below in Ch.~\ref{ch:fwd}.
289291

290292
\subsection{BEM in the Forward/Inverse Toolkit}
291293

@@ -298,10 +300,9 @@ \subsection{BEM in the Forward/Inverse Toolkit}
298300
that assumption, the surfaces of those subdomains become a sufficient
299301
domain upon which to solve the problem for the entire domain.
300302

301-
Briefly (and once again we refer the reader to the literature for the
302-
details and complications), one of the Green's Theorems from vector
303+
Briefly, one of the Green's Theorems from vector
303304
calculus is applied to an integrated form of Laplace's equation to transform the
304-
differential problem into a Fredholm integral problem. The surfaces are
305+
differential problem into a Fredholm integral problem \cite{RSM:Bar77}. The surfaces are
305306
each subdivided (tessellated) into a collection of small surface (or
306307
boundary) elements. Then (two-dimensional) basis functions (again usually
307308
low-order polynomials) are used to
@@ -314,7 +315,8 @@ \subsection{BEM in the Forward/Inverse Toolkit}
314315
In the BEM method, these integrals involve as unknowns the
315316
potential and its gradient. The integration involves the computation of the
316317
distance between each node within the surface and to all others surfaces.
317-
In complicated geometries, and in all cases when the node is integrated against the points on its ``own''
318+
In complicated geometries, and in all cases when the node is integrated
319+
against the points on its ``own''
318320
surface, there are numerical difficulties computing these integrals. In those cases
319321
there are a number of sophisticated solutions which have been proposed in the literature (and
320322
some of them are adopted in the SCIRun implementation).
@@ -388,8 +390,8 @@ \section{Solutions to the Inverse Problem in the Forward/Inverse Toolkit}
388390

389391
\subsection{Activation-based Inverse Solutions in the Forward/Inverse Toolkit}
390392

391-
Since this problem is non-linear, iterative solutions are employed. An
392-
``initial guess'', or starting point, is required. Then
393+
Since the acitvation-based inverse problem is non-linear, iterative solutions
394+
are employed. An ``initial guess'', or starting point, is required. Then
393395
solutions are iteratively re-computed until a desired convergence criterion
394396
is met. Currently in the toolkit, we have a Matlab version of a Gauss-Newton
395397
iterative solver which can be called from within SCIRun. The starting
@@ -409,8 +411,17 @@ \subsection{Potential-based Inverse Solutions in the Forward/Inverse Toolkit}
409411

410412
\subsubsection{Standard Tikhonov regularization}
411413

412-
The Tikhonov regularization minimizes $ \| Ax - y \|$ in order to solve $Ax=y$, where $x$ is the unknown solution and $y$ the given measurement. The forward solution matrix $\mathbf{A}$ is of size $m\times n$, where $m$ is the number of measurement channels and $n$ is the number of source reconstruction points).
413-
The system $Ax$ can be overdetermined ($m > n$), underdetermined ($m <n$) or $m=n$. $A$ is often ill-conditioned or singular, so it needs to be regularized. The Tikhonov regularization is often used to overcome those problems by introducing a minimum solution norm constraint, such as $\lambda \|Lx\|_2^2$. The solution of the problem can be found by minimizing the following function:
414+
The Tikhonov regularization minimizes $ \| Ax - y \|$ in order to solve $Ax=y$,
415+
which is the same as eq.~\ref{eq:TransMat} with $x$ replacing $x(t)$ for the
416+
unknown solution and $y$ replacing $y(t)$ for the given measurement. The
417+
forward solution matrix $\mathbf{A}$ is of size $m\times n$, where $m$ is the
418+
number of measurement channels and $n$ is the number of source reconstruction
419+
points). The system $Ax$ can be overdetermined ($m > n$), underdetermined
420+
($m <n$) or $m=n$. $A$ is often ill-conditioned or singular, so it needs to be
421+
regularized. The Tikhonov regularization is often used to overcome those
422+
problems by introducing a minimum solution norm constraint, such as
423+
$\lambda \|Lx\|_2^2$. The solution of the problem can be found by
424+
minimizing the following function:
414425
\begin{center}
415426
\begin{eqnarray}
416427
f (x) = \| P (y - A x) \|^{2}_{2} + \lambda^{2} \| Lx \|^{2}_{2},
@@ -419,8 +430,6 @@ \subsubsection{Standard Tikhonov regularization}
419430
\end{center}
420431

421432
\noindent where $\lambda$ is the regularization parameter, which is a user defined scalar value. The matrix $\mathbf{P}$ represents the \textit{a priori} knowledge of the measurements. The matrix $\mathbf{L}$ describes the property of the solution $x$ to be constrained.
422-
%The following sentence doesn't fit here and is removed. (Dafang)
423-
%as well as the posed \textit{a prior knowledge} expressed as a weighting of the measurements $P$ (also $C$ see below, e.g. sensor covariance matrix) and $L$ (also $W$ see below) which constraints the solution $x$.
424433
Conceptually, $\lambda$ trades off between the misfit between predicted and measured data (the first term in the equation) and the \textit{a priori} constraint.
425434
An approximate solution $\hat{x}$ of \ref{tik_problem} is given for the
426435
overdetermined case ($n > m$) as follows:

Documentation/ECGToolkitGuide.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
% Inverse ---------------------------------------------------------------
4343
\input{ECGTool_inverse}
4444

45-
\bibliography{strings,biglit,sci,jdt}
45+
\bibliography{toolkit}
4646
\bibliographystyle{unsrt}
4747

4848
\end{document}
Binary file not shown.

Documentation/toolkit.bib

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
@INPROCEEDINGS{JDT:Gul97,
2+
author="R. M. Gulrajani",
3+
booktitle="EMBS, 1997. Proceedings of the 19th Annual International Conference of the IEEE",
4+
title="The forward problem of electrocardiography: from heart models to body surface potentials",
5+
year="1997",
6+
volume="6",
7+
pages="2604-2609 vol.6",
8+
doi="10.1109/IEMBS.1997.756866",
9+
ISSN="1094-687X",
10+
month="Oct"
11+
}
12+
13+
@Article{RSM:Gul98,
14+
author = "R.M. Gulrajani",
15+
title = "The forward and inverse problems of
16+
electrocardiography",
17+
journal = "EMBS Magazine",
18+
year = "1998",
19+
volume = "17",
20+
number = "5",
21+
pages = "84--101",
22+
robnote = "New review by Ramesh from his book",
23+
bibdate = "Wed Jun 10 18:57:00 1998",
24+
}
25+
26+
27+
@Article{RSM:Bar77,
28+
author = "R.C. Barr and M. Ramsey and M.S. Spach",
29+
title = "Relating Epicardial to Body Surface Potential
30+
Distributions by Means of Transfer Coefficients Based
31+
on Geometry Measurements",
32+
journal = "{IEEE} Trans. Biomed. Eng.",
33+
year = "1977",
34+
volume = "24",
35+
pages = "1--11",
36+
robnote = "The basis of the forward solution method is given in
37+
this paper. This is an important one for the thesis as
38+
the intrgral method based on Green's theorum is used to
39+
calculate torso potentials from epicardial ones. The
40+
data is from the dog. We start from this point in our
41+
development of the problem., ECG055",
42+
}
43+
44+
45+
@Article{RSM:Oos2004,
46+
author = "A. van Oosterom and T.F. Oostendorp",
47+
title = "{ECGSIM}: an interactive tool for studying the genesis
48+
of {QRST} waveforms.",
49+
journal = "Heart",
50+
year = "2004",
51+
month = feb,
52+
volume = "90",
53+
number = "2",
54+
pages = "165--168",
55+
robnote = "DESIGN: A numerical method was developed for computing
56+
ECG signals on the thorax, as well as electrograms on
57+
both endocardium and epicardium. The source
58+
representation of the myocardial electric activity is
59+
the equivalent double layer. The transfer factors
60+
between the electric sources and the resulting
61+
potentials on the heart surface as well as on the body
62+
surface were computed using a realistic thorax model.
63+
RESULTS AND CONCLUSION: The resulting transfer factors
64+
were implemented in a simulation program. The program
65+
allows the user to make interactive changes in the
66+
timing of depolarisation and repolarisation on the
67+
ventricular surface, as well as changing the local
68+
source strength, and to inspect or document the effect
69+
of such changes instantaneously on electrograms and
70+
body surface potentials, visualised by waveforms as
71+
well as by potential maps and movies. The entire
72+
simulation package can be installed free of charge from
73+
www.ecgsim.org.",
74+
bibdate = "Wed Aug 11 06:37:42 2004",
75+
}

0 commit comments

Comments
 (0)