Metadata-Version: 2.2
Name: arritmic3d
Version: 3.0b6
Summary: Fast eikonal solver for electrophysiology simulation
Author: Dolors Serra
Author-Email: Giada Romitti <giada.romitti@uv.es>, Fernando Barber <fernando.barber@uv.es>, =?utf-8?q?Ignacio_Garc=C3=ADa-Fern=C3=A1ndez?= <ignacio.garcia@uv.es>
License:                    GNU LESSER GENERAL PUBLIC LICENSE
                                Version 3, 29 June 2007
         
          Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
          Everyone is permitted to copy and distribute verbatim copies
          of this license document, but changing it is not allowed.
         
         
           This version of the GNU Lesser General Public License incorporates
         the terms and conditions of version 3 of the GNU General Public
         License, supplemented by the additional permissions listed below.
         
           0. Additional Definitions.
         
           As used herein, "this License" refers to version 3 of the GNU Lesser
         General Public License, and the "GNU GPL" refers to version 3 of the GNU
         General Public License.
         
           "The Library" refers to a covered work governed by this License,
         other than an Application or a Combined Work as defined below.
         
           An "Application" is any work that makes use of an interface provided
         by the Library, but which is not otherwise based on the Library.
         Defining a subclass of a class defined by the Library is deemed a mode
         of using an interface provided by the Library.
         
           A "Combined Work" is a work produced by combining or linking an
         Application with the Library.  The particular version of the Library
         with which the Combined Work was made is also called the "Linked
         Version".
         
           The "Minimal Corresponding Source" for a Combined Work means the
         Corresponding Source for the Combined Work, excluding any source code
         for portions of the Combined Work that, considered in isolation, are
         based on the Application, and not on the Linked Version.
         
           The "Corresponding Application Code" for a Combined Work means the
         object code and/or source code for the Application, including any data
         and utility programs needed for reproducing the Combined Work from the
         Application, but excluding the System Libraries of the Combined Work.
         
           1. Exception to Section 3 of the GNU GPL.
         
           You may convey a covered work under sections 3 and 4 of this License
         without being bound by section 3 of the GNU GPL.
         
           2. Conveying Modified Versions.
         
           If you modify a copy of the Library, and, in your modifications, a
         facility refers to a function or data to be supplied by an Application
         that uses the facility (other than as an argument passed when the
         facility is invoked), then you may convey a copy of the modified
         version:
         
            a) under this License, provided that you make a good faith effort to
            ensure that, in the event an Application does not supply the
            function or data, the facility still operates, and performs
            whatever part of its purpose remains meaningful, or
         
            b) under the GNU GPL, with none of the additional permissions of
            this License applicable to that copy.
         
           3. Object Code Incorporating Material from Library Header Files.
         
           The object code form of an Application may incorporate material from
         a header file that is part of the Library.  You may convey such object
         code under terms of your choice, provided that, if the incorporated
         material is not limited to numerical parameters, data structure
         layouts and accessors, or small macros, inline functions and templates
         (ten or fewer lines in length), you do both of the following:
         
            a) Give prominent notice with each copy of the object code that the
            Library is used in it and that the Library and its use are
            covered by this License.
         
            b) Accompany the object code with a copy of the GNU GPL and this license
            document.
         
           4. Combined Works.
         
           You may convey a Combined Work under terms of your choice that,
         taken together, effectively do not restrict modification of the
         portions of the Library contained in the Combined Work and reverse
         engineering for debugging such modifications, if you also do each of
         the following:
         
            a) Give prominent notice with each copy of the Combined Work that
            the Library is used in it and that the Library and its use are
            covered by this License.
         
            b) Accompany the Combined Work with a copy of the GNU GPL and this license
            document.
         
            c) For a Combined Work that displays copyright notices during
            execution, include the copyright notice for the Library among
            these notices, as well as a reference directing the user to the
            copies of the GNU GPL and this license document.
         
            d) Do one of the following:
         
                0) Convey the Minimal Corresponding Source under the terms of this
                License, and the Corresponding Application Code in a form
                suitable for, and under terms that permit, the user to
                recombine or relink the Application with a modified version of
                the Linked Version to produce a modified Combined Work, in the
                manner specified by section 6 of the GNU GPL for conveying
                Corresponding Source.
         
                1) Use a suitable shared library mechanism for linking with the
                Library.  A suitable mechanism is one that (a) uses at run time
                a copy of the Library already present on the user's computer
                system, and (b) will operate properly with a modified version
                of the Library that is interface-compatible with the Linked
                Version.
         
            e) Provide Installation Information, but only if you would otherwise
            be required to provide such information under section 6 of the
            GNU GPL, and only to the extent that such information is
            necessary to install and execute a modified version of the
            Combined Work produced by recombining or relinking the
            Application with a modified version of the Linked Version. (If
            you use option 4d0, the Installation Information must accompany
            the Minimal Corresponding Source and Corresponding Application
            Code. If you use option 4d1, you must provide the Installation
            Information in the manner specified by section 6 of the GNU GPL
            for conveying Corresponding Source.)
         
           5. Combined Libraries.
         
           You may place library facilities that are a work based on the
         Library side by side in a single library together with other library
         facilities that are not Applications and are not covered by this
         License, and convey such a combined library under terms of your
         choice, if you do both of the following:
         
            a) Accompany the combined library with a copy of the same work based
            on the Library, uncombined with any other library facilities,
            conveyed under the terms of this License.
         
            b) Give prominent notice with the combined library that part of it
            is a work based on the Library, and explaining where to find the
            accompanying uncombined form of the same work.
         
           6. Revised Versions of the GNU Lesser General Public License.
         
           The Free Software Foundation may publish revised and/or new versions
         of the GNU Lesser General Public License from time to time. Such new
         versions will be similar in spirit to the present version, but may
         differ in detail to address new problems or concerns.
         
           Each version is given a distinguishing version number. If the
         Library as you received it specifies that a certain numbered version
         of the GNU Lesser General Public License "or any later version"
         applies to it, you have the option of following the terms and
         conditions either of that published version or of any later version
         published by the Free Software Foundation. If the Library as you
         received it does not specify a version number of the GNU Lesser
         General Public License, you may choose any version of the GNU Lesser
         General Public License ever published by the Free Software Foundation.
         
           If the Library as you received it specifies that a proxy can decide
         whether future versions of the GNU Lesser General Public License shall
         apply, that proxy's public statement of acceptance of any version is
         permanent authorization for you to choose that version for the
         Library.
         
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Project-URL: Homepage, https://github.com/CommlabUV/arritmic3d
Project-URL: Issues, https://github.com/CommlabUV/arritmic3d/issues
Project-URL: Repository, https://github.com/CommlabUV/arritmic3d.git
Project-URL: Changelog, https://github.com/CommlabUV/arritmic3d/blob/main/CHANGELOG.md
Requires-Python: >=3.10
Requires-Dist: numpy>=1.21
Requires-Dist: pyvista>=0.40
Description-Content-Type: text/markdown

# Arritmic3D: A fast Eikonal computational model for electrophysiology
simulation
CoMMLab
2026-01-01

- [Installation](#installation)
- [Compilation from source](#compilation-from-source)
- [Usage](#usage)
- [Citing Arritmic3D](#citing-arritmic3d)
- [Related research](#related-research)

Arritmic3D is a fast Eikonal computational model for electrophysiology
simulation.

The simulator has three versions in separate branches: branch `main`
(this branch), with a development version, branch `ventricle`, with the
ventricle version, and branch `atria`, with the atria version. Checkout
the desired branch before proceeding.

> [!WARNING]
>
> This development branch is not fully functional and has some
> differences in the diffusion model with respect to the other two
> branches. Thus, **this branch is not validated and should not be used
> for research purposes yet**.

The original version of the solver was developed in the Java environment
[Processing](https://processing.org/). Now it is being migrated to C++
and provided with a Python interface.

# Installation

Arritmic3D is available as a Python package in PyPI. From a python environment, you can install the package using pip:

``` bash
pip install arritmic3d
```

This will also install some convenience scripts that can be used from outside the python environment, as command line tools (see the [usage](#usage) section).

# Compilation from source

You can also compile the wheel yourself. To compile it, you
need a standard C++17 compiler, Eigen and Pybind11 installed in your
system.

As a reference, in an ubuntu machine it should be enough to run:

``` bash
sudo apt-get install \
    build-essential \
    pkg-config \
    cmake \
    python3-dev \
    gcc \
    g++ \
    libeigen3-dev \
    python3-pybind11
```

Then, clone the repository from [GitHub](https://github.com/CoMMLabuv/Arritmic3D) and compile the wheel by running:

``` bash
python -m pip install --upgrade pip setuptools wheel
python -m pip install .
```


# Usage

The solver is presented as a C++ library with is wrapped in a Python module.
In addition, a Python script to run simulations is provided as an executable called `arritmic3d`. This script is meant to provide a reather flexible way to run simulations in many common scenarios.

However, for advanced usage, you can build your own Python programs that use the Arritmic3D module.
You can find the Arritmic3D API documentation
[here](docs/Arritmic3D_API.md).

A guide on the usage of the `arritmic3d` script and other related tools can be found in the
[web page](https://commlabuv.github.io/arritmic3d/).


# Citing Arritmic3D

If you find Arritmic3D useful for your research, please cite the
following paper:


<div id="refs" class="references csl-bib-body hanging-indent"
entry-spacing="0">

<div id="ref-serraAutomataBasedCardiacElectrophysiology2022"
class="csl-entry">

Serra, Dolors, Pau Romero, Ignacio Garcia-Fernandez, Miguel Lozano,
Alejandro Liberos, Miguel Rodrigo, Alfonso Bueno-Orovio, Antonio
Berruezo, and Rafael Sebastian. 2022. “An Automata-Based Cardiac
Electrophysiology Simulator to Assess Arrhythmia Inducibility.”
*Mathematics* 10 (8): 1293. <https://doi.org/10.3390/math10081293>.
</div>

</div>

# Related research

<div id="refs" class="references csl-bib-body hanging-indent"
entry-spacing="0">

<div id="ref-romittiImplementationCellularAutomaton2025"
class="csl-entry">

Romitti, Giada S., Alejandro Liberos, María Termenón-Rivas, Javier
Barrios-Álvarez De Arcaya, Dolors Serra, Pau Romero, David Calvo, et al.
2025. “Implementation of a Cellular Automaton for Efficient Simulations
of Atrial Arrhythmias.” *Medical Image Analysis* 101 (April): 103484.
<https://doi.org/10.1016/j.media.2025.103484>.

</div>

<div id="ref-serraAssessmentRiskVentricular2023" class="csl-entry">

Serra, D., P. Franco, P. Romero, G. Romitti, I. García-Fernández, M.
Lozano, A. Liberos, et al. 2023. “Assessment of Risk for Ventricular
Tachycardia Based on Extensive Electrophysiology Simulations.” In *2023
45th Annual International Conference of the IEEE Engineering in Medicine
& Biology Society (EMBC)*, 1–4. Sydney, Australia: IEEE.
<https://doi.org/10.1109/EMBC40787.2023.10340169>.

</div>

<div id="ref-serraPersonalizedFastElectrophysiology2022"
class="csl-entry">

Serra, Dolors, Paula Franco, Pau Romero, Ignacio García-Fernández,
Miguel Lozano, David Soto, Diego Penela, Antonio Berruezo, Oscar Camara,
and Rafael Sebastian. 2022. “Personalized Fast Electrophysiology
Simulations to Evaluate Arrhythmogenicity of Ventricular Slow Conduction
Channels.” In *Statistical Atlases and Computational Models of the
Heart. Regular and CMRxMotion Challenge Papers*, edited by Oscar Camara,
Esther Puyol-Antón, Chen Qin, Maxime Sermesant, Avan Suinesiaputra, Shuo
Wang, and Alistair Young, 13593:56–64. Cham: Springer Nature
Switzerland. <https://doi.org/10.1007/978-3-031-23443-9_6>.

</div>

<div id="ref-serraUnsupervisedStratificationPatients2025"
class="csl-entry">

Serra, Dolors, Pau Romero, Paula Franco, Ignacio Bernat, Miguel Lozano,
Ignacio Garcia-Fernandez, David Soto, Antonio Berruezo, Oscar Camara,
and Rafael Sebastian. 2025. “Unsupervised Stratification of Patients
With Myocardial Infarction Based on Imaging and In-Silico Biomarkers.”
*IEEE Transactions on Medical Imaging* 44 (12): 4762–74.
<https://doi.org/10.1109/TMI.2025.3582383>.

</div>

<div id="ref-serraPatientStratificationBased2024" class="csl-entry">

Serra, Dolors, Pau Romero, Miguel Lozano, Ignacio Garcia-Fernandez,
Diego Penela, Antonio Berruezo, Oscar Camara, Miguel Rodrigo, Miriam
Gil, and Rafael Sebastian. 2024. “Patient Stratification Based on Fast
Simulation of Cardiac Electrophysiology on Digital Twins.” In
*Statistical Atlases and Computational Models of the Heart. Regular and
CMRxRecon Challenge Papers*, edited by Oscar Camara, Esther Puyol-Antón,
Maxime Sermesant, Avan Suinesiaputra, Qian Tao, Chengyan Wang, and
Alistair Young, 14507:35–43. Cham: Springer Nature Switzerland.
<https://doi.org/10.1007/978-3-031-52448-6_4>.

</div>

</div>
