The landmark_utils.py module#
Summary#
Compute the long and short axes of the left ventricle. |
|
Compute 26 AHA17 landmark points on the left ventricle surface. |
|
Compute AHA 17 segment horizontal and vertical lines. |
|
Compute the AHA17 label for left ventricle elements. |
|
Compute elemental coordinate system for AHA elements. |
Description#
Module for computing heart anatomical landmarks.
This module provides utilities for computing heart anatomical landmarks including: - Long and short axes of the left ventricle - AHA17 segment landmarks and segmentation - Coordinate systems for strain calculations
Module detail#
- landmark_utils.compute_anatomy_axis(mv_center: numpy.ndarray, av_center: numpy.ndarray, apex: numpy.ndarray, first_cut_short_axis: float = 0.2) tuple[dict, dict, dict]#
Compute the long and short axes of the left ventricle.
- Parameters:
- mv_center
np.ndarray Mitral valve center.
- av_center
np.ndarray Aortic valve center.
- apex
np.ndarray Left ventricle epicardium apex point.
- first_cut_short_axis
float, default: 0.2 Relative distance between the mitral valve center and apex, which is used for defining the center of the short axis.
- mv_center
- Returns:
- landmark_utils.compute_aha17_points(model: ansys.health.heart.models.HeartModel, short_axis: dict, long_axis: dict, surface: pyvista.PolyData = None) list[numpy.ndarray]#
Compute 26 AHA17 landmark points on the left ventricle surface.
The AHA17 landmark points define the geometry for the 17-segment model of the left ventricle. These 26 points are distributed across three levels (basal, mid, apical) and are located at specific angular positions around the circumference.
P1—H1—P2—H2—P3—-H3–P4—H4—P5—H5—P6—H6—P1 | | | | | | | | | | | | | | V1 S4 V2 S5 V3 S6 V4 S1 V5 S2 V6 S3 V1 | | | | | | | | | | | | | | P7—H7—P8—H8—P9—-H9–P10–H10–P11–H11–P12–H12–P7 | | | | | | | | | | | | | | V7 S10 V8 S11 V9 S12 V10 S7 V11 S8 V12 S9 V7 | | | | | | | | | | | | | | P13–H13–P14–H14–P15–H15–P16–H16–P17–H17–P18–H18–P13
- P19—H19—P20—H20—P21—H21—P22—H22—P19
- | | | || | | |
V13 S15 V14 S16 V15 S13 V16 S14 V13 | | | | | | | | | |
P23—H23—P24—H24—P25—H25—P26—H26—P23
- modelHeartModel
Heart model containing the left ventricle geometry.
- short_axisdict
Short axis definition with ‘center’ and ‘normal’ keys.
- long_axisdict
Long axis (4CV) definition with ‘center’ and ‘normal’ keys.
- surfacepv.PolyData, optional
Endocardial surface on which to compute landmarks. If None, the endocardium from the heart model is used.
- Returns:
list[np.ndarray]List of 26 landmark point coordinates on the endocardial surface.
- landmark_utils.compute_aha17_lines(surface: pyvista.PolyData, points: list[numpy.ndarray]) tuple[list[pyvista.PolyData], list[pyvista.PolyData]]#
Compute AHA 17 segment horizontal and vertical lines.
- landmark_utils.compute_aha17(model: ansys.health.heart.models.HeartModel, short_axis: dict, l4cv_axis: dict, seg: Literal[16, 17] = 17, p_junction: numpy.ndarray = None) numpy.ndarray#
Compute the AHA17 label for left ventricle elements.
- Parameters:
- model
HeartModel Heart model.
- short_axis
dict Short axis.
- l4cv_axis
dict Long 4CV axis.
- seg
Literal[16, 17], default: 17 Compute 16 or 17 segments.
- p_junction
np.ndarray, default:None LV and RV junction points. If these points are given, they defines the start of segment 1. If they are not given, the start point is defined by rotating 60 degrees from the 4CV axis.
- model
- Returns:
np.ndarrayAHA17 IDs. No concerned elements are assigned with
np.nan.
- landmark_utils.compute_element_cs(model: ansys.health.heart.models.HeartModel, short_axis: dict, aha_element: numpy.ndarray) tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]#
Compute elemental coordinate system for AHA elements.