AhaStrainCalculator#
- class ansys.health.heart.post.strain_calculator.AhaStrainCalculator(model: ansys.health.heart.models.HeartModel, d3plot_file)#
Compute longitudinal, radial, and circumferential strain for the left ventricle.
Overview#
Compute longitudinal and radial strain. |
|
Compute AHA 17 segment strain values from the deformation gradient. |
|
Export AHA strain and/or save a VTK file for a given frame. |
Bullseye representation of the 17 segments of the left ventricle. |
Import detail#
from ansys.health.heart.post.strain_calculator import AhaStrainCalculator
Attribute detail#
- AhaStrainCalculator.model#
- AhaStrainCalculator.aha_labels#
- AhaStrainCalculator.d3plot#
Method detail#
- AhaStrainCalculator.compute_longitudinal_radial_strain(time_array: numpy.ndarray | list = None, vtk_dir: pathlib.Path | str = None) tuple[numpy.ndarray, numpy.ndarray]#
Compute longitudinal and radial strain.
Longitudinal and radial strain (V_i and H_i) values are saved with the following format:
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
- Parameters:
- time_array
np.ndarray|list,optional Array of time points to compute strain at. If None, all time points are used.
- vtk_dir
pathlib.Path|str,optional Directory to save VTK files. If None, no VTK files are saved.
- time_array
- Returns:
tuple[np.ndarray,np.ndarray]Longitudinal and radial strain arrays of 17 segments.
- AhaStrainCalculator.compute_aha_strain(out_dir: str = None, write_vtk: bool = False, t_to_keep: float = 100000000000.0) numpy.ndarray#
Compute AHA 17 segment strain values from the deformation gradient.
- Parameters:
- Returns:
np.ndarrayArray of N_time * (1+17*3). Columns represent time and longitudinal, radial, and circumferential strain averaged of each segment.
- AhaStrainCalculator.compute_aha_strain_at(frame: int = 0, out_dir: pathlib.Path = None) numpy.ndarray#
Export AHA strain and/or save a VTK file for a given frame.
- Parameters:
- frame
int, default: 0 Frame number to compute strain.
- out_dir
pathlib.Path, default:None Directory to save VTK file to. No VTK file is saved by default.
- frame
- Returns:
np.ndarrayAHA LRC strain matrix (17 * 3).
- static AhaStrainCalculator.bullseye_17_segments(ax, data) None#
Bullseye representation of the 17 segments of the left ventricle.
- Parameters:
Notes
This function creates the 17-segment model for the left ventricle according to the American Heart Association (AHA) [1].
This method is modified from the
Matplotlibsbullseye example. Copyright© 2012- Matplotlib Development Team; All Rights Reserved. Modifications consisted of removing colors and including the values for each segment.References
[1]M. D. Cerqueira, N. J. Weissman, V. Dilsizian, A. K. Jacobs, S. Kaul, W. K. Laskey, D. J. Pennell, J. A. Rumberger, T. Ryan, and M. S. Verani, “Standardized myocardial segmentation and nomenclature for tomographic imaging of the heart”, Circulation, vol. 105, no. 4, pp. 539-542, 2002.