-
Notifications
You must be signed in to change notification settings - Fork 5
Examples ulraMeshes2Mesh
In this page, we will demonstrate how ultraMeshes2Mesh could be useful to construct a watertight mesh from a group of non-watertight input meshes that have spatial a pre-defined relationship. The examples presented in this page extend those detailed in Examples ultraMeshes2Mesh; the only difference is that ultraMesh2Mesh takes a single input mesh file (possibly containing multiple partitions), but ultraMeshes2Mesh takes a list of multiple input mesh files to produce a watertight output mesh (possibly containing multiple partitions).
This example uses ultraMeshes2Mesh to construct a complete and watertight spiny neuronal mesh (with a single and continuous manifold) from an input list of meshes representing its different components including soma, neurites and dendritic spines. Every item is represented by an independent .OBJ mesh, nevertheless they are spatially related (intersecting - as shown in the image below, where basal dendrites are in red, soma in yellow and dendritic spines are in green; while the reconstructed manifold is in blue). The individual meshes are created with NeuroMorphoVis from a neuronal morphology that is publicly available on NeuroMorpho.Org.
NOTE: The spines are randomly distributed along the basal dendrites and are not evaluated based on connectivity information obtained from biological or digitally reconstructed neuronal circuits. The objective of the example is focused on demonstrating how to create a biologically realistic and detailed neuronal mesh from input data components of different input meshes. Spine geometries are extracted from a cortical volume that was reconstructed with electron microscopy.
ultraMeshes2Mesh --input-directory ultraMeshes2Mesh/neuron-3 --output-directory ultraMeshes2Mesh/example-1 --export-obj-mesh --ignore-marching-cubes-mesh --ignore-laplacian-mesh --ignore-optimized-mesh --solid --resolution 2048 --project-xy --laplacian-iterations 15 --optimize-mesh --adaptive-optimization --voxelization-axis xyz
The components (meshes) of the input neuron model are segregated into multiple mesh files in the input directory examples/ultraMeshes2Mesh/neuron-3
. This directory contains a total of 1941 .OBJ meshes including the soma, dendrites and dendritic spines.
The previous command reconstructs a single and continuous manifold representing the cellular membrane of the neuron model.
We also generate an XY projection of the volume grid used to voxelize the input meshes to visualize the continuity between the dendrites and the emanating spines, as shown below.
- We have used adaptive mesh optimization to maximize the topological quality of the mesh, where more faces are tessellated on curvy surfaces and near the joints between the spines and their dendrites, while less facets are used to cover flat areas across the membrane as shown in the following images.
- We used 3-way solid voxelization (using
--voxelization-axis xyz
) to ensure that if we encounter any loops due to the random distribution of the spines along the dendrites, the resulting mesh is still correct and complete. Further details are available in this page.