LV_RegionIdentifier#

class project_heart.lv.modules.lv_region_identifier.LV_RegionIdentifier(geo_type=None, *args, **kwargs)#
identify_base_and_apex_regions(ab_n=10, ab_ql=0.03, ab_qh=0.75, **kwargs)#
identify_epi_endo_regions(threshold: float = 90.0, ref_point: Optional[numpy.ndarray] = None, **kwargs) tuple#

Estimates Epicardium and Endocardium surfaces based on the angle between vectors from the reference point to each node and their respective surface normals. If ref_point is not provided, it will use the center of the geometry.

Parameters
  • threshold (float, optional) – Angles less than threshold will be considered part of ‘Endocardium’ while others will be considered part of ‘Epicardium’. Defaults to 90.0.

  • ref_point (np.ndarray or None, optional) – Reference point; must be a (1x3) np.ndarray specifying [x,y,z] coordinates. If set to None, the function will use the estimated center of the geometry.

Returns

Arrays containing values for each node as ‘Endo’, ‘Epi’ or Neither

at surface mesh and global mesh.

Return type

tuple

peek_unique_values_in_region(surface_name: str, enum_like: Optional[enum.Enum] = None) list#

Returns a list of unique values in the given surface. If Enum is specified, list will contain strings representing each surface region.

Parameters
  • surface_name (str) – Mesh data name containing surface region data.

  • enum_like (Enum, optional) – Enum representation of values in the surface. Defaults to None.

Returns

Unique values in the given surface.

Return type

list

set_region_from_mesh_ids(key: str, mesh_ids: list) numpy.ndarray#

Sets mesh and surface mesh region from a list of ids based on mesh. Each index corresponds to node id, and each value should represent region id.

Parameters
  • key – (str or enum): key identifier for region data

  • mesh_ids (list) – List of region ids for each point in mesh.

Raises

ValueError – If length of mesh ids is not equal to number of points in mesh.

Returns

Pointer to added mesh_ids