Skip to content

ccmim/CardioMesh

Repository files navigation

CardioMesh

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.

Table of Contents

  1. TO DO

Requirements

The code has been tested using the following versions:

  • trimesh==3.9.15
  • vtk==9.0.1
  • numpy==1.17.4
  • pyglet==1.5.18
  • meshio==2.3.0
  • numpy-stl==2.17.1 (for working with volumetric meshes)

Tips

You can add this repository as a submodule to your main repository, under the utils folder (or similar).

Basic description

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.

Examples of usage

Cardiac3DMesh

Loading a mesh

from CardioMesh.CardiacMesh import Cardiac3DMesh

vtk_path = "full_heart_model.vtk"
mesh = Cardiac3DMesh(vtk_path)
mesh.show()

imagen

Extracting a partition

# This follows from the previous code snippet
# LV mesh
lv_mesh = mesh["LV"]

# LV & RV mesh
lvrv_mesh = mesh["LV", "RV"]
Displaying a mesh (in a Jupyter Notebook)
lvrv_mesh.show()

full_heart_model_lvrv

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •