Skip to main content

用于分配心肌纤维方向的基于拉普拉斯-狄利克雷规则的算法。

项目描述

Anaconda 服务器徽章 CI github页面 编解码器

用于分配心肌纤维方向的基于拉普拉斯-狄利克雷规则 (LDRB) 的算法

一种基于 Laplace Dirichlet Ruled-Based 算法分配心肌纤维方向的软件。

Bayer, JD, Blake, RC, Plank, G. 和 Trayanova, NA, 2012。一种新的基于规则的算法,用于将心肌纤维方向分配给计算心脏模型。生物医学工程年鉴,40(10),pp.2243-2254。(https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3518842/

# Decide on the angles you want to use
angles = dict(
    alpha_endo_lv=30,  # Fiber angle on the LV endocardium
    alpha_epi_lv=-30,  # Fiber angle on the LV epicardium
    beta_endo_lv=0,  # Sheet angle on the LV endocardium
    beta_epi_lv=0,  # Sheet angle on the LV epicardium
    alpha_endo_sept=60,  # Fiber angle on the Septum endocardium
    alpha_epi_sept=-60,  # Fiber angle on the Septum epicardium
    beta_endo_sept=0,  # Sheet angle on the Septum endocardium
    beta_epi_sept=0,  # Sheet angle on the Septum epicardium
    alpha_endo_rv=80,  # Fiber angle on the RV endocardium
    alpha_epi_rv=-80,  # Fiber angle on the RV epicardium
    beta_endo_rv=0,  # Sheet angle on the RV endocardium
    beta_epi_rv=0,  # Sheet angle on the RV epicardium
)

# Choose space for the fiber fields
# This is a string on the form {family}_{degree}
fiber_space = "P_2"

# Compute the microstructure
fiber, sheet, sheet_normal = ldrb.dolfin_ldrb(
    mesh=mesh, fiber_space=fiber_space, ffun=ffun, markers=markers, **angles
)
# Store files using a built in xdmf viewer that also works for functions
# defined in quadrature spaces
ldrb.fiber_to_xdmf(fiber, "fiber")
# And visualize it in Paraview

_

安装

使用 pip 安装

要安装软件,您需要安装FEniCS(不支持 2016 年以前的版本)

该软件包可以使用 pip 安装。

python -m pip install ldrb

或者如果您需要最新版本,您可以安装源

python -m pip install git+https://github.com/finsberg/ldrb.git

使用 conda 安装

或者,您可以使用 conda 安装

conda install -c conda-forge ldrb

这也将通过conda.

文档

文档托管在http://finsberg.github.io/ldrb

入门

查看演示

执照

ldrb在 GNU LGPL 版本 3 或(由您选择)任何更高版本下获得许可。 ldrb版权所有 (2011-2019) 作者和 Simula 研究实验室。

贡献者

亨里克·芬斯伯格 ( henriknf@simula.no )

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

ldrb-2022.2.1.tar.gz (21.8 kB 查看哈希

已上传 source

内置分布

ldrb-2022.2.1-py3-none-any.whl (21.6 kB 查看哈希

已上传 py3