Skip to content

CNS-OIST/meshing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Mesh utility collections for neuron morphology reconstruction

A Quick Lookup Table: What tool should I use to open .xxx file?

Format Content View/Edit Tool
.swc Point tracing morphology data neuTube
.nrn Instructions for NEURON morphology construction NEURON
.stl Triangular surface mesh Meshlab
.off Polygonal surface mesh Meshlab
.obj Polygonal surface mesh Meshlab
.ply Polygonal surface mesh Meshlab
.blend Surface model constructed using Blender Blender
.geo Gmsh geometry file Gmsh
.msh Tetrahedral volume mesh Gmsh
.mesh Finite element mesh Gmsh
.poly TetGen geometry TetGen
.smesh TetGen geometry TetGen

Mesh utilities From OIST

A collection of meshing utilities for neuron morphologies, developed by the Computational Neuroscience Unit at Okinawa Institute of Science and Technology Graduate University, Japan.

For SWC morphology

  • SWCIntersectDetect: Branch intersection detection for SWC/NEURON morphology.
    • Main Input: .swc morphology file
    • Main Output: .swc morphology file where branch intersections are labeled using user-defined tags
  • SWCTetMesher: Tetrehedral mesh generator from SWC morphology data.
    • Main Input: .swc morphology file
    • Main Output: .mesh tetrahedral mesh file of the morphology. (Optional: .off surface mesh of the morphology)

For surface mesh morphology

  • CollisionResolver: Detect and resolve overlaps between watertight surface meshes by voxel ownership, so densely-packed segmented organelles become non-overlapping (gap-separated) and meshable. Also checks/repairs non-manifold inputs.
    • Main Input: .off watertight surface meshes (possibly overlapping/non-manifold).
    • Main Output: .off non-overlapping, gap-separated watertight surface meshes.
  • SubmeshRelocator: Relocate inner surface meshes that a gap-resolver leaves too close to their container or neighbours (UNMET) into a free pocket — by rigid move, a shape-preserving volume-matched surrogate, or splitting — instead of dropping them.
    • Main Input: .off watertight surfaces + a gap report (e.g. from CollisionResolver).
    • Main Output: repositioned .off surfaces that clear the gap (or a report of any that cannot be placed).
  • MultiCompMesher: Multi-component mesh generation and labeling from watertight surface boundaries, with local size-field refinement — sphere (geometric ball/shell, e.g. thin inter-compartment gaps) and a shape-conforming surface directive (refine near an arbitrary marker surface such as a synaptic active zone).
    • Main Input:
      1. .off watertight surface boundary meshes.
      2. user-defined text file with component signatures.
      3. (optional) a size-field file with patch/component/sphere/surface refinement directives.
    • Main Output: .mesh Tetrahedral mesh file of the morphology with labeled components.

For STEPS tetrahedral meshing

  • STEPSMeshPipeline: End-to-end pipeline turning segmented surfaces into a labelled tetrahedral mesh sized and validated to the STEPS mesh criteria (Hepburn et al. 2012). Resolves overlaps automatically (bundles CollisionResolver), relocates too-close inner bodies (SubmeshRelocator), tetrahedralises (wraps MultiCompMesher), names compartments and membrane patches (Gmsh $PhysicalNames), and validates (STEPSMeshValidator).
    • Main Input:
      1. .off segmented surface boundary meshes (overlaps resolved on the fly).
      2. reaction-diffusion parameters (rate k, diffusion D, concentration) for STEPS-criteria sizing — or typical neuroscience defaults.
    • Main Output: Gmsh .msh labelled tetrahedral mesh meeting the STEPS size/shape criteria (compartments/patches addressable by name), plus a quality report (figures + verdict).
  • STEPSMeshValidator: Validate a tetrahedral mesh (or check surface inputs) against the STEPS mesh criteria — size window, element shape (radius-edge, aspect ratio), compartment containment, and operator-splitting ζ — with a pass/fail verdict, histograms, and a recommended element size. Consumed as a submodule by STEPSMeshPipeline and CollisionResolver.
    • Main Input: a Gmsh .msh mesh (or .off surface inputs), plus reaction-diffusion parameters.
    • Main Output: a quality report (verdict + figures) flagging any criterion not met.

For STEPS mesh annotation

  • polyhedronROI: Create Region of Interest (ROIs) annotations in STEPS using watertight surface boundaries and labeling signatures.
    • Main Input:
      1. .off/.stl/.obj watertight surface boundary meshes.
      2. stepe.geom.Tetmesh object from STEPS.
    • Main Output: The same stepe.geom.Tetmesh object with ROI added.

Mesh utilities from other parties

For SWC morphology

  • AnaMorph: Framework for creating 3d neuronal morphologies from point/diameter descriptions.
    • Main Input: .swc morphology file
    • Main Output: .obj watertight, manifold surface mesh of the morphology
  • CTNG: A tool for constructing a 3d tesselation of a neuron's surface from point-diameter data.
    • Main Input: .swc morphology file
    • Main Output: text-based file with watertight, manifold surface mesh of the morphology

For surface mesh morphology

  • GAMer: surface mesh improvement library developed to condition surface meshes derived from noisy biological imaging data. Also provides tetrahedral mesh generation functionality using TetGen backend.
    • Main Input: surface mesh files
    • Main Output: repaired and optimized surface meshes
  • Gmsh: Tetrahedral mesh generator from CAD geometry or surface boundaries.
    • Main Input: surface morphology file
    • Main Output: .msh tetrahedral mesh file, can also export to other formats
  • TetGen: Tetrahedral mesh generator from polyhedral surface boundaries.
    • Main Input: surface morphology file
    • Main Output: text-based tetrahedral mesh file
  • fTetWild: Robust floating-point tetrahedral meshing from triangle surfaces / soups, tolerant of imperfect input (self-intersections, gaps) via a user-set envelope, with element-quality optimization. Supersedes the original TetWild; Python bindings via the wildmeshing package.
    • Main Input: surface mesh file (or triangle soup)
    • Main Output: tetrahedral mesh (Gmsh .msh / medit .mesh).
  • VolRoverN: Pipeline solution for neuron reconstruction from RECONSTRUCT series files to surface/volume mesh. Also provides automatic surface mesh repairing and optimization functionality.
    • Main Input: RECONSTRUCT series files, or .off surface mesh
    • Main Output: surface/volume meshes of the reconstruction

Mesh format conversion

  • meshio: Python library and command-line tool to read, write, and convert between many mesh formats — Gmsh .msh, medit .mesh, VTK/VTU, .off/.obj/.stl/.ply, Abaqus .inp, XDMF, and more. (Used by STEPSMeshPipeline for the .mesh → Gmsh .msh conversion.)
    • Main Input: a mesh file in any supported format
    • Main Output: the same mesh in another supported format (meshio convert in.ext out.ext)

Mesh processing & repair (Python libraries)

General-purpose libraries for loading, analysing, repairing, and visualising meshes (rather than morphology-specific tools).

  • trimesh: Triangle-mesh library — load/export many formats, watertightness & winding checks and repair (merge vertices, drop degenerate/duplicate faces, fix normals/winding, fill holes), voxelisation, ray/proximity queries, and booleans. (Used by CollisionResolver.)
  • PyVista: Pythonic VTK interface for mesh processing, analysis, and 3D visualisation — clipping/slicing, collision detection, decimation, and plotting. (Used by CollisionResolver for collision detection and figures.)
  • PyMeshFix: Python wrapper of MeshFix — repair non-manifold / non-watertight surface meshes (remove self-intersections and degeneracies, fill holes) into a clean watertight manifold.
  • PyMeshLab: Python bindings to MeshLab — extensive mesh filters including isotropic remeshing, cleaning, hole filling, and repair.

About

A collection of mesh utilities for neuron morphology reconstruction

Resources

Stars

2 stars

Watchers

3 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors