OpenDGM

A diagnostic software framework to - automatically - determine the source of a given arrhythmia. Using network theory on cardiac excitation, OpenDGM is capable of detecting all critical boundaries, to allow the optimal ablation line in each case.

Open source

OpenDGM is actively maintained and new features are added regularly. It is open source and free to use under the GPLv3. GNU GENERAL PUBLIC LICENSE version 3.

Intuitive

Each core object - mesh, graph, cycles, ... - has its own wrapper class for quick access, manipulation and visualization.

Modular

Our modular approach makes it easy to swap different parts in your pipeline to test different setups. The in- and output of a module stays the same. What happens in between is up to you!

Scalable

Modules make it easily scalable. Run and compare multiple cases or run your algorithms over a whole parameter space.

Modules

Core

Internal helpers (validation decorators), method timer and logging.

Parser

Parsing of electrophysiological mapping data. We support the following mapping systems and simulation software:

CARTO, Rhythmia, EnSight, OpenCARP, OpenEP, Optical mapping data.

Signal

Processing of signal data. Multiple filters are implemented as well as different ways to annotate signals and extract local activation times.

Topo

Topology bases objects and processing toolkit to manipulate those objects. These objects form the basis for in- and output of our other modules.

.

Algorithm

Algorithms to detect phase singularities, reentry cycles, focal sources, (critical) boundaries.

Using topology, phasemapping, helmholtz, cycle search and others.

Visualization

A lightweight PyVista wrapper for easy visualization, including animations, time series and widget functionality.

Get started

Visit our code repository and get started now!

git clone https://gitlab.com/opendgm/opendgm.git
cd opendgm
pip install .

Show / Hide text

Let's see how it works! We start by importing the needed modules and load some data.

from pathlib import Path
import numpy as np

from opendgm.algorithm import PhaseMapping
from opendgm.visualization import Plotter
from opendgm.topo import Complex
Data parsing

! Parsers are available for major mapping systems and simulation software such as CARTO, Rhythmia and OpenCARP.

root = Path(__file__).parent / "_data" / "grid_21x21"
points = np.loadtxt(root / "points.txt")
faces = np.loadtxt(root / "elements.txt").astype(int)
phases = np.loadtxt(root / "phases.txt")
Complex instance

We construct a Complex object from our sampled data, representing the simplex layers (points, edges, faces and cells) of our surface or volumetric mesh. Here we build our complex using the faces connectivity.

complex = Complex.from_connectivity(points, faces, phases)
Algorithm

Using our complex as input, we run the phasemapping algorithm.

threshold = 0.4 * np.pi
complex.run(PhaseMapping(phase_th=threshold))
Visualization

We show the face and edge layers of the complex, as well as the calculated boundaries.

boundary = complex.subcomplex("defect_number_bnd") # The calculated boundary

plot = Plotter()
plot.add_mesh(complex.faces)
plot.add_mesh(complex.edges)
plot.add_mesh(boundary, cmap="bwr", n_colors=3, line_width=4)

plot.add_time_slider() # Move through the timesteps of our data
plot.show()
plot.animate()
plot.add_time_slider()
plot.show()

The full example above can be found at examples/get_started.py in our repository!

For more examples on the use of each module, please check the examples folder of our repository.

Contact us

We'd like to hear from you! If you are interested in using OpenDGM, in collaborating with us or want to provide us with valuable feedback, simply send us an email and we will contact you as soon as possible.

For research collaborations
nele.vandersickel@ugent.be

Software-related
sander.hendrickx@ugent.be