Next Article in Journal
Combined Edge Loss UNet for Optimized Segmentation in Total Knee Arthroplasty Preoperative Planning
Previous Article in Journal
Comparison of Traditional Impression and 3D Ear Scanning Techniques, Earmold Comfort, and Audiology Clinical Implications: A Pilot Study
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Non-Invasive Electroanatomical Mapping: A State-Space Approach for Myocardial Current Density Estimation

1
Department of Electrical Information Engineering, Faculty of Engineering, Kiel University, Kaiserstr. 2, 24143 Kiel, Germany
2
Internal Medicine 1—Cardiology and Internal Intensive Care Medicine, Med Campus III, Kepler University Hospital, Krankenhausstraße 9, 4021 Linz, Austria
3
Department of Internal Medicine III (Cardiology, Angiology and Pneumonology), University Medical Center Heidelberg, Im Neuenheimer Feld 410, 69120 Heidelberg, Germany
*
Author to whom correspondence should be addressed.
Bioengineering 2023, 10(12), 1432; https://doi.org/10.3390/bioengineering10121432
Submission received: 12 November 2023 / Revised: 5 December 2023 / Accepted: 13 December 2023 / Published: 16 December 2023
(This article belongs to the Section Biosignal Processing)

Abstract

:
Electroanatomical mapping is a method for creating a model of the electrophysiology of the human heart. Medical professionals routinely locate and ablate the site of origin of cardiac arrhythmias with invasive catheterization. Non-invasive localization takes the form of electrocardiographic (ECG) or magnetocardiographic (MCG) imaging, where the goal is to reconstruct the electrical activity of the human heart. Non-invasive alternatives to catheter electroanatomical mapping would reduce patients’ risks and open new venues for treatment planning and prevention. This work introduces a new system state-based method for estimating the electrical activity of the human heart from MCG measurements. Our model enables arbitrary propagation paths and velocities. A Kalman filter optimally estimates the current densities under the given measurements and model parameters. In an outer optimization loop, these model parameters are then optimized via gradient descent. This paper aims to establish the foundation for future research by providing a detailed mathematical explanation of the algorithm. We demonstrate the feasibility of our method through a simplified one-layer simulation. Our results show that the algorithm can learn the propagation paths from the magnetic measurements. A threshold-based segmentation into healthy and pathological tissue yields a DICE score of 0.84, a recall of 0.77, and a precision of 0.93.

1. Introduction

1.1. Motivation

Over the past century, our understanding of the human heart has increased dramatically. Today, we can diagnose and treat many more diseases than a hundred years ago. Despite this, heart disease remains the leading cause of death [1]. Cardiac arrhythmias may occur as a consequence of underlying heart disease such as cardiomyopathy or be a primary phenomenon such as in long QT syndrome, an inherited ion channel disorder. Accurately diagnosing arrhythmias often requires using invasive electroanatomical mapping techniques, thereby putting the patient at risk for complications such as bleeding or infection.
Non-invasive methods that provide the same result would spare them the risks associated with invasive measurements [2,3]. In combination with Stereotactic Body Radiation Therapy(SBRT) [4], this could potentially allow for completely non-invasive treatment of cardiac arrhythmias [5,6]. These methods would also allow measurements in cases where they are not medically indicated, providing an excellent opportunity for research and prevention.

1.2. State of the Art

The gold standard for electroanatomical mapping is invasive catheterization with systems such as EAMS, EnSite Velocity®, and CARTO®3. By tracking the position of the catheter and measuring the potential of the myocardium with the catheter head, a computer program reconstructs a map of the local activation time. Medical doctors can then use this information to select the region for ablation. To minimize risk and stress for the patients, mapping and ablation are usually performed during the same procedure. Therefore, an extensive analysis of the data prior to ablation is not possible. The invasive nature of this method also prevents its use as a diagnostic measurement. The reported accuracies of commercial systems are between 1mm and 2mm, while the reported threshold for clinical relevance is 3mm [7].
Non-invasive measurements aim to reconstruct electrical activity inside the myocardium indirectly from data such as electrocardiography (ECG), magnetocardiography (MCG) and magnetic resonance imaging (MRI). While the MRI data is used to construct a spatial model of the heart, the MCG or ECG data is used to reconstruct the electrical activity of the heart. The use of a patient-specific torso model is necessary to accurately calculate body surface potentials from myocardial currents [8,9,10]. Since the relative permeability of the human torso does not vary much, not including a torso model incurs fewer errors for forward magnetocardiographic models [11]. For this reason, we will focus on magnetic measurements [12], although an extension to include electric measurements might prove beneficial [11,13,14].
There are different approaches to solving the problem of non-invasive electroanatomical mapping. One way to circumvent the prohibitively large number of unknown parameters is to compute the current density distribution from a low-dimensional set of parameters. Gillette et al. [15] use a sophisticated electrophysiological model to compute the distribution of cardiac sources and ECG potentials over time. They then use parameter sampling to match the simulated ECG signals to the measurements. A major advantage of this digital twin approach is that the optimized parameters have well-understood electrophysiological meanings. The main limitation of this approach is the poor scaling of parameter sampling to higher-dimensional parameter vectors. Gillette et al. acknowledge that accurate modeling of substrate-based diseases would require regions of deviating parameters. At the opposite end of the spectrum from digital twins, there are supervised machine-learning approaches. Instead of fitting meaningful electrophysiological parameters to the measurements, models, usually deep neural networks, are trained to predict cardiac sources directly from non-invasive measurements. For example, Chen et al. [9] trained a convolutional neural network on pairs of heart and body surface potentials from five pigs. This approach is not limited to specific types of diseases, such as the cardiac digital twin approach, since no explicit assumptions about propagation pathways or mechanisms are made. The main challenge is acquiring suitable training data.

1.3. Contributions

In this paper, we present the mathematical foundation of a novel algorithm to estimate the current density distribution in myocardial tissue from MCG measurements. We demonstrate the capabilities and limitations using a simplified simulation. The medical problem we address primarily is the localization of arrhythmogenic tissue.
Similar to the cardiac digital twinapproach, the parameters of our model have an electrophysiological meaning. Unlike the cardiac digital twin approach, these parameters can be different for each voxel, allowing for inhomogeneities in the myocardial tissue. This is possible because we do not have to sample the parameter space. Intead, we optimize the model parameters using gradient descent. In contrast to supervised machine learning approaches, no access to heart surface potentials is required.

2. Methods

We divide the myocardium into N v equally sized voxels. For each voxel, the three-dimensional current density j v ( n ) = [ j v , x ( n ) , j v , y ( n ) , j v , x ( n ) ] is tracked, with n [ 0 N m 1 ] , where N m is the number of considered time steps, and v [ 0 N v 1 ] is the voxel index. The vector j ( n ) = [ j 0 ( n ) , , j N v 1 ( n ) ] is the concatination of these current densities, and the matrix J = [ j ( 0 ) , , j ( N m 1 ) ] is the vector of current densities over time. Similarly Z = [ z ( 0 ) , , z ( N m 1 ) ] denotes all measurements over time. The measurement vector for one time step is written as z ( n ) = [ z 0 ( n ) , , z N s 1 ( n ) ] , where N s is the number of individual sensors. The measurements can be written as z ( n ) = d ( n ) + s ( n ) , where d ( n ) is the desired signal and s ( n ) is the noise signal.
A forward model maps the estimated current densities j ^ into the measurement space through a measurement matrix H, resulting in the estimated measurements z ^ :
z ^ ( n ) = H j ^ ( n ) .
Obtaining the estimated current densities by computing the pseudoinverse of the measurement matrix H and multiplying it by the measurements z is not feasible:
j ^ ( n ) = H 1 z ( n ) .
The reason for this is the ill-posed nature of the problem. Instead, the problem of non-invasive measurements is stated as finding the, in a sense, best estimate of J for some given measured signals Z :
J ^ arg   min J ^   L J ^ , Z .

2.1. Overview

The proposed current density estimation algorithm consists of three main parts: the Model Initialization, the State Estimation, and the Model Refinement (cf. Figure 1).
The Model Initialization uses image data I , and knowledge of the electrophysiology of a healthy heart to construct the initial state space model M ^ ( 0 ) . In the State Estimation part, a sparse Kalman filter estimates the current densities J ^ ( i ) from the model M ^ ( i ) and the measurements Z , where the superscript i indicates the epoch. Using the estimated current densities J ^ ( i ) and the measurements Z , the new model M ^ ( i + 1 ) is calculated in the Model Refinement block. The main loop consists of the steps State Estimation and Model Refinement. These two steps execute alternately. After termination, the final estimated current densities J ^ ( ) and the final model M ^ ( ) can be used for further analysis.

2.2. Forward Model

The forward model describes the mapping of the current densities j into the measurements z . The measurement vector consists of N s magnetic measurements at positions P s = [ p s , 0 , , p s , N s 1 ] with orientations O s = [ o s , 0 , , o s , N s 1 ] .We calculate the magnetic fields using a superposition of Biot-Savart’s law for all voxels:
z i ( n ) = μ 0 4 π k = 0 N v 1 o s , i j k ( n ) × p s , i p v , k | | p s , i p v , k | | 2 3 V ,
where N v is the number of voxels p v , k is the position of the k-th voxel, and V is the volume of the voxels.
Using Equation (4) we calculate measurement matrix entries during the Model Initialization. In the State Estimation and Model Refinement step, the measurement matrix is used to calculate the estimated measurements by applying Equation (1).

2.3. System Model

The system model describes the prediction of system states j ( n | n 1 ) . The system model needs to facilitate arbitrary propagation paths and propagation velocities to accurately model the propagation of the action impulse through the myocardium [16,17,18]. Modeling the interactions between all voxels becomes intractable as the number of voxels increases. Therefore, we use First-order Thiran all-pass filters [19] to model the interaction between neighboring voxels.
These infinite impulse response (IIR) filters have an amplitude response of one over the whole frequency range and a constant group delay for 0 f f s / 10 . Within these limits, arbitrary group delays τ 1 sample can be achieved by applying the following equations:
y ( n ) = a · j ^ ( n k 1 ) y ( n 1 ) + j ^ ( n k 2 ) .
Equation (5) is written for a single all-pass output y. The parameter k is the integer part of the desired group delay τ , while the parameter a determines the fractional part of the group delay [19]:
a = 1 τ mod 1 1 + τ mod 1 .
We calculate the predicted current densities by applying:
j ^ v ( n ) = C v y v ( n ) + b v u ( n ) .
Here, j ^ v ( n ) is the three-dimensional current density in x-, y-, and z-direction in one voxel v . The vector y v R 243 contains the all-pass outputs that contribute to j v . The sparse matrix C v R 3 × 243 contains the 243 gains c, that map the all-pass outputs into the current densities. The influence of the control function u ( n ) on the current density j ^ v ( n ) is modelled by the corresponding entry in the control vector b v .
The control function determines the shape of the action potential. We use Myokit [20] to calculate an action potential based on the dynamic O’Hara-Rudy model [21]. The control function u ( n ) is calculated by differentiating the action potential and scaling it to a maximum value of 1 A/mm2.

2.4. Model Initialization

In the Model Initialization, the initial values for the delays τ (cf. Equations (5) and (6)), the gains c (cf. Equation (7)), and the control vector b are computed based on the voxel positions P v = [ p v , 0 , , p v , N v 1 ] and the voxel types ζ = [ ζ 0 , , ζ N v 1 ] .
We consider six voxel types ζ in this study: sinoatrial node, atrium, atrioventricular node, His-Purkinje system, ventricle, and pathological. These six types are the minimum number needed to model the electrophysiology of the heart sensibly. They allow for a localized excitation of the heart, a localized connection between the atria and ventricles, a coordinated excitation of the ventricles via the His-Purkinje system, and a disturbed function via the pathological voxels. The assumed connectivities between the voxel types [15,18,22,23] are shown in Figure 2.
First, we calculate the delays τ ( 0 ) for all pairs of neighboring voxels based on their positions p and the propagation velocity ϕ of the input voxel type ζ i . For all voxels v i , i [ 0 , N v 1 ] and their up to 26 neighbors v o , the delay τ i , o ( 0 ) is calculated according to:
τ i , o ( 0 ) = | | p i p o | | 2 ϕ ( ζ i ) · f s .
The variable τ i , o ( 0 ) describes the delay of the propagation from voxel v o to voxel v i in samples.
Next, the gains C are calculated using an iterative algorithm. We use the symbol C i , o R 3 × 3 to denote the nine gain entries that describe the propagation from voxel v o to voxel v i . It is necessary to keep track of the activation times of each voxel. We denote these as σ R N v . Furthermore, it is necessary to keep track of the current directions in each voxel. We denote these as δ R N v × 3 . We initialize the activation time of the sinoatrial node with σ sinoatrial = 0   ms and calculate the others during the iterative procedure detailed below. This ensures that the activation in the initial model starts in the sinoatrial node. We arbitrarily choose the current direction of the sinoatrial node to be δ sinoatrial = [ 1 , 0 , 0 ] . The entries of the gain matrix C are calculated by the following procedure.
  • The iteration time t i is set to 0 ms.
  • For all voxels v o with an activation time σ o equal to the iteration time t i the following steps are carried out.
    (a)
    Identify all neighboring voxels v i , that have not been connected yet.
    (b)
    Discard all neighbors with incompatible voxel types (cf. Figure 2).
    (c)
    Calculate the current direction in v i according to the following equation, where p i is the position of the voxel v i and p o it the position of the voxel v o :
    δ i = p i p o | | p i p o | | 1 .
    (d)
    Calculate the gains C i , o between two voxels v i and v o according to the following equation:
    c j , k = δ i , j · sign δ o , k .
    The indices i and o are dropped for better readability and the indices j , k { 0 , 1 , 2 } are used to index the three by three matrix C i , o .
    (e)
    Calculate the activation time of the voxel v i as σ i = σ o + τ i , o · T s .
  • Set the iteration time t i to the smallest activation time σ that is bigger than the current iteration time t i .
We repeat steps two and three until we do not find a new activation time in step three. This procedure ensures that fast propagation paths are preferred, no voxel is activated twice, and all voxels that can be connected are connected.
Since the control function is scalar, the control matrix B simplifies to a vector b R 3 N v . We set the entry corresponding to the x component of the current density of the sinoatrial node to one and all others to zero.

2.5. State Estimation

The State Estimation uses a sparse Kalman filter to estimate the current densities J ^ ( i ) using the current model M ^ ( i ) and the measurements Z . For each timestep, we carry out the following steps. First, we predict the current densities j ^ ( n | n 1 ) by applying Equations (5) and (7). Next, we predict the state covariance matrix P ^ ( n | n 1 ) by applying:
p i , o = q i , o + k N o c o , k m N i c i , m p m , k , o N i .
Since the gains c are defined only for neighboring voxels, the summations include only said neighbors. We denote this with N . Then, the Kalman gain K ( n ) is computed by applying:
s i , o = r i , o + k = 0 3 N v 1 h o , k m N k h i , m p m , k ,
k i , o = k = 0 N s 1 s k , o 1 m N i p i , m h k , m .
We use s m , o 1 to denote the entry ( m , o ) of the inverse S 1 . After that, we correct the current densities j ^ ( n | n ) using the measurements z ( n ) by applying:
j ^ ( n | n ) = j ^ ( n | n 1 ) + K z ( n ) z ^ ( n | n 1 )
Finally, we correct the state covariance matrix P ^ ( n | n ) using the measurements z ( n ) by applying:
p i , o = k N o p k , o i i , k m = 0 N s 1 k i , m h m , k , o N i .

2.6. Model Refinement

The Model Refinement uses the estimations of the current densities J ^ ( i ) and the measurements Z to adjust the model M ( i ) , yielding the refined model M ( i + 1 ) . To this end, we calculate a loss function L ( n ) for each time step. Based on this loss we calculate the gradients L c and L a . We then adjust the gains c and the all-pass coefficients a using these gradients. The goal is to minimize the difference between the actual current densities J and the estimated current densities J ^ . Since we do not have access to the actual current densities J we minimize the difference between ground truth measurements Z and predicted measurements Z ^ instead. We denote this part of the loss as L m :
L m = 1 N s k = 0 N s 1 z k z ^ k 2 .
We place an electrophysiologically motivated constraint on the estimated current densities to restain the possible solutions. The absolute current density in a voxel may be lower than the one imposed by the control function u ( n ) due to the voxel not being fully filled with myocardial tissue or changes of the myocardial tissue filling the voxel [16,25,26]. There is, however, no reason for the current density to exceed the nominal maximum value. Therefore, we add a term to the loss that increases once the absolute current density in a voxel | | j ^ v | | 1 exceeds the normalized value of 1.01, and is zero otherwise. We denote this part of the loss as L v :
L v = v = 0 N v 1 max { 0 , ( | | j ^ v | | 1 1.01 ) 2 } .
The final loss is the sum of both parts weighted by the regularization strength γ :
L = L m + γ L v .
In order to update the gains c and delays τ , we have to calculate the respective partial derivatives of the loss function. Starting with L m c and applying the chain rule:
L m c = j c z ^ j L m z ^ ,
we arrive at:
L m c = y h 2 N s ( z ^ z ) ,
where y is the all-pass output corresponding to the gain c and h is the column of the measurement matrix H corresponding to the current density j influenced by the gain c (cf. Equation (7)). Next, L v c evaluates to:
L m c = 2 · y · sign j ^ · max { 0 , | | j ^ v | | 1 1.01 }
where y is the all pass output corresponding to c, j ^ is the estimated current density corresponding to c, and j ^ v are the three current densities, including j ^ corresponding to the voxel influenced by c. For L m a we can again apply the chain rule:
L m a = y y a j y z ^ j L m z ^ ,
arriving at:
L m a = y y a c h y 2 N s z ^ z .
The summation over the corresponding all-pass outputs y is because the all-pass coefficients are shared across nine all-pass filters that connect two voxels. Calculating y a is done by applying the following iterative equations:
y a IIR ( n ) = y ( n 1 ) + a y a IIR ( n 1 ) ,
y a FIR ( n ) = j ( n k 1 ) + a y a FIR ( n 1 ) ,
where y a = y a IIR + y a FIR ([27], Chapter 15). Lastly, since the parameters τ only influence the propagation velocity, the regularization loss L v is not used in the calculation of L a . In other words, L v a is set to zero.
Using these gradients we then update the gains c according to:
c ( i + 1 ) = c ( i ) η N m n = 0 N m 1 L ( i ) c ( i ) ( n )
and the all-pass coefficients according to
a ( i + 1 ) = a ( i ) η N m n = 0 N m 1 L ( i ) a ( i ) ( n ) ,
where η is the learning rate.
The all-pass coefficient a is only valid for values between zero and one. If, after applying Equation (27), the coefficient a is less than zero, it is increased by one, and the integer part of the delay (cf. Equation (5)) is also increased by one. If, on the other hand, the coefficient exceeds one, we have to consider two cases. If the integer part of the delay is at least one, we reduce the coefficient and the integer part by one. Otherwise, we set the coefficient is set to one.

3. Simulations

The question we want to answer with the following simulations is if our state-space current density estimation approach is able to localize regions of reduced electrical activity, which would indicate the presence of arrhythmogenic tissue [28]. While our approach can learn propagation paths and velocities from magnetic measurements, we focus on the propagation paths in these simulations. The comparison with other sophisticated approaches, as introduced in Section 1.2, remains challenging due to the lack of available source code. Therefore, we compare our results to the pseudoinverse solution (cf. Equation (2)) instead. The current density estimation should yield results that facilitate differentiation between healthy and pathological tissue. Therefore, we employ a simple threshold-based segmentation.

3.1. Setup

To answer this question, we use an abstracted one-layer heart simulation as depicted in Figure 3. The heart model consists 25 × 37 × 1 (x, y, z) voxels of size 2.5 mm, resulting in a total heart size of 65   mm × 92.5   mm × 2.5   mm (cf. Figure 3a). This model represents the unrolled surface of the heart. The voxel types are assigned based on the approximate shape of the regions in the real heart to generate a morphologically sound sinus rhythm. We differentiate between the ground truth model M , used to generate the data, and the initial model M ^ ( 0 ) . While the initial model assumes a healthy heart without any pathological regions, the ground truth model includes a region without any conduction in the right ventricle. We show the difference in voxel types between ground truth and the initial model in Figure 3c. The assumed propagation velocities are 1.1 m/s for the sinoatrial node, atrium, and ventricle, 0.012 m/s for the atrioventricular node, and 4.5 m/s for the HIS-Purkinje system. While these values are simplified, we based them on values reported in literature [15,18,22,23]. We run both models for a simulation time of 1 s with a simulation frequency of 2000 Hz.
Figure 3d,e depict the L1-norm of the simulated current densities in each voxel for t = 0.3675   s . At this time, the propagation already passed through the HIS-Purkinje system and is spreading outwards through the ventricles. The propagation is symmetrical for the initial model, while the ground truth has no electrical activity in the pathological region. Figure 3f shows the difference in these L1-norms. The current density in the initial model is higher than in the ground truth model in the region of the pathology. Since we cannot show all time steps in this fashion, Figure 3g–i show the maximum over these L1-norms during the complete cardiac cycle. While this maximum is constant over all voxels in the initial model, the ground truth model has no electrical activity in the pathological region for the complete cardiac cycle.
We use a 4 × 4 × 3 array of ideal magnetic sensors. The sensors are placed equally across a 250 mm × 250 mm × 100 mm region centered 200 mm above the heart. Since we simulate one layer of voxels, the measurements have to be scaled up to match reasonable field amplitudes as reported in [29,30,31]. We scale the measurements by a fixed factor of 70 to achieve a maximum R-peak amplitude of 100 pT for the ground truth model. We then superimpose the simulated signals with white noise of an equivalent noise spectral density of 40 fT/ Hz , which is in the order of low temperature superconducting quantum interference devices (SQUIDs) [8]. Figure 3j–l depict the magnetic measurements around the time of the QRS-complex. The dashed black line indicates the time of the maximum difference (22.5 pT) between the ground truth and the initial model at time t = 0.3675   s .
The number of voxels is N v = 962 , resulting in 2886 system states. The number of sensors is N s = 144 , which is on the high end in the number of sensors of available MCG systems [29].

3.2. Results

3.2.1. Pseudoinverse

Figure 4 summarizes the results of the pseudoinverse solution. Since the number of unknown values greatly exceeds the number of knowns, the differences between the predicted measurements and the ground truth are vanishingly small. The same, however, can not be said for the current densities. Here, no discernable structure is present. This solution favors using the outer voxels to reconstruct the magnetic measurement, but no segmentation into healthy and pathological tissue is possible based on these results.

3.2.2. State-Space Approach

Figure 5 summarizes the results of the state-space approach. We optimized the model for 2000 epochs with a learning rate of η = 200 and a regularization strength of γ = 1 .
Figure 5a shows the loss function for the first 500 epochs. Although the loss decreases slightly until the last epoch to a final value of 5.8 × 10−5, the maximum decrease happens in the earlier epochs. The maximum of the measurement differences decreases significantly from around 20 pT to 1 pT. The differences in current densities to the ground truth in pathological tissue regions are significantly reduced, while differences in healthy regions increase slightly.
Figure 5f,g show the results of the simple threshold-based segmentation. The segmentation compares the maximum L1-norm in each voxel to a threshold. We classify the voxel as pathological if the L1-norm is below a threshold. Otherwise, we classify it as healthy. Based on this segmentation, a DICE score is calculated. Figure 5f shows this DICE score for all thresholds from 0.6 to 1.0. A threshold of 0.88 achieves the maximum DICE score of 0.84. Figure 5g shows the results of a segmentation based on this optimal threshold. Most pathological voxels are correctly classified. We achieve a recall of 0.77. Not many healthy voxels are incorrectly classified as pathological, achieving a precision of 0.93. All false positives (FP) are adjacent to the actual pathological region.
Executing one epoch of this algorithm takes around 1 s on an M2 MAX processor, using a single core. The algorithm is mostly converged after 500 epochs or 8 min. All 2000 epochs take around 30 min.

3.3. Discussion

We simulated a single layer of tissue leading to a relatively small number of voxels. At the same time, the number of sensors is on the high end for MCG sensor systems. Even in these favorable circumstances, the naive solution of using the pseudoinverse is not feasible. More sophisticated approaches are needed to extract useful information about the current density distribution in the human heart from non-invasive measurements.
While our state-space approach is not able to perfectly reconstruct the ground-truth current densities, the results show a clear structure. Throughout the optimization, the difference between the estimated magnetic measurements and the ground-truth measurements is reduced. The same holds for the current densities. The optimized model shows a reduced maximum current density in the pathological region of the ground truth model. For a perfect reconstruction, the maximum current density in this region would have to be zero. The optimized model only reduces the maximum to around 0.5A/mm2 in this region. At the same time, the maximum current density is also slightly reduced in regions that do not correspond to the pathological region in the ground truth model. The most obvious reason for this is that while our state-space approach applies a strong regularization and bias on the estimated current densities, the ill-posedness of the problem still leads to non-unique solutions. An extensive hyperparameter optimization over the learning rate, regularization strength, and Kalman parameters is expected to improve these results. With a DICE score of 0.84, segmentation solely based on the maximum current densities in each voxel is possible. These findings prove, that it is possible to differentiate between pathological and healthy tissue for this simplified model. This does suggest that regions with reduced electrical activity could also be found in real hearts, given sufficient measurements.
There are currently several limitations to our approach. First, we do not explicitly model any secondary currents caused by return paths. The update step of the State Estimation block implicitly calculates the return currents that flow through the myocardium. Our model cannot describe currents outside these voxels. Second, magnetic sensors do not measure the magnetic field perfectly. They only have a limited linear region and a non-flat frequency response [29]. Furthermore, they do not measure the magnetic field at one point but accumulate it over their sensing area. Third, there is a gradient in the refractory period in the myocardium [32]. Our model cannot capture this aspect of the electrophysiology of the heart. The control function encodes the de- and repolarization phases of the action potential. Since both are propagated using the same parameters, the refractory time cannot be varied depending on the location of the voxel. Since the signal generated by the depolarization phase is dominant over the one generated by the repolarization phase, the expected impact on the localization of arrhythmogenic tissue is low.
In order to apply this algorithm to patient data the following steps have to be taken. First, generating the spatial model of the patient’s heart requires a segmented MRI scan. Manual segmentation is feasible for proof of concept studies. For widespread application, automatic segmentation [33] is needed to reduce the time effort. Second, the initial propagation velocities can be estimated using characteristic times of the measured MCG. For example, researchers can use the P-wave’s duration and the spatial extent of the atrium to calculate the average propagation velocity in this area. After this, one can apply the algorithm as outlined in this paper. The resulting estimated current densities can then inform the decisions of medical professionals. With an execution time of 30 min, the algorithm is viable in clinical practice. The execution time will increase when applied to a whole heart instead of just one layer. There are, however, still opportunities to speed up the algorithm by using multithreading or fine-tuned code optimization. Another practical concern is that body movements (mainly respiration-induced) cause a subtle time-varying position change of the sensor array towards the heart. However, magnetic localization approaches (as conceptualized in [34]) can provide the position data required to compensate for such artifacts. While most clinics have access to MRI systems, they rarely have access to MCG systems [35]. An extension of our algorithm to also work for the more readily available ECG data would necessitate the extension of the forward model, including the consideration of the torso geometry and permittivities [8,9,10].

4. Conclusions

This paper introduces a novel state-space algorithm for the non-invasive estimation of cardiac current densities from MCG signals, allowing for arbitrary propagation paths and velocities. We demonstrated the algorithm’s ability to differentiate between healthy and pathological tissue in a simulated environment. Segmentation with the optimal threshold achieves a DICE score of 0.84. The presented results prove the ability to learn propagation paths from magnetic measurements. An extension of the algorithm to deal with the current limitation and apply it to patient data is feasible. Potentially, the algorithm can non-invasively localize arrhythmogenic tissue in clinical settings after further development.

Author Contributions

Conceptualization, E.E. (Erik Engelhardt) and G.S.; methodology, E.E. (Erik Engelhardt); software, E.E. (Erik Engelhardt); validation, E.E. (Erik Engelhardt); formal analysis, E.E. (Erik Engelhardt); investigation, E.E. (Erik Engelhardt); writing—original draft preparation, E.E. (Erik Engelhardt); writing—review and editing, E.E. (Erik Engelhardt), E.E. (Eric Elzenheimer), J.H., C.M., N.F. and G.S.; visualization, E.E. (Erik Engelhardt); supervision, N.F. and G.S.; project administration, N.F. and G.S.; funding acquisition, N.F. and G.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the German Research Foundation (Deutsche Forschungsgemeinschaft, DFG) through the Collaborative Research Center CRC 1261 Magnetoelectric Sensors: From Composite Materials to Biomagnetic Diagnostics (Project B10). We acknowledge financial support by Land Schleswig-Holstein within the funding program Open Access Publikationsfonds.

Institutional Review Board Statement

The research involving human subjects complies with all relevant national regulations and institutional guidelines and was conducted in accordance with the principles of the Declaration of Helsinki. It was approved by the Ethics Committee of the Medical Faculty of Kiel University under Eudamed number CIV-20-04-032332.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
AVAtrioventricular
EEGElectroencephalography
ECGElectrocardiography
HPSHIS-Purkinje system
MCGMagnetocardiography
MRIMagnetic resonance imaging
SASinoatrial
SBRTStereotactic Body Radiation Therapy
SQUIDSuperconducting quantum interference device

References

  1. Sidney, S.; Quesenberry, C.P.; Jaffe, M.G.; Sorel, M.; Nguyen-Huynh, M.N.; Kushi, L.H.; Go, A.S.; Rana, J.S. Recent Trends in Cardiovascular Mortality in the United States and Public Health Goals. JAMA Cardiol. 2016, 1, 594. [Google Scholar] [CrossRef]
  2. Wang, L.; Zhang, H.; Wong, K.; Liu, H.; Shi, P. Noninvasive Imaging of 3D Cardiac Electrophysiology. In Proceedings of the 2007 4th IEEE International Symposium on Biomedical Imaging: From Nano to Macro, Arlington, VA, USA, 12–15 April 2007; pp. 632–635. [Google Scholar] [CrossRef]
  3. Malkin, R.A.; Kramer, N.; Schnitz, B.; Gopalakrishnan, M.; Curry, A.L. Advances in electrical and mechanical cardiac mapping. Physiol. Meas. 2005, 26, R1–R14. [Google Scholar] [CrossRef]
  4. Benedict, S.H.; Yenice, K.M.; Followill, D.; Galvin, J.M.; Hinson, W.; Kavanagh, B.; Keall, P.; Lovelock, M.; Meeks, S.; Papiez, L.; et al. Stereotactic body radiation therapy: The report of AAPM Task Group 101. Med. Phys. 2010, 37, 4078–4101. [Google Scholar] [CrossRef]
  5. Pereira, H.; Niederer, S.; Rinaldi, C.A. Electrocardiographic imaging for cardiac arrhythmias and resynchronization therapy. EP Eur. 2020, 22, 1447–1462. [Google Scholar] [CrossRef] [PubMed]
  6. Loo, B.W.; Soltys, S.G.; Wang, L.; Lo, A.; Fahimian, B.P.; Iagaru, A.; Norton, L.; Shan, X.; Gardner, E.; Fogarty, T.; et al. Stereotactic Ablative Radiotherapy for the Treatment of Refractory Cardiac Ventricular Arrhythmia. Circ. Arrhythmia Electrophysiol. 2015, 8, 748–750. [Google Scholar] [CrossRef]
  7. Bourier, F.; Fahrig, R.; Wang, P.; Santangeli, P.; Kurzidim, K.; Strobel, N.; Moore, T.; Hinkel, C.; Al-Ahmad, A. Accuracy Assessment of Catheter Guidance Technology in Electrophysiology Procedures: A Comparison of a New 3D-Based Fluoroscopy Navigation System to Current Electroanatomic Mapping Systems. J. Cardiovasc. Electrophysiol. 2014, 25, 74–83. [Google Scholar] [CrossRef]
  8. Fenici, R.; Brisinda, D.; Meloni, A.M. Clinical application of magnetocardiography. Expert Rev. Mol. Diagn. 2005, 5, 291–313. [Google Scholar] [CrossRef] [PubMed]
  9. Chen, K.W.; Bear, L.; Lin, C.W. Solving Inverse Electrocardiographic Mapping Using Machine Learning and Deep Learning Frameworks. Sensors 2022, 22, 2331. [Google Scholar] [CrossRef] [PubMed]
  10. Pesola, K.; Nenonen, J.; Fenici, R.; Lötjönen, J.; Mäkijärvi, M.; Fenici, P.; Korhonen, P.; Lauerma, K.; Valkonen, M.; Toivonen, L.; et al. Bioelectromagnetic localization of a pacing catheter in the heart. Phys. Med. Biol. 1999, 44, 2565–2578. [Google Scholar] [CrossRef] [PubMed]
  11. Hu, Z.; Ye, K.; Bai, M.; Yang, Z.; Lin, Q. Solving the magnetocardiography forward problem in a realistic three-dimensional heart-torso model. IEEE Access 2021, 9, 107095–107103. [Google Scholar] [CrossRef]
  12. Haberkorn, W.; Steinhoff, U.; Burghoff, M.; Kosch, O.; Morguet, A.; Koch, H. Pseudo current density maps of electrophysiological heart, nerve or brain function and their physical basis. BioMagn. Res. Technol. 2006, 4, 5. [Google Scholar] [CrossRef]
  13. Smith, F.E.; Langley, P.; van Leeuwen, P.; Hailer, B.; Trahms, L.; Steinhoff, U.; Bourke, J.P.; Murray, A. Comparison of magnetocardiography and electrocardiography: A study of automatic measurement of dispersion of ventricular repolarization. EP Eur. 2006, 8, 887–893. [Google Scholar] [CrossRef]
  14. Lant, J.; Stroink, G.; ten Voorde, B.; Horacek, B.; Montague, T.J. Complementary nature of electrocardiographic and magnetocardiographic data in patients with ischemic heart disease. J. Electrocardiol. 1990, 23, 315–322. [Google Scholar] [CrossRef]
  15. Gillette, K.; Gsell, M.A.F.; Strocchi, M.; Grandits, T.; Neic, A.; Manninger, M.; Scherr, D.; Roney, C.H.; Prassl, A.J.; Augustin, C.M.; et al. A personalized real-time virtual model of whole heart electrophysiology. Front. Physiol. 2022, 13, 907190. [Google Scholar] [CrossRef] [PubMed]
  16. Kléber, A.G.; Rudy, Y. Basic Mechanisms of Cardiac Impulse Propagation and Associated Arrhythmias. Physiol. Rev. 2004, 84, 431–488. [Google Scholar] [CrossRef] [PubMed]
  17. Meijler, F.L.; Janse, M.J. Morphology and electrophysiology of the mammalian atrioventricular node. Physiol. Rev. 1988, 68, 608–647. [Google Scholar] [CrossRef] [PubMed]
  18. Kassebaum, D.G.; Van Dyke, A.R. Electrophysiological Effects of Isoproterenol on Purkinje Fibers of the Heart. Circ. Res. 1966, 19, 940–946. [Google Scholar] [CrossRef] [PubMed]
  19. Thiran, J.P. Recursive digital filters with maximally flat group delay. IEEE Trans. Circuit Theory 1971, 18, 659–664. [Google Scholar] [CrossRef]
  20. Clerx, M.; Collins, P.; de Lange, E.; Volders, P.G. Myokit: A simple interface to cardiac cellular electrophysiology. Prog. Biophys. Mol. Biol. 2016, 120, 100–114. [Google Scholar] [CrossRef] [PubMed]
  21. O’Hara, T.; Virág, L.; Varró, A.; Rudy, Y. Simulation of the Undiseased Human Cardiac Ventricular Action Potential: Model Formulation and Experimental Validation. PLoS Comput. Biol. 2011, 7, e1002061. [Google Scholar] [CrossRef]
  22. Taggart, P.; Sutton, P.M.; Opthof, T.; Coronel, R.; Trimlett, R.; Pugsley, W.; Kallis, P. Inhomogeneous Transmural Conduction During Early Ischaemia in Patients with Coronary Artery Disease. J. Mol. Cell. Cardiol. 2000, 32, 621–630. [Google Scholar] [CrossRef] [PubMed]
  23. Nagel, C.; Schuler, S.; Dössel, O.; Loewe, A. A bi-atrial statistical shape model for large-scale in silico studies of human atria: Model development and application to ECG simulations. Med. Image Anal. 2021, 74, 102210. [Google Scholar] [CrossRef]
  24. Engelhardt, E.; Elzenheimer, E.; Hoffmann, J.; Schmidt, T.; Zaman, A.; Frey, N.; Schmidt, G. A Concept for Myocardial Current Density Estimation with Magnetoelectric Sensors. Curr. Dir. Biomed. Eng. 2023, 9, 89–92. [Google Scholar] [CrossRef]
  25. Kucera, J.P.; Kléber, A.G.; Rohr, S. Slow Conduction in Cardiac Tissue, II: Effects of Branching Tissue Geometry. Circ. Res. 1998, 83, 795–805. [Google Scholar] [CrossRef]
  26. Kucera, J.P.; Rudy, Y. Mechanistic Insights Into Very Slow Conduction in Branching Cardiac Tissue: A Model Study. Circ. Res. 2001, 89, 799–806. [Google Scholar] [CrossRef]
  27. Haykin, S.S. Adaptive Filter Theory, 4th ed.; international ed.; Prentice Hall informations and system sciences series; Prentice Hall: Upper Saddle River, NJ, USA, 2002. [Google Scholar]
  28. Cronin, E.M.; Bogun, F.M.; Maury, P.; Peichl, P.; Chen, M.; Namboodiri, N.; Aguinaga, L.; Leite, L.R.; Al-Khatib, S.M.; Anter, E.; et al. 2019 HRS/EHRA/APHRS/LAHRS expert consensus statement on catheter ablation of ventricular arrhythmias. J. Interv. Card. Electrophysiol. 2020, 59, 145–298. [Google Scholar] [CrossRef]
  29. Elzenheimer, E.; Bald, C.; Engelhardt, E.; Hoffmann, J.; Hayes, P.; Arbustini, J.; Bahr, A.; Quandt, E.; Höft, M.; Schmidt, G. Quantitative Evaluation for Magnetoelectric Sensor Systems in Biomagnetic Diagnostics. Sensors 2022, 22, 1018. [Google Scholar] [CrossRef]
  30. Elzenheimer, E.; Hayes, P.; Thormahlen, L.; Engelhardt, E.; Zaman, A.; Quandt, E.; Frey, N.; Hoft, M.; Schmidt, G. Investigation of Converse Magnetoelectric Thin-Film Sensors for Magnetocardiography. IEEE Sens. J. 2023, 23, 5660–5669. [Google Scholar] [CrossRef]
  31. Reermann, J.; Elzenheimer, E.; Schmidt, G. Real-Time Biomagnetic Signal Processing for Uncooled Magnetometers in Cardiology. IEEE Sens. J. 2019, 19, 4237–4249. [Google Scholar] [CrossRef]
  32. Gillette, K.; Gsell, M.A.; Prassl, A.J.; Karabelas, E.; Reiter, U.; Reiter, G.; Grandits, T.; Payer, C.; Štern, D.; Urschler, M.; et al. A Framework for the generation of digital twins of cardiac electrophysiology from clinical 12-leads ECGs. Med. Image Anal. 2021, 71, 102080. [Google Scholar] [CrossRef] [PubMed]
  33. Bruns, S.; Wolterink, J.M.; van den Boogert, T.P.; Runge, J.H.; Bouma, B.J.; Henriques, J.P.; Baan, J.; Viergever, M.A.; Planken, R.N.; Išgum, I. Deep learning-based whole-heart segmentation in 4D contrast-enhanced cardiac CT. Comput. Biol. Med. 2022, 142, 105191. [Google Scholar] [CrossRef] [PubMed]
  34. Hoffmann, J.; Bald, C.; Schmidt, T.; Boueke, M.; Engelhardt, E.; Krüger, K.; Elzenheimer, E.; Hansen, C.; Maetzler, W.; Schmidt, G. Designing and Validating Magnetic Motion Sensing Approaches with a Real-time Simulation Pipeline. Curr. Dir. Biomed. Eng. 2023, 9, 455–458. [Google Scholar] [CrossRef]
  35. Brisinda, D.; Fenici, P.; Fenici, R. Clinical magnetocardiography: The unshielded bet—past, present, and future. Front. Cardiovasc. Med. 2023, 10, 1232882. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Schematic overview of the current density estimation algorithm.
Figure 1. Schematic overview of the current density estimation algorithm.
Bioengineering 10 01432 g001
Figure 2. Block diagram of the assumed connectivities between the six considered voxel types and the input function u . The input function u is connected to the sinoatrial node. The other arrows indicate allowed connections between neighboring voxels. For example, a direct connection from atrium to ventricleis not allowed. Instead, the propagation has to pass through the atrioventricular node and the HIS-Purkinje system before reaching the ventricles. Voxels of type pathological are not connected to other voxels in this model and, therefore, never excited. (Figure adapted from [24]).
Figure 2. Block diagram of the assumed connectivities between the six considered voxel types and the input function u . The input function u is connected to the sinoatrial node. The other arrows indicate allowed connections between neighboring voxels. For example, a direct connection from atrium to ventricleis not allowed. Instead, the propagation has to pass through the atrioventricular node and the HIS-Purkinje system before reaching the ventricles. Voxels of type pathological are not connected to other voxels in this model and, therefore, never excited. (Figure adapted from [24]).
Bioengineering 10 01432 g002
Figure 3. Overview of the used simulation setup. (a) Voxel types of the ground truth model: The colors of the voxels correspond to their type as depicted in Figure 2. A region of pathological tissue is present in the right ventricle. (b) Voxel types of the initial model: The initial model assumes a healthy heart without any pathological regions. (c) The difference in voxel types: red regions stand for differences between the ground truth and initial model. Green regions stand for equalities. (di) The L1-norm of the current densities in each voxel. (df) During the time of the maximal difference between ground truth and initial model ( t = 0.3675   s ). (gi) The maximum of this L1-norm over the complete cardiac cycle. (jl) The simulated magnetic fields z around the time of the QRS-complex. The black dashed line corresponds to the time of the maximum difference between the ground truth and the initial model ( t = 0.3675   s ).
Figure 3. Overview of the used simulation setup. (a) Voxel types of the ground truth model: The colors of the voxels correspond to their type as depicted in Figure 2. A region of pathological tissue is present in the right ventricle. (b) Voxel types of the initial model: The initial model assumes a healthy heart without any pathological regions. (c) The difference in voxel types: red regions stand for differences between the ground truth and initial model. Green regions stand for equalities. (di) The L1-norm of the current densities in each voxel. (df) During the time of the maximal difference between ground truth and initial model ( t = 0.3675   s ). (gi) The maximum of this L1-norm over the complete cardiac cycle. (jl) The simulated magnetic fields z around the time of the QRS-complex. The black dashed line corresponds to the time of the maximum difference between the ground truth and the initial model ( t = 0.3675   s ).
Bioengineering 10 01432 g003
Figure 4. The results of applying the pseudoinverse solution to the data generated by the ground truth model introduced in Figure 3. (a) The estimated measurements in pT . (b) The difference between the predicted measurements and the ground truth measurements (cf. Figure 3j). (c) Maximum of the L1-norm of the current densities in each voxel over the complete cardiac cycle. (d) The difference between these maxima and those of the ground truth (cf. Figure 3g).
Figure 4. The results of applying the pseudoinverse solution to the data generated by the ground truth model introduced in Figure 3. (a) The estimated measurements in pT . (b) The difference between the predicted measurements and the ground truth measurements (cf. Figure 3j). (c) Maximum of the L1-norm of the current densities in each voxel over the complete cardiac cycle. (d) The difference between these maxima and those of the ground truth (cf. Figure 3g).
Bioengineering 10 01432 g004
Figure 5. The results of the nested state-space optimization procedure after 2000 epochs. (a) The loss over the first 500 epochs. (b) The estimated magnetic measurements in pT . (c) The difference between these estimates and the ground truth (cf. Figure 3j). (d) Maximum of the L1-norm of the current densities in each voxel throughout the cardiac cycle. (e) The difference between these maxima and those of the ground truth (cf. Figure 3g). (f) The DICE score for different segmentation thresholds. A threshold of 0.88 achieves the maximum DICE score of 0.84. (g) The predicted voxel types for a threshold of 0.88. The color-coded regions stand for: green—true positive (TP), blue—true negatives (TN), orange—false positive (FP), and red—false negatives (FN).
Figure 5. The results of the nested state-space optimization procedure after 2000 epochs. (a) The loss over the first 500 epochs. (b) The estimated magnetic measurements in pT . (c) The difference between these estimates and the ground truth (cf. Figure 3j). (d) Maximum of the L1-norm of the current densities in each voxel throughout the cardiac cycle. (e) The difference between these maxima and those of the ground truth (cf. Figure 3g). (f) The DICE score for different segmentation thresholds. A threshold of 0.88 achieves the maximum DICE score of 0.84. (g) The predicted voxel types for a threshold of 0.88. The color-coded regions stand for: green—true positive (TP), blue—true negatives (TN), orange—false positive (FP), and red—false negatives (FN).
Bioengineering 10 01432 g005
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Engelhardt, E.; Elzenheimer, E.; Hoffmann, J.; Meledeth, C.; Frey, N.; Schmidt, G. Non-Invasive Electroanatomical Mapping: A State-Space Approach for Myocardial Current Density Estimation. Bioengineering 2023, 10, 1432. https://doi.org/10.3390/bioengineering10121432

AMA Style

Engelhardt E, Elzenheimer E, Hoffmann J, Meledeth C, Frey N, Schmidt G. Non-Invasive Electroanatomical Mapping: A State-Space Approach for Myocardial Current Density Estimation. Bioengineering. 2023; 10(12):1432. https://doi.org/10.3390/bioengineering10121432

Chicago/Turabian Style

Engelhardt, Erik, Eric Elzenheimer, Johannes Hoffmann, Christy Meledeth, Norbert Frey, and Gerhard Schmidt. 2023. "Non-Invasive Electroanatomical Mapping: A State-Space Approach for Myocardial Current Density Estimation" Bioengineering 10, no. 12: 1432. https://doi.org/10.3390/bioengineering10121432

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop