This repository provides a helper class for working with the cardiac meshes produced by the CardioX pipeline. This code was tested successfully on bi-ventricular meshes produced by the SpASM method as well as the current full-heart model.
The code has been tested using the following versions:
trimesh==3.9.15vtk==9.0.1numpy==1.17.4pyglet==1.5.18meshio==2.3.0numpy-stl==2.17.1(for working with volumetric meshes)
You can add this repository as a submodule to your main repository, under the utils folder (or similar).
This repo implements three classes:
Cardiac3DMesh: represents a single cardiac mesh or point cloud.Cardiac4DMesh: represents a collection of cardiac meshes for one individual, across the cardiac cycle.CardiacMeshPopulation: represents a population of cardiac meshes (either 3D or 4D), i.e. meshes for different individuals in a population.
from CardioMesh.CardiacMesh import Cardiac3DMesh
vtk_path = "full_heart_model.vtk"
mesh = Cardiac3DMesh(vtk_path)
mesh.show()
# This follows from the previous code snippet
# LV mesh
lv_mesh = mesh["LV"]
# LV & RV mesh
lvrv_mesh = mesh["LV", "RV"]
lvrv_mesh.show()

