Outline
The present scheme will be described with reference to a particular problem that involves coupling a previously meshed heart[1] to a torso, as shown in the left hand panel in Figure 1. The goal is to solve for the extracellular potential (V
e) throughout the heart and the potential outside of the heart (V
o) in the elliptical equation[7]
∇•(D
i
+ D
e
)∇V
e
= -∇•(D
i
)∇V
t
; within heart muscle
∇•(σ
o
)V
o
= 0; in the torso and blood pools (1)
where D
i and D
e are the intracellular and
extracellular conductivity tensors within heart muscle, σo
represents the conductivity in the torso and blood pools respectively, and
V
t are the transmembrane potentials throughout heart muscle.
At the interface between the heart and torso, the potential is continuous
(Ve = Vo), the normal component of the extracellular current is
continuous with the normal component of the current through the torso/blood
pools (nT D
eVe = nT σo Vo, where n is the unit normal vector), and there is no flow of
intracellular current into the torso/blood pools (nT D
iVi = 0).
Figure 2 is a flow chart of the coupling scheme. The first step of the method involves embedding the heart in a preliminary voxel mesh that is slightly larger than the heart, as indicated in Figure 3. The next step involves locating preliminary voxel mesh nodes ("boundary nodes") that are outside of the heart but close to the heart, as indicated by the red circles in Figure 3. A surface ("boundary surface") is fitted to these boundary nodes. The boundary surface is essentially a projection of the outer heart surface, as shown in Figure 3. A temporary mesh ("scaffolding mesh") is generated between the outer heart surface and the boundary surface and the stiffness matrix for this mesh is computed. The scaffolding mesh is indicated by the purple area in Figure 3. The scaffolding mesh includes extraneous temporary nodes that are then removed from the stiffness matrix, leaving a coupling matrix that couples the pre-existing outer heart surface nodes to the boundary surface voxel nodes. A voxel mesh is generated for the entire torso by adding voxels to the preliminary mesh. The resulting stiffness matrix for the torso nodes is then computed. Finally, a complete system matrix is assembled from the pre-existing heart stiffness matrix, the heart/torso coupling matrix and the torso stiffness matrix.
Preliminary mesh; boundary extraction
Given the heart surface, a preliminary voxel mesh is generated that is slightly larger than the heart. In the two dimensional example illustrated in Figure 3, the preliminary voxel mesh encloses all of the squares within the blue rectangle. The nodes of this mesh are designated as Xp = (xp, yp, zp). It will be assumed that the voxels are isotropic (side length = s) and chosen to be defined with respect to some convenient origin. The preliminary voxel mesh should extend for a distance of at least 1s in the x, y and z directions beyond any point on the outer heart surface. The voxel size s is preferably the desired voxel size for the entire torso mesh.
The next step involves locating boundary nodes Xb ⊆ Xp that are outside of the heart but closest to it, as illustrated in Figures 3 and 4. The boundary nodes are located by finding boundary voxels Vb, which are defined as those voxels that have at least one node within the heart and at least one node outside of the heart. The boundary nodes Xb ⊆ Xp are defined as all of the nodes within these voxels Vb that are outside of the heart.
There are a number of methods for locating the boundary voxels. One convenient method, which was used in the present example, is applicable to any surface (e.g. the heart surface) that may be characterized by spherical harmonics[1]. In this case, the spherical harmonics provide a continuous representation of a surface, and therefore may be used to determine whether any given point is inside or outside of this surface.
More particularly, the outer heart surface Sh is approximated by Rh = F(θ,Φ), where Rh is the radius of the approximate outer heart surface, F is a spherical harmonic polynomial as will be further described below, and θ and Φ are azimuthal and polar angles, respectively. Figure 4 shows a 2-D representation of Rh. Rh, θ, and Φ are defined with respect to a convenient origin which is at the point (xh, yh, zh). This origin is preferably chosen such that it results in a good spherical harmonic expansion. The grid points Xp are translated so their origin is (xh, yh, zh), which results in a set of translated node points X'p = (xp- xh, yp - yh, zp - zh). The azimuthal and polar angles θp and Φp (with respect to the (xh, yh, zh) origin) are computed for X'p, and then the value F(θp, Φp) is computed, which is the radius of the outer heart surface at the angles θp and Φp. If this radius is greater than the radius of a translated node point, then that point is within the heart. The set of node points within the heart will be denoted by the set Xh ⊆ Xp.
The above procedure locates the nodes Xh ⊆ Xp within the heart. The boundary voxels Vb are then defined as those voxels that have at least one node within the heart (Xh) and at least one node outside of the heart. The boundary points Xb are those nodes that are within the boundary voxels but outside of the heart.
Surface formation
A surface (the boundary surface Sb) is generated by fitting a spherical harmonic expansion to the points Xb about the origin (xh, yh, zh). The radii (Rb) and azimuthal and polar angles θb and Φb are computed for the boundary points, as indicated in Figure 4, which shows only the azimuthal angle. The spherical harmonic expansion of the radii Rb may be expressed as
where N is the number of terms in the spherical harmonic expansion, Pi is the Legendre function of degree i of the first kind, Pi
m is the associated Legendre function of degree i and order m, ai, aim, bim are coefficients (to be determined), P and C are matrix and vector representations of the Legendre function values and coefficients, respectively, and R
b
is a vector representation of the radii Rb. A least squares fit (C = P\R
b
in Matlab notation) results in a set of coefficients Cbs that define the boundary surface Sb characterized by Rbs = F(θ,Φ), where F is the spherical harmonic expansion of order N with coefficients Cbs, and Rbs is the radius of a point on the surface Sb at a given pair of azimuthal and polar angles (θ, Φ).
The appropriate value of N will depend on the geometry of the problem and may be determined empirically. For the heart shown in Figure 1, N = 8 produced good results.
Scaffolding mesh generation
The next step involves forming a scaffolding mesh that couples the original heart nodes Xh to the boundary nodes Xb. The scaffolding mesh, which is indicated by the purple region in Figure 3, joins the heart surface Sh to the boundary surface Sb. With reference to Figure 5, which again shows a two dimensional example of the present scheme, the scaffolding mesh is shown in light purple and one of the scaffolding mesh elements is indicated by a dotted black quadrilateral. The scaffolding mesh provides an approximation of the electrical coupling between the original heart mesh nodes (Xh, shown as black filled circles) and the boundary nodes (Xb, shown as red filled circles). The scaffolding mesh is only an estimate of this electrical coupling because the mesh does not include the actual Xb nodes, but approximations (dotted red circles) of the locations of the boundary nodes (Xb).
In three dimensions, the scaffolding mesh comprises prismatic elements. Each prismatic element consists of two similar triangles, one on the heart surface Sh and one on the boundary surface Sb, whose corresponding vertices are joined to one another. The triangles, in turn, are formed from combinations of the original heart nodes Xh and boundary nodes Xb, and projections of these nodes.
More particularly, the heart nodes Xh are projected onto the surface Sb by a line that passes through the heart nodes and the heart origin (xh, yh, zh), as illustrated in Figure 4. Similarly, the boundary nodes Xb are projected onto both the surface Sb and the surface Sh by a line that passes through these nodes and the heart origin (xh, yh, zh). The projection of the boundary nodes on to Sb will be referred to as Xb'. From an implementation standpoint, the projections may be accomplished by calculating the (θ,Φ) pair for any point (about the (xh, yh, zh) origin), and then computing the radius R = F(θ,Φ) for either the heart surface Sh or boundary surface Sb from its corresponding spherical harmonic expansion F(θ,Φ).
The result of the mutual projections is two sets of points, one on Sh and the other on Sb, such that each point at a given (θ,Φ) on a surface has a corresponding point on the other surface at the same (θ,Φ). Thus, a triangular tessellation of one surface may be used to generate an identical triangular tessellation of the other surface.
There are many ways to tessellate a surface. The approach that was adopted took advantage of the regularity of the (θ,Φ) coordinates of the heart nodes Xh. These nodes formed a regular grid in the (θ,Φ) coordinates by choice; it is easy to form a such a regular grid when the surface at issue (Sb) is characterized by spherical harmonics. Because of the cyclicity of the azimuthal angle θ, the original (θ,Φ) grid (-π<=θ<=π) points were augmented such that those points (θa, Φa) with θa<=-4π/5 were identified, and new points with (θa+2*π, Φa) added to the grid. This "wrapped around" grid was triangulated, and the triangles characterized by all three points having θ>2*π were removed. This type of tessellation is generally acceptable only in cases when there are points at both poles (Φ = +/-pi) and there is a reasonably smooth gradation in the Φ values of the points. This condition was satisfied in the present case because the original heart points Xh were generated via a spherical harmonic expansion with an even division in the Φ direction.
The left panel in Figure 6 shows the surface of the example problem heart with both the original heart surface points (blue) and projected grid boundary points Xb (red) triangulated in the manner described above. The boundary surface (right hand panel in Figure) has shape very similar to that of the heart surface and the triangulation is identical to that shown for the heart surface.
Because each triangle on the heart surface has a corresponding triangle on the boundary surface, connecting the corresponding triangle nodes by radial line segments defines a prismatic element. All of the prismatic elements define the scaffolding mesh.
Heart to torso transfer matrix
The finite element stiffness matrix (Ak) for the prismatic element (scaffolding) mesh describes the electrical coupling between the heart surface and the boundary surface. However, this matrix contains extraneous elements, i.e. the projected heart nodes on the boundary surface (Xhp), and the projected boundary nodes on the heart surface (Xbp). These extraneous nodes must be removed, resulting in a transfer matrix between the heart nodes and the boundary nodes.
The concept of extraneous nodes will be further described with reference to Figure 5. The desired final matrix should reflect only electrical coupling between the original heart mesh nodes (Xh) shown as filled black circles and the boundary nodes (Xb) shown as filled red circles. The positions of the boundary nodes (Xb) are approximated by the dotted red circles (Xb'), so in actuality the final desired stiffness matrix will reflect the coupling between the filled black circles and the dotted red circles. However, the scaffolding matrix also contains electrical coupling between the desired nodes (filled black and dotted red circles) and extraneous nodes (circles with black and red diagonal lines), which are the projected heart nodes on the boundary surface (Xhp), and the projected boundary nodes on the heart surface (Xbp). These extraneous nodes must not exist in the desired final system matrix.
First, to assemble the finite element stiffness matrix (Ak) for the prismatic element mesh, the local stiffness matrix for each prism element is constructed. This may be done in a number of ways. For a Galerkin type FEM, a closed form local matrix based on the prismatic geometry may be used. Alternatively, each prism may be decomposed into tetrahedrons, and the stiffness matrix, based on linear basis functions, may be computed for each tetrahedron.
To remove the extraneous nodes in Ak, it was partitioned as follows:
where the subscript h denotes the heart surface nodes Xh, the subscript e denotes the extraneous nodes (Xhp ∪ Xbp) to be removed, and the subscript b' denotes the projected boundary nodes Xb'. The desired coupling matrix (Ac) between Xh and Xb' is found by solving for the extraneous nodes in the set of equations Ak = 0:
where
The set of equations Ak = 0 is somewhat of an oversimplification of the process of eliminating extraneous nodes. More precisely, the right hand side corresponding to each extraneous node is set to 0. To take a simple example, assume it is desired to eliminate a variable x2. If the row in the matrix Ak corresponding to x2 is equal to -3x1 + 4x2 - 2x3, then setting this row equal to 0 and solving for x2 yields x2 = 1/4(3x1 + 2x3). 1/4(3x1 + 2x3) is then substituted for x2 wherever it appears in any other equation, effectively eliminating x2 from the system of equations.
Total system matrix
The total system matrix comprises a combination of the preexisting FEM heart matrix (Ao), the FEM heart to torso coupling matrix Ac, and the FEM torso matrix At.
The FEM torso matrix At is based on a voxel based mesh of the torso. If the voxel torso mesh did not exist a priori, it may be generated by extending the preliminary mesh until it approaches the outer torso, as indicated by the green filled circles shown in Figure 3. The outer torso nodes may be found in a number of ways. In the approach adopted, the original torso surface nodes were multiply interpolated with two dimensional Legendre polynomials, resulting in a set of surface indicator functions analogous to the spherical harmonic surface indicator function described with reference to generation of the boundary surface.
The FEM stiffness matrix At for the voxel matrix was computed once again with a Galerkin type scheme with linear basis functions. For voxel meshes, this type of FEM matrix may be generated very quickly, on the order of a few seconds assuming reasonable computer processing speed and memory.
The FEM matrix (As) for the entire system is:
where the subscript g denotes the set of torso mesh nodes excluding the boundary nodes, and the subscript i denotes the set of original heart nodes excluding the outer surface heart nodes Xh. In this equation, the preexisting FEM heart matrix Ao has been partitioned into components: (i) that connect interior heart nodes to other interior heart nodes (); (ii) that connect interior heart nodes to nodes on the heart surface ( and ); and (iii) that connect outer heart nodes to other outer heart nodes (). Similarly, Ac and At have been partitioned into portions: (i) that connect "internal nodes" (i.e. nodes that are not a part of any other matrix) to other "internal nodes"; (ii) that connect "internal nodes" to "overlapping nodes" (i.e. nodes that appear in two matrices); and (iii) that that connect "overlapping nodes" to "overlapping nodes."
For example, represents the coupling between the outer heart surface nodes, which are overlapping nodes, to themselves in the matrix Ao. Similarly, represents the coupling between the outer heart surface nodes to themselves in the matrix Ac. The matrix entry in As for the coupling of the outer heart nodes to themselves is thus the combined entry + .
The discretized version of equation (1) is As
V
e = Ao, rhs
V
t, where V
e and V
t are the vectors corresponding to the continuous variables in equation (1), and Ao, rhs is the original, pre-computed stiffness matrix corresponding to the right hand side of equation (1). Ao, rhs and V
t must be appropriately augmented with 0's to match the size of As
V
e. The boundary conditions at the heart/torso boundary, that Ve is continuous and the normal component of the current is continuous[3], are necessarily enforced by the finite element formulation used to create As.
Test
The above described scheme was tested as follows. A spherical shell, analogous to the outer heart surface, was coupled to a surrounding spherical "torso". The potentials on the inner spherical shell were set equal to those which would have occurred had there been an ideal current dipole, normalized to unit strength, located at the sphere's origin and oriented along the z axis. Given this potential distribution, the potentials throughout the spherical "torso" were computed and compared with the analytic solution[8]:
where Φ is the polar angle (as before), R is the radius of the outer spherical torso surface, and r is the radius to an observation point. For the test problem, R was set at 50. The radius of the spherical shell/heart surface was set at 40, roughly the same size as the heart shown in Figure 1. To create the potential distribution equivalent to a dipole oriented along the z axis, the potentials on this sphere/heart surface were thus set at:
A voxel mesh, akin to the torso mesh shown in Figure 3, was generated to fill in the space between the inner and outer spherical surfaces, and the corresponding FEM matrix At was computed. Next, a coupling matrix Ac to link the torso to the nodes on the spherical shell/heart surface was created. The system of equations As *V
c = 0 was constructed, where As is the total system FEM matrix and V
c is the solution. The spherical shell/heart surface nodes were set equal to their corresponding potential V(40, Φ), resulting in an augmented system A'*V' = b, where V(i)' = 1 where i represents the spherical shell/heart surface nodes. This system was solved using the biconjugate gradient stable method, after preconditioning by scaling each row in the matrix so that its diagonal element was equal to 1.
Relative error was defined as:
where Vc is the computed solution (excluding the spherical shell/heart nodes) and Va is the analytical solution. Both the number of nodes on the spherical shell/heart surface and the number of nodes in the "torso" were varied.
Heart beat
The heart in Figure 1, which is based on the Auckland canine model[2], was meshed[1] and oriented within a human shaped torso, as shown. A cellular automata like scheme was used to generate an activation and repolarization sequence throughout the heart, resulting in a corresponding sequence of transmembrane potentials V
t
. Maximum V
t
was 100 mV, with the resting potential set at 0 mV. Initial left ventricular and right ventricular activation sites were chosen roughly in accord with Selvester et al.[9] but were adjusted to generate better matches of epicardial potentials with recordings made by Spach et al.[10] in intact chimpanzees.
A propagation sequence was generated by a simple eikonal like scheme, according to which propagation velocity (v) was assumed to be proportional to the square root of bulk cardiac tissue conductivity[11]. The eikonal like scheme was implemented by calculating a propagation time between connected nodes in the heart mesh, selecting initial activation sites, and then stepping through time to activate the remaining heart nodes. The activation time of a heart node was set equal to the activation time of its nearest neighbor plus the approximate propagation time from the heart node to this nearest neighbor. The propagation time between neighboring nodes was set equal to v/d, where v is velocity (proportional to the square root of the conductance between nodes) and d is the distance between nodes.
Repolarization was initiated from the right ventricular breakthrough area[10] and allowed to spread like a wave across the epicardium in the manner in which activation was simulated. Repolarization was then allowed to proceed inward transmurally toward the epicardium based simply on relative transmural depth. In other words, repolarization proceeded from the epicardium inward. Although this oversimplified repolarization sequence is not necessarily strictly physiologically correct[12], it was chosen because of convenience and because it produced reasonable intra-epicardial gradients and epicardial/endocardial transmembrane gradients that resulted in realistic T waves.
Within the heart muscle: (i) intracellular conductivity along and transverse to fiber direction was set equal to 1 and 1/6, respectively; (ii). extracellular conductivity along and transverse to fiber direction was set equal to 1 and 1/3, respectively. Ventricular blood and torso conductivity were set at 5 and 2.5, respectively.
The heart mesh had approximately 270000 nodes and the torso mesh had approximately 120000 nodes. The system of equations was solved with Matlab's preconditioned conjugate gradient routine. The preconditioner was an incomplete Cholesky (0 fill in) factorization of the system matrix.