Skip to content

MeshTools3D — Legacy Release (v1.0)

Latest

Choose a tag to compare

@alonsoJASL alonsoJASL released this 24 Apr 15:14

This release archives the long-standing CGAL 4.x build of MeshTools3D that has been in active use for atrial mesh generation since 2015. It is published now to preserve a reproducible, citable snapshot of the tool as it was used in years of research. Active development has moved to other branches; this branch is frozen and will receive no further feature work.

Overview

MeshTools3D generates 3D tetrahedral atrial meshes from .inr segmentations using CGAL's
mesh-from-image pipeline, with optional Laplace-based harmonic extension and wall-thickness
computation.

Features

Meshing

  • Tetrahedral meshing from .inr segmentation input (CGAL Labeled_image_mesh_domain_3).
  • Output formats:
    • INRIA .mesh (native CGAL medit format)
    • CARP .elem + .pts with per-region .vtx point lists (ASCII; binary path present but untested)
    • VTK (unlabeled, binary with correct endianness)
  • Optional CARP-unit rescaling at output time (rescaleFactor).
  • "Mesh-then-relabel" mode: mesh without segmentation labels and re-label triangles afterwards
    (sphereMultilabel example).
  • Flags to disable boundary remeshing and mesh relabeling for backwards-compatible pipelines.
  • User-selectable meshing algorithm and output mesh name/directory via the data file.

Surface region extraction

  • Endocardium / epicardium / mitral-valve node extraction on constrained boundaries.
  • Epi/endo identification by surface point count (largest → epi, second-largest → endo); optional
    swap flag.

Laplace solver & thickness

  • Harmonic extension over the tetrahedral mesh.
  • Tetra / Tria centroid evaluation and tetra-gradient post-processing.
  • Wall-thickness computation written to VTK.
  • VTK writer for the Laplace potential field.

Performance

  • Intel TBB parallel meshing (shared-memory).
  • Thread count controlled by the TBB_NUM_THREADS environment variable (defaults to 1 to avoid
    saturating the host).
  • Docker image auto-detects available cores for TBB parallelisation.

Input / utilities

  • Dedicated class for reading and handling .inr volumes.
  • Search tree to localise boundary triangles within a bounding box.
  • CGAL extensions wrapping the segmentation as a domain-membership function.
  • Point location via trilinear interpolation.
  • Chrono utility for time profiling.

Portability

  • Builds on Linux, macOS, and Windows.
  • Dockerfile and dockerM3D.sh helper for containerised use (no local compilation required).

Build & dependencies

  • CGAL 4.6 – 4.14.3 (tested range; docs/install_legacy.md documents the reproducible CGAL 4.14.3
    / Ubuntu 20.04 path)
  • CMake ≥ 3.x (3.16.9 in the reference legacy build)
  • GMP 6.2.1, MPFR 4.1.0, Eigen 3.3.9, zlib 1.2.13, Boost, Intel TBB 2020.3

See docs/install_legacy.md for the full step-by-step legacy build, and Dockerfile for the
container build.

Known limitations (inherited, will not be fixed on this branch)

  • CARP binary output path exists but is untested.
  • .mesh output not implemented inside the Mesh class.
  • Boundary-triangle output not implemented.
  • Triangle re-orientation with outward normals is implemented but unused.

Contributors

  • Cesare Corrado — original author
  • Jose Alonso Solis-Lemus

Status

Frozen. This branch is preserved for reproducibility of prior results. New development continues on other branches with an updated CGAL pipeline and refactored architecture.