ConductionPath
#
- class ansys.health.heart.pre.conduction_path.ConductionPath(name: ConductionPathType, mesh: ansys.health.heart.objects.Mesh, id: int, is_connected: numpy.ndarray, relying_surface: pyvista.PolyData, material: ansys.health.heart.settings.material.ep_material.EPMaterial = EPMaterial.DummyMaterial(), up_path: ConductionPath | None = None, down_path: ConductionPath | None = None)#
Conduction path class.
Overview#
Get the terminal nodes of the conduction path. |
|
Get the nodal coordinates of the terminal nodes. |
|
Plot the conduction path with its underlying surface. |
|
Add Purkinje-Myocardial Junction branches to the current conduction path. |
Create a conduction path on a base mesh through a set of keypoints. |
|
Build conduction path from LS-DYNA k-file. |
Import detail#
from ansys.health.heart.pre.conduction_path import ConductionPath
Property detail#
- property ConductionPath.up_path: ConductionPath | None#
Get upstream conduction path.
- property ConductionPath.down_path: ConductionPath | None#
Get downstream conduction path.
- property ConductionPath.length#
Length of the conduction path.
Attribute detail#
- ConductionPath.name#
- ConductionPath.mesh#
- ConductionPath.id#
- ConductionPath.is_connected#
- ConductionPath.relying_surface#
- ConductionPath.ep_material#
Method detail#
- ConductionPath.get_terminal_nodes() numpy.ndarray #
Get the terminal nodes of the conduction path.
- Returns:
np.ndarray
Array of terminal node indices.
Notes
The terminal nodes are the points that are referenced only once in the line segments.
- ConductionPath.get_terminal_coordinates() numpy.ndarray #
Get the nodal coordinates of the terminal nodes.
- Returns:
np.ndarray
Nx3 array with the coordinates of the terminal nodes.
- ConductionPath.plot(show_plotter: bool = True) pyvista.Plotter | None #
Plot the conduction path with its underlying surface.
This method creates a PyVista plotter, adds the relying surface (in semi-transparent white) and the conduction path (as a line), and either shows the plot or returns the plotter for further customization.
- Parameters:
- Returns:
- plotter
pyvista.Plotter
orNone
The PyVista plotter object if
show_plotter
is False, otherwise None.
- plotter
Examples
>>> plotter = conduction_path.plot(show_plotter=False) >>> plotter.add_mesh(other_mesh, color="red") >>> plotter.show()
- ConductionPath.add_pmj_path(pmj_list: list[int], merge_with: Literal['node', 'cell'] = 'cell') ConductionPath #
Add Purkinje-Myocardial Junction branches to the current conduction path.
- Parameters:
- Returns:
ConductionPath
The updated conduction path.
Notes
PMJ resistance is controlled by pmjres in *EM_EP_PURKINJE_NETWORK2.
- static ConductionPath.create_from_keypoints(name: ConductionPathType, keypoints: list[numpy.ndarray], id: int, base_mesh: pyvista.PolyData | pyvista.UnstructuredGrid, connection: Literal['first'] | None = None, line_length: float | None = 1.5, center: bool = False) ConductionPath #
Create a conduction path on a base mesh through a set of keypoints.
- Parameters:
- name
ConductionPathType
Name of the conduction path.
- keypoints
list
[np.ndarray
] Keypoints used to construct the path on the base mesh.
- id
int
ID of the conduction path.
- base_mesh
pv.PolyData
|pv.UnstructuredGrid
Base mesh where the conduction path is created. If
PolyData
, the result is a geodesic path on the surface. Ifpv.UnstructuredGrid
, the result is the shortest path in the solid.- connection
Literal
[“first”] |None
, default:None
If “first”, the first point of the path is marked as connected to the solid mesh. If None, no points are marked as connected.
- line_length
float
|None
, default: 1.5 Length of the line element in case of refinement.
- centerbool, default:
False
Whether to use a geodesic path through the centers of the surface cells. Length of the line element in case of refinement.
- centerbool, default:
False
If True, the geodesic path passes through the centers of the surface cells.
- name
- Returns:
ConductionPath
The created conduction path.
Notes
To add PMJ (Purkinje-Myocardial Junction) points, use the
add_pmj_path()
method after creating the path.
- static ConductionPath.create_from_k_file(name: ConductionPathType, k_file: str, id: int, base_mesh: pyvista.PolyData, model, merge_apex: bool = True) ConductionPath #
Build conduction path from LS-DYNA k-file.
- Parameters:
- Returns:
ConductionPath
Conduction path.