Name | fenicsx-ldrb JSON |
Version |
0.1.8
JSON |
| download |
home_page | None |
Summary | Laplace-Dirichlet Rule-based algorithm for assigning myocardial fiber orientations. |
upload_time | 2024-11-05 13:19:09 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
cardiac
electrophysiology
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
![_](https://raw.githubusercontent.com/finsberg/fenicsx-ldrb/main/docs/_static/fenicsx-ldrb-logo.png)
[![Create and publish a Docker image](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/docker-image.yml/badge.svg)](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/docker-image.yml)
[![pre-commit](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/pre-commit.yml)
[![Test package](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/main.yml/badge.svg)](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/main.yml)
[![PyPI version](https://badge.fury.io/py/fenicsx-ldrb.svg)](https://badge.fury.io/py/fenicsx-ldrb)
![GitHub License](https://img.shields.io/github/license/finsberg/fenicsx-ldrb)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
# Laplace-Dirichlet Rule-Based (LDRB) algorithm for assigning myocardial fiber orientations
A software for assigning myocardial fiber orientations based on the Laplace Dirichlet Ruled-Based algorithm based on FEniCSx.
> Bayer, J.D., Blake, R.C., Plank, G. and Trayanova, N.A., 2012.
> A novel rule-based algorithm for assigning myocardial fiber orientation
>to computational heart models. Annals of biomedical engineering, 40(10),
pp.2243-2254.(https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3518842/)
## Getting started
For example if you have a bi-ventricular geometry (e.g from [`cardiac-geometries`](https://github.com/ComputationalPhysiology/cardiac-geometriesx)), you can generate fibers as follows
```python
import cardiac_geometries
import ldrb
import dolfinx
# Generate an idealized BiV geometry
geo = cardiac_geometries.mesh.biv_ellipsoid(outdir=geodir)
# Generate fibers with 60/-60 fibers angles on the endo- and epicardium
system = ldrb.dolfinx_ldrb(mesh=geo.mesh, ffun=geo.ffun, markers=geo.markers, alpha_endo_lv=60, alpha_epi_lv=-60, beta_endo_lv=0, beta_epi_lv=0, fiber_space="P_2")
# Visualize fibers in Paraview
with dolfinx.io.VTXWriter(
geo.mesh.comm, outdir / f"microstructure-viz.bp", [system.f0, system.s0, system.n0], engine="BP4"
) as vtx:
vtx.write(0.0)
```
If you now open the file `microstructure-viz.bp` in Paraview (using the ADIOS2VTXReader), select Glyph and choose `f0` as orientation array you can see the fiber orientations similar to the following figure (here I have also added a Calculator to compute the fiber angle)
![_](docs/_static/idealized_biv.png)
Note that you can achieve the the same results using the command line interface
```
ldrb mesh.xdmf --markers-file markers.json --fiber-space P_2 --alpha-endo-lv 60 --alpha-epi-lv -60 --beta-endo-lv 0 --beta-epi-lv 0
```
Note that if you don't specify a different angle for the RV or Septum, then the same angle as the LV will be used.
## Installation
## pip
Note that you can install the package with `pip`, but then you need to install FEniCSx separatly, see [download](https://fenicsproject.org/download/)
```
python3 -m pip install fenicsx-ldrb
```
## Docker
To pull the latest docker image you can do
```
docker pull ghcr.io/finsberg/fenicsx-ldrb:main
```
or choose a specific version e.g
```
docker pull ghcr.io/finsberg/fenicsx-ldrb:v0.1.4
```
Note that you can also run the cli directly using docker e.g
```
docker run --rm -v $PWD:/home/shared -w /home/shared -it ghcr.io/finsberg/fenicsx-ldrb ldrb --help
```
# Documentation
See https://finsberg.github.io/fenicsx-ldrb
# License
MIT
# Contributors
Henrik Finsberg (henriknf@simula.no)
Raw data
{
"_id": null,
"home_page": null,
"name": "fenicsx-ldrb",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "cardiac, electrophysiology",
"author": null,
"author_email": "Henrik Finsberg <henriknf@simula.no>",
"download_url": "https://files.pythonhosted.org/packages/3f/07/67ade9cef63c77f9ea4e160ffd292c7534e5b9c85e381ddd5d88c56709b6/fenicsx_ldrb-0.1.8.tar.gz",
"platform": null,
"description": "![_](https://raw.githubusercontent.com/finsberg/fenicsx-ldrb/main/docs/_static/fenicsx-ldrb-logo.png)\n\n[![Create and publish a Docker image](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/docker-image.yml/badge.svg)](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/docker-image.yml)\n[![pre-commit](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/pre-commit.yml)\n[![Test package](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/main.yml/badge.svg)](https://github.com/finsberg/fenicsx-ldrb/actions/workflows/main.yml)\n[![PyPI version](https://badge.fury.io/py/fenicsx-ldrb.svg)](https://badge.fury.io/py/fenicsx-ldrb)\n![GitHub License](https://img.shields.io/github/license/finsberg/fenicsx-ldrb)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n# Laplace-Dirichlet Rule-Based (LDRB) algorithm for assigning myocardial fiber orientations\n\n\nA software for assigning myocardial fiber orientations based on the Laplace Dirichlet Ruled-Based algorithm based on FEniCSx.\n\n> Bayer, J.D., Blake, R.C., Plank, G. and Trayanova, N.A., 2012.\n> A novel rule-based algorithm for assigning myocardial fiber orientation\n>to computational heart models. Annals of biomedical engineering, 40(10),\npp.2243-2254.(https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3518842/)\n\n\n## Getting started\nFor example if you have a bi-ventricular geometry (e.g from [`cardiac-geometries`](https://github.com/ComputationalPhysiology/cardiac-geometriesx)), you can generate fibers as follows\n```python\nimport cardiac_geometries\nimport ldrb\nimport dolfinx\n\n# Generate an idealized BiV geometry\ngeo = cardiac_geometries.mesh.biv_ellipsoid(outdir=geodir)\n# Generate fibers with 60/-60 fibers angles on the endo- and epicardium\nsystem = ldrb.dolfinx_ldrb(mesh=geo.mesh, ffun=geo.ffun, markers=geo.markers, alpha_endo_lv=60, alpha_epi_lv=-60, beta_endo_lv=0, beta_epi_lv=0, fiber_space=\"P_2\")\n# Visualize fibers in Paraview\nwith dolfinx.io.VTXWriter(\n geo.mesh.comm, outdir / f\"microstructure-viz.bp\", [system.f0, system.s0, system.n0], engine=\"BP4\"\n) as vtx:\n vtx.write(0.0)\n```\nIf you now open the file `microstructure-viz.bp` in Paraview (using the ADIOS2VTXReader), select Glyph and choose `f0` as orientation array you can see the fiber orientations similar to the following figure (here I have also added a Calculator to compute the fiber angle)\n![_](docs/_static/idealized_biv.png)\n\nNote that you can achieve the the same results using the command line interface\n```\nldrb mesh.xdmf --markers-file markers.json --fiber-space P_2 --alpha-endo-lv 60 --alpha-epi-lv -60 --beta-endo-lv 0 --beta-epi-lv 0\n```\nNote that if you don't specify a different angle for the RV or Septum, then the same angle as the LV will be used.\n\n## Installation\n## pip\nNote that you can install the package with `pip`, but then you need to install FEniCSx separatly, see [download](https://fenicsproject.org/download/)\n```\npython3 -m pip install fenicsx-ldrb\n```\n\n## Docker\nTo pull the latest docker image you can do\n```\ndocker pull ghcr.io/finsberg/fenicsx-ldrb:main\n```\nor choose a specific version e.g\n```\ndocker pull ghcr.io/finsberg/fenicsx-ldrb:v0.1.4\n```\nNote that you can also run the cli directly using docker e.g\n```\ndocker run --rm -v $PWD:/home/shared -w /home/shared -it ghcr.io/finsberg/fenicsx-ldrb ldrb --help\n```\n\n# Documentation\nSee https://finsberg.github.io/fenicsx-ldrb\n\n\n# License\nMIT\n\n# Contributors\nHenrik Finsberg (henriknf@simula.no)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Laplace-Dirichlet Rule-based algorithm for assigning myocardial fiber orientations.",
"version": "0.1.8",
"project_urls": {
"Documentation": "https://finsberg.github.io/fenicsx-ldrb",
"Homepage": "https://finsberg.github.io/fenicsx-ldrb",
"Source": "https://github.com/finsberg/fenicsx-ldrb",
"Tracker": "https://github.com/finsberg/fenicsx-ldrb/issues"
},
"split_keywords": [
"cardiac",
" electrophysiology"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "45a42cbee548e6636658c4388ed7b181cfdcd1e8217dccad2a4825e8a8125d42",
"md5": "cfec0b21524121bfe5d9f400f3f91af4",
"sha256": "06c83bdb60b4f742b23d84c3d281871fafa55a3444c50a0830cc0448bb794886"
},
"downloads": -1,
"filename": "fenicsx_ldrb-0.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cfec0b21524121bfe5d9f400f3f91af4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 16756,
"upload_time": "2024-11-05T13:19:07",
"upload_time_iso_8601": "2024-11-05T13:19:07.649014Z",
"url": "https://files.pythonhosted.org/packages/45/a4/2cbee548e6636658c4388ed7b181cfdcd1e8217dccad2a4825e8a8125d42/fenicsx_ldrb-0.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3f0767ade9cef63c77f9ea4e160ffd292c7534e5b9c85e381ddd5d88c56709b6",
"md5": "895ed592cecfa81c72c106127a3f11b2",
"sha256": "ae42a59614a55b76dbdea19f13eaf60c9dd39c9c3e8f7406a0e840938b8f8dec"
},
"downloads": -1,
"filename": "fenicsx_ldrb-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "895ed592cecfa81c72c106127a3f11b2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 18252,
"upload_time": "2024-11-05T13:19:09",
"upload_time_iso_8601": "2024-11-05T13:19:09.333418Z",
"url": "https://files.pythonhosted.org/packages/3f/07/67ade9cef63c77f9ea4e160ffd292c7534e5b9c85e381ddd5d88c56709b6/fenicsx_ldrb-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-05 13:19:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "finsberg",
"github_project": "fenicsx-ldrb",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fenicsx-ldrb"
}