Synthesis of geometrically realistic and watertight neuronal ultrastructure manifolds for in silico modeling

Abstract Understanding the intracellular dynamics of brain cells entails performing three-dimensional molecular simulations incorporating ultrastructural models that can capture cellular membrane geometries at nanometer scales. While there is an abundance of neuronal morphologies available online, e.g. from NeuroMorpho.Org, converting those fairly abstract point-and-diameter representations into geometrically realistic and simulation-ready, i.e. watertight, manifolds is challenging. Many neuronal mesh reconstruction methods have been proposed; however, their resulting meshes are either biologically unplausible or non-watertight. We present an effective and unconditionally robust method capable of generating geometrically realistic and watertight surface manifolds of spiny cortical neurons from their morphological descriptions. The robustness of our method is assessed based on a mixed dataset of cortical neurons with a wide variety of morphological classes. The implementation is seamlessly extended and applied to synthetic astrocytic morphologies that are also plausibly biological in detail. Resulting meshes are ultimately used to create volumetric meshes with tetrahedral domains to perform scalable in silico reaction-diffusion simulations for revealing cellular structure–function relationships. Availability and implementation: Our method is implemented in NeuroMorphoVis, a neuroscience-specific open source Blender add-on, making it freely accessible for neuroscience researchers.


Introduction
Revealing the underlying mechanisms governing brain function requires an in-depth understanding of cellular and network dynamics at multiple levels of detail, with significant biological computations also taking place in very small volumes within critically defined ultrastructures [1,2].Although wet lab experiments, such as in vivo and in vitro studies, remain essential in neuroscience, the use of computer simulation-based, or in silico, experiments complements the research cycle [3], allowing certain observations that are unattainable through traditional methods.Particularly at the cellular and subcellular levels, this complementary approach entails employing highperformance simulations that utilize biophysically plausible and highly detailed structural models of brain cells, such as neurons and glial cells [4], in which cellular kinetics can be simulated to characterize structure-function relationships.Simulations have been performed previously using reduced (one-dimensional) compartmental models employing the Neuron simulator [5] to compute electrophysiological responses on a cellular level.Those simulations range from single cells up to large networks of digitally reconstructed circuits [6].Simulation scalability was attainable relying on an optimized version of the Neuron simulator called CoreNeuron [7].Nevertheless, these simulations neglected the precise physical structure of the neuron and therefore could not be used to capture the dynamics of subcellular scales.Reaction-diffusion models were introduced to address this challenge [8], by incorporating detailed cellular morphologies with geometrically realistic structures into three-dimensional (3D) simulations with which we can realize complex signaling pathways in the brain in space and time [9][10][11].While there has been extensive ongoing research focused on improving the performance of reaction-diffusion simulators to run efficiently on large-scale supercomputing architectures, for example, with STEPS 4.0 [12], there is still a large unfilled gap in the generation of those ultrastructural data models needed to conduct the simulations.Our method is introduced to fill in this gap, enabling computational neuroscientists to automate the generation of brain tissue models with realistic cellular boundaries to conduct high-performance molecular simulations.

Neuronal models and the watertightness challenge
Reaction-diffusion simulations are principally applied to 3D volumetric meshes that are subdivided into tetrahedral subdomains where molecular interactions can be contained [12].Such tetrahedral meshes are ordinarily created from corresponding surface counterparts, for example, using TetGen [13].However, this process requires the input surface mesh to be a watertight manifold, i.e. two-manifold (with zero non-manifold edges and vertices) with no self-intersecting facets (refer to Supplementary Section 1 and Supplementary Fig. S1).While TetWild [14] is developed specifically to handle non-watertight meshes, it has impractical performance and cannot process thin structures.The watertightness requirement is relatively challenging to attain for brain cells, particularly for neuronal morphologies that are characterized by complex arborizations with thin fibers, irregular branching geometries, large spatial extents, and low volume occupancy.
Neuronal cells are commonly available from open neuroscience databases, such as NeuroMorpho.Org, in a hierarchical structure with point-and-diameter representations [15], which further complicates the generation of biologically realistic models that can be plugged directly into the simulation.Morphological models of biological neurons are typically segmented from optical, tomography, or electron microscopy stacks [16,17].Segmentation can be manual, semi-automated, or even fully automated [18].Moreover, biologically inspired neuronal models are becoming more available thanks to recent studies that utilize biophysical simulations to synthesize neurons relying on advanced protocols derived from the analysis of realistic counterparts [19].After their segmentation or synthesis, morphologies are restructured into a conventional hierarchical representation based on a connected set of digitized samples.This representation uses directed acyclic graphs to store and build the connectivity between those samples where the root node represents the cell body (or soma) and the leaf nodes represent the terminal samples.Neuronal skeletons are composed of a set of morphological samples; each pair of adjacent samples defines a segment and a set of connected segments between two branching samples defines a section.The arbors, or neurites, are composed of a set of connected sections in a tree structure (Fig. 1).Converting this structure into a continuous watertight manifold in a reliable manner is missing.

Related work
Reconstructing surface meshes of neurons from fairly abstract graph representation has been investigated in several interdisciplinary studies either in computer graphics and visual computing or in bioinformatics.The majority of those studies focused on designing meshing algorithms capable of creating visually appealing-and more importantly lightweight-mesh models that could be applied in domain-specific visual analytics applications, e.g. to visualize the electrophysiological activity [20][21][22] of digitally reconstructed neuronal networks [6] using the compartmental reports generated with Neuron [5].Those algorithms were primarily concerned with the tessellation of the resulting models, i.e. creating appearance-preserving meshes with minimal polygon counts, allowing the visualization of compartmental simulations of large-scale circuits containing several hundreds of thousands or millions of neurons [23,24].Some approaches presented advanced solutions to improve the realism of the resulting models with different objectives: (i) to construct faithful 3D somatic profiles using physics simulations, e.g.Neuronize [25], NeuroTessMesh [26], and NeuroMorphoVis [27,28], as opposed to earlier applications that used simplified primitives such as spheres [29] and cylinders [18] to model the soma; (ii) to create smooth and accurate branching geometries along the neuronal arbors using skin modifiers [22] and Laplacian smoothing with Boolean unions [30]; and (iii) to integrate geometrically realistic spine models (extracted from electron microscopy) along the dendrites of the neurons [31].However, watertightness was lacking and the usability of the resulting neuronal meshes was consequently limited either to visual analytics or content creations purposes.
On the contrary, and until recently, the watertightness aspect in neuronal mesh generation was only accomplished in two principal studies [32,33] [32].This CTNG algorithm uses a complex set of geometric subroutines to fill the gaps, remove the overlaps and extrusions between the consecutive segments of the arbors and along the connections between the soma and first-order sections.The CTNG algorithm was coded in a combination of C, Python, and Cython, and the implementation was open sourced on ModelDB, but the code is deprecated and can no longer be used with the recent versions of Python.Therefore we were unable to assess either its performance or the quality of its resulting meshes.
Mörschel et al. developed AnaMorph, another domainspecific solution tailored to create watertight neuronal meshes from SWC morphologies using non-linear piecewise analytical modeling and union operators [33].AnaMorph is publicly available under LGPL license, the code is entirely implemented in modern C++ and can be easily compiled on Unix-based operating systems.Nonetheless, this solution was limited in the following aspects: (i) it did not account for a realistic somatic profile since somata were approximated by spheres; (ii) the implementation fails if local self-intersections exist; (iii) the volume of the resulting mesh is significantly lower than the actual volume of the morphology; and, finally, (iv) the algorithm was incapable of incorporating spine models with realistic shapes into the final meshes but rather approximated them with cylinders.
To address this challenge, we present an efficient, unique, and accessible solution that can combine the aspects of realism and watertightness in a straightforward way, without requiring any complex geometric operations.This approach enables the creation of a continuous and smooth surface mesh ref lecting the plasma membrane of a neuron from its graph.Figure 2. The neuronal morphology (A) is initially used to create a set of corresponding proxy meshes of every individual component of the morphology, which are then combined into a single mesh object with overlapping geometries using a joint operation (B).The Voxel remesher is applied to this mesh object to create a volumetric representation of the membrane (C) with which all the overlapping structures are eliminated.This remesher creates a watertight manifold with a continuous and smooth surface (D), which can be used to synthesize a volumetric mesh (E), for example, using TetGen, to perform a stochastic reaction-diffusion simulation in STEPS (F).Dendritic spines are not shown.manifolds of spiny neurons from their morphological traces, making it possible to improve the biological accuracy of reaction-diffusion simulations.2. Efficient implementation of the algorithm using the modeling toolsets of Blender and its multi-threaded Voxel remesher.

Integrating the implementation into the Meshing Toolbox
of the NeuroMorphoVis add-on [28] and exposing the functionality to users from the graphical user interface (GUI) of Blender and the command line interface (CLI) of the add-on.4. Applying the implementation to thousands of neurons with different morphological classes [6] and evaluating the quantitative and qualitative aspects of the resulting meshes.5. Extending the implementation to create watertight manifolds of synthetic astroglial morphologies with realistic endfeet data [34].

Methods
We present an effective method capable of synthesizing a smooth watertight surface manifold that can model the plasma membrane of a spiny neuron from its abstract skeletal representation.Our algorithm consists of three principal stages.The first builds individual, overlapping, and non-watertight proxy meshes of the different components of the neuron, which are nonetheless geometrically realistic.These include arbors, somata, and spines.
The second stage assembles those proxies into a joint mesh object that is rasterized and polygonized to yield an intermediate coarse watertight mesh of the neuron.This stage is implemented exclusively relying on the Voxel remeshing modifier that has been incorporated into the recent versions of Blender.The last stage optimizes the intermediate mesh to generate a volumepreserved, watertight and continuous surface manifold of the neuronal membrane.To complete the pipeline, the resulting mesh is then used by TetGen [13] to create a compartmental volume grid with tetrahedral subdomains for performing stochastic reaction-diffusion simulations, mainly in STEPS [12].The pipeline is graphically illustrated, end-to-end, in Fig. 2. The specific details of the tetrahedralization and simulation protocols are beyond the scope of this work.

Morphology preprocessing
Biological neuronal morphologies extracted from tissue samples are typically traced and digitized in a manual or semi-automated manner.This reconstruction process can be accompanied by various patterns of artifacts either due to the staining procedure itself or due to other manual errors introduced by the operator.
A set of predefined processing operations are therefore applied to the input morphology to assert the elimination of any skeletal artifacts that might lead to subsequent geometric deficits with potential impact on the simulation results.However, these operations do not change the structure of the morphology, such as the connectivity between the branches.This process includes the following: (i) verification of the connectivity of the emanating arbors from the soma; (ii) removal of the morphological samples that are located within the somatic spatial extent; and (iii) adaptive resampling of the morphological sections to eliminate the highfrequency perturbations along the surface of the resulting mesh.

Generation of proxy arbors
Proxies of neuronal arbors are generated using one of the two following algorithms: (i) node-to-leaf path construction or (ii) articulated sections.The first algorithm uses depth-first traversal to construct, per neurite, a set of paths starting from the root node of the morphology graph (first-order sections) to its leaf nodes (terminal sections).Before the construction of the paths, each section in the morphology is labeled as either primary or secondary, for the purpose of deciding at the respective branching points which child section forms the most natural continuation along the path.This labeling scheme is adopted in previous methods [21,30] to form piecewise linear paths on a per-section-basis, using cubic splines to form the path.The articulated sections algorithm uses geodesic polyhedraor icospheres-to connect between the different sections of the morphological hierarchy.The diameter of each icosphere is calculated based on the largest sample at each respective branching point; this guarantees a seamless continuation from parent to child sections.Unlike the first method, the samples of each section are used to build an independent path that has no connectivity with parent or child sections.This connection is maintained by the articulation icospheres.The difference between the two methods is illustrated in Fig. 3.In both cases, and after Figure 3. Two approaches are used to construct the proxies of the arbors: node-to-leaf path constructions (A) and articulated sections, where an icosphere (or geodesic polyhedra) is added at every branching point along the arbor (B).
the construction of the linear paths, a circular cross-sectional ring is used to interpolate those paths and construct a set of tubular proxy geometries, which can be rasterized by the Voxel remesher.

Reconstruction of realistic somatic profiles
Due to certain limitations in the acquisition process, the soma is identified in the majority of biological reconstructions with a sphere, whose radius approximates the distance between the local centroid of the soma and the initial segments of all the emanating branches.More advanced reconstructions integrate a two-dimensional somatic profile ref lecting the projection of the soma along the optical axis of the microscope.Modeling somata with primitive spheres remains a limitation, particularly when the resulting model is employed within the context of a geometrically realistic simulation, where structure impacts the function.Implicit surfaces have been used to reconstruct approximate somatic profiles (Fig. 4A) better than spheres [30,35].However, connecting the arbors to the reconstructed shapes requires a brute force approach such as a boolean operation or a complex geometric algorithm in which arbors can be bridged to emanate smoothly from the soma.A recent Blenderbased implementation [27] incorporated mass-spring models and Hooke's law to simulate the somatic growth in a physically plausible manner.This implementation can reconstruct faithful somatic profiles (Fig. 4B) starting from an icosphere that is expanding towards the initial segments of all the arbors that are verified in the pre-processing stage to be directly connected to the soma.The final shape of the soma depends on three parameters: (i) the initial radius of the sphere used in the simulation; (ii) its stiffness; and (iii) the number of time steps used in the simulation as depicted in (Fig. 4C).As elaborated earlier and shown in Fig. 3, the continuity between the soma and the arbors at their respective initial segments is guaranteed either by adding auxiliary segments that connect the initial sample of each arbor to the center of the soma (Fig. 3A1) or by adding auxiliary spheres (Fig. 3B1).The principal advantage of this technique is that somata are, intuitively, integrated in the mesh-there is no need to use boolean or bridging operators to weld the somatic mesh with the arbors.Contrary to the Union operators approach [30], the Voxel remesher can seamlessly handle this problem and guarantee the resulting manifold to be continuous and watertight.
Figure 4. Creation of somatic profiles using implicit surfaces (A) and soft body simulations (B).The realism of the resulting profile using the soft body approach requires tuning the stiffness of the soft body objectindicated on the side of every simulation-and the initial radius of the icosphere used to build the mesh (C).

Integrating geometrically realistic spines
Spines are those tiny bulbous protruding structures (1-3 μm in length) distributed along neuronal dendrites, whose function is to receive excitatory synaptic inputs from pre-synaptic neurons to generate a compartmentalized post-synaptic response [36].Traces of individual neuronal morphologies, for example, those that are available from NeuroMorpho.Org, do not comprise any relevant information on the spines; the traces are typically acquired using optical microscopy with limited lateral resolution, making it difficult to reconstruct spine morphologies with enough detail [37].Electron microscopy (EM) is used in relevant studies [4] to visualize the neuron ultrastructure, allowing the reconstruction of detailed morphologies of dendritic spines with realistic geometries at nanometer resolutions.Those EM neuronal reconstructions are used to identify and segment a set of dendritic spine geometries that can be used to improve the realism of the resulting neuronal models as opposed to using cylinders to represent the spines [38].
Our implementation integrates those spine models (Supplementary Fig. S6) only along the membranes of neuronal morphologies that are part of a digitally reconstructed cortical circuit [6], where we can identify spine types, dimensions, locations and correct orientations.In a similar study, spine models were also integrated along the dendritic shafts of neurons using union operators [30], but the resulting meshes were not watertight.Our proposed method takes advantage of having accurate and smooth connection between the dendritic membrane and the spine without performing any geometric operations that are error-prone and might fail if the topology of the mesh is not good as shown in Fig. 5.

The Voxel remesher
After the generation of the proxies corresponding to soma, arbors and spines, a joint operator is applied to create a single proxy mesh.This mesh is guaranteed to have no geometric gaps, but it indeed has self-intersecting facets, particularly at the branching points, at the junctions between the soma and the emanating arbors, and between the dendritic membranes and the spines, as illustrated by the closeup in Fig. 2B.The Voxel remesher is then applied to the joint proxy mesh to create an intermediate uniformly sampled volumetric representation of the neuron as showin in Fig. 2C.Logically, and while it preserves the structure of the membrane, this conversion into a voxel-based model removes all the self-intersections of the proxy mesh.This volume is then used to create a watertight surface manifold (Fig. 2D) using an Figure 5. Integration of spines models with realistic geometries along the dendrites of a pyramidal neuron (A).The mesh in light red is created using union operators [30], while that in blue is created with our proposed method.The closeups in (B1-3) demonstrate the smooth connectivity between the spines and the dendrites.Wireframe visualizations are shown in Fig. 8. (B4) The union operator fails to weld the spine meshes with the dendritic mesh resulting in a fragmented mesh.advanced implementation of the marching cubes algorithm.To capture all the geometric details of the neuron, the voxelization resolution is defined based on the size of the smallest morphological sample in the morphology and the thinnest crosssection of the smallest spine.Using a greater value might lead to creating a fragmented mesh as shown in Fig. 6.Therefore, a post-processing operation is applied to verify whether the final mesh has a single continuous manifold-that is essential for the simulation-or is composed of multiple disconnected partitions.One main advantage of the Voxel remesher is its performance; it has a multi-threaded implementation, contrary to the metaball polygonization modifier.

Mesh optimization and watertightness verification
As shown in Fig. 6, and in order to capture the finest structure of the neuron-mainly the extrusions of the spines from the apical dendrites, the Voxel remesher is applied with a decent resolution that is sufficient to reconstruct the ultrastructural geometric details of the smallest spine in the final mesh.This leads to creating over-tessellated surface manifolds with several millions or even tens of millions of facets, which limits the potential usability of the resulting meshes in some simulation applications.To address this challenge, we use adaptive geometry-preserving mesh optimization to decimate the surface of the intermediate Figure 7.The neuronal mesh generated from the Voxel remesher (left) is typically highly tessellated ( ∼100k triangles).This mesh is re-tessellated using coarsening to create an adaptively optimized clone (right)-with ∼68k triangles, where local regions with high frequency contain more facets than f lat regions.Complete analysis of both meshes is illustrated Fig. 9.
Figure 8.While adaptive optimization eliminates unnecessary vertices of f lat regions of the manifold-mainly across the somatic region as shown in Fig. 7, the topology of the mesh around spines still have sufficient number of vertices to capture their geometric details. mesh, as much as possible, while preserving the geometric aspects of the morphology ( Figs 7 & 8).The mesh optimization procedure includes surface coarsening, iterative face and normal smoothing.We implemented an extended and efficient library called OMesh (or OptimizationMesh) with dedicated Python bindings that can be seamlessly integrated into Blender to optimize the meshes produced by the Voxel remesher within the same context.
Mesh coarsening impacts the watertightness of the mesh by introducing self-intersecting facets along its surface [39].While iterative smoothing reduces the number of self-intersecting facets, it cannot guarantee the complete elimination of all the self-intersections produced in the coarsening stage (as shown in Supplementary Fig. S5), which makes our algorithm unrobust.We resolved this issue by implementing an effective iterative watertightness verification scheme that detects any elements (non-manifold edges, non-manifold vertices, thin-faces, zerofaces, or self-intersections) that might affect the watertightness of the mesh.The vertices corresponding to those elements are marked for elimination, and a re-triangulation operation is then applied to close the holes introduced across the surface of the mesh.This procedure is detailed in Supplementary Section 4.

Implementation
Our algorithm is implemented in Blender 3.5 using its embedded Python interpreter and API modules.The implementation is integrated to the Meshing Toolbox of the NeuroMorphoVis [28] add-on.The functionality is made accessible to users, primarily computational neurobiologists and neuroanatomists, from the GUI of Blender (for single-cell analysis and mesh generation) and Figure 9. Comparative quantitative and qualitative analyses of the meshes generated from the Voxel remesher (in light red) and the mesh optimizer (in light blue) shown in Fig. 7.Note that the volume of the mesh is preserved.also from the CLI of the add-on (for executing batch jobs of neuron groups).The implementation takes advantage of the capabilities of NeuroMorphoVis to generate the meshes in parallel on a computing cluster using the Slurm scheduler.

Results and discussion
Reliability and performance of our technique are assessed by applying the meshing implementation to a set of 60 classes of various types of cortical morphologies, each class has 100 neurons.Those exemplary neurons are randomly sampled from a digitally simulated cortical circuit [6,40] containing 4.2 million biophysically detailed compartmental neurons and 13.4 billion synapses covering 8 cortical subregions.Fig. 10 shows a collective collage assembling a set of 60 meshes, each representing a distinct morphological type (Supplementary Table S1).Resulting meshes are exported into STL file format to be compatible with TetGen.All the meshes are verified to have continuous watertight manifolds and high quality qualitative distributions (refer to fact sheets in the Supplementary Figs S7-S126).

Meshing qualitative and quantitative analysis
While watertightness and adaptive mesh refinement are principal objectives of the presented work, high quality geometric measures are still necessary to accomplish-they significantly impact the accuracy of the simulation results.The Verdict library [41] provides a set of metrics with which geometric qualities of a triangulated surface mesh can be evaluated.This set includes radius ratio, edge ratio, radius to edge ratio, minimum, and maximum dihedral angles.To make a complete analysis of the resulting meshes, a collective fact sheet that combines qualitative and the quantitative measures is created.This fact sheet provides comparative results of the intermediate mesh generated with the Voxel remesher and the optimized one that is used for the simulation.Fig. 9 demonstrates a comparative analysis fact sheet of the meshes created from a neuron with L6_SBC type.The analysis of the meshes of the other morphological types is provides in Supplementary Figs S7-S126.This analysis includes wireframe visualizations of each mesh to highlight the difference in tessellation between the intermediate and final meshes.Figure 11.Our algorithm is applied to a synthetic astroglial cell [34] (A) to create a corresponding watertight mesh with a single manifold (B).Perisynaptic processes, perivascular processes, and endfeet are colored in red, blue, and green, respectively.The wireframe closeup highlights the topology of the mesh around the astrocytic soma.

Application to astrocytic morphologies
Astrocytic morphologies have similar branching structure to neurons, but they contain further endfeet processes wrapped around the vessels of cerebral vasculature to transmit energy to the neurons in the NGV tripartite [4].A recent implementation extended NeuroMorphoVis to load and visualize astrocytic morphologies [34] to create corresponding polygonal mesh models using implicit surfaces polygonization [35].Nonetheless, resulting meshes were not watertight and further post-processing was necessary to ensure watertightness.In comparison, our implementation is fit-for-purpose extended and applied to astrocytic morphologies to create watertight meshes in a single step.Figure 11 illustrates a synthetic astrocyte morphology and its corresponding watertight mesh created with our technique.

Application: reaction-diffusion simulation
While resulting meshes can still be used for other analytics applications that necessitate watertightness such as diffusion MRI simulations [42], the principal objective of our work is to automate the reaction-diffusion simulation pipelines as demonstrated earlier in Fig. 2. From an abstract point-and-diameter description of the neuron, a faithful and geometrically realistic surface mesh model is created with which we can synthesize a tetrahedral counterpart using TetGen to ultimately run an accurate STEPS simulation, for Figure 12.A tetrahedral mesh of a pyramidal neuron visualizing random simulation reports at multiple time steps, mimicking the variations of the Ca +2 signals across the cellular membrane.The watertight mesh created with our implementation is used to synthesize the tetrahedral counterpart relying on TetGen.example, Ca +2 signaling.Figure 12 shows a visualization of randomly generated simulation reports with a geometrically realistic pyramidal neuron model.The mechanisms of the simulation as well as the interpretation of the simulation results are beyond the scope of our work.

Comparative analysis with existing methods
There are several methods that can synthesize neuronal mesh representations from morphological trees [21,22,25,30], but there are only two implementations capable of generating watertight manifolds: the CTNG technique [32] and AnaMorph [33].The validity of the resulting meshes from the CTNG implementation could not be verified because the code is deprecated and cannot be executed on recent hardware.However, we were able to make some comparative analysis demonstrating the resulting manifolds synthesized with our implementation and those generated with AnaMorph.This analysis is illustrated in Fig. 13.Our implementation outperforms AnaMorph in two principal aspects: (i) AnaMorph can only approximate somatic profiles using primitive sphere, while our implementation generates a faithful and realistic 3D somatic profile using physics simulation, and (ii) AnaMorph has no support to load or integrate geometrically realistic spines along the dendritic branches of the neuronal membrane.

Conclusion
With the recent advances of computational modeling in neuroscience, detailed and geometrically realistic spatial models of neurons are becoming essential to better understand the impact of cellular morphology and subcellular structures on the underlying functions.While there is major ongoing research and increasing demand to build more efficient and scalable molecular Figure 13.A side-by-side comparison between a neuronal mesh reconstructed with AnaMorph [33] (left) and our method (right).While AnaMorph approximates the soma with a symbolic sphere (A), our method is capable of reconstructing a faithful 3D profile of the soma based on mass-spring modeling and soft body dynamics (B).The meshing algorithm of AnaMorph cannot integrate any realistic spines along the dendritic branches of the neuron (C).Our implementation can seamlessly integrate detailed and highly realistic spine geometries that emanate smoothly from the neuronal membrane (D).simulators, the models with which we can perform accurate simulations are lacking.Biologically speaking, neurons have interweaving arborizations characterized by thin branches, complex branching geometries and large spatial extents.For these reasons, creating high-quality and simulation-ready models that can accurately ref lect their plasma membranes is challenging.In this use case, we present an intuitive, efficient and robust method capable of creating watertight mesh models of spiny neurons from their corresponding morphological descriptions.Our method uses the modeling toolsets in Blender to initially create a set of accurate but non-watertight and overlapping proxies and then uses the Voxel remesher to create a continuous watertight manifold that can accurately represent the surface membrane of the neuron.The performance and scalability of our implementation is assessed with a mixed dataset of neurons representing 60 various types of cortical morphologies.To make it publicly available and easily accessible, the implementation is integrated into the domain-specific NeuroMorphoVis framework.This integration expands the usability of the framework as a meshing tool, making it possible to generate lightweight meshes for visual analytics purposes on the one hand and to generate geometrically realistic watertight manifolds on the other hand.Our method can be seamlessly applied to other brain cells such as astrocytes and microglia, and even cerebral vasculature networks that are represented by cyclic graphs.

Key Points
• A plethora of neuronal morphologies is available in a point-and-diameter format, but there are no robust techniques capable of converting these morphologies into geometrically realistic models that can be used to conduct subcellular simulations.• We present a scalable method capable of synthesizing high-fidelity watertight ultrastructural manifolds of complete neuronal models from their one-dimensional descriptions using the synaptic data obtained from the digitally reconstructed neuronal circuits of the Blue Brain Project.• Resulting manifold models comprise geometrically realistic somata and spine geometries, enabling accurate in silico experiments that can probe intricate structurefunction relationships.• Our method is extensible and can be seamlessly applied to other cellular structures such as astroglial morphologies and even large networks of cerebral vasculature.

Figure 1 .
Figure 1.The structure of a neuronal morphology in three formats: (A) individual samples, where each sample has a unique identifier, position and diameter, (B) segments, in which each pair of connected samples form conical segments, and (C) sections, where adjacent segments between two branching points construct an individual section.The arbors are composed of a set of connected sections and stored in acyclic graphs.Dendritic spines are not shown.

Figure 6 .
Figure 6.(A) A closeup on a dendritic segment of a spiny neuron showing the resulting meshes with different voxelization resolutions: 0.07 and 0.1 μm for the red and blue meshes, respectively.Using lower resolution without taking into consideration the dimensions of the spine meshes results in fragmented mesh partitions as demonstrated by the magnifications in (B).

Figure 10 .
Figure10.Performance benchmarks (in seconds) for our implementation based on a data set consisting of 60 various morphological types of cortical neurons[6,40].The timing of the Proxy Mesh Reconstruction stage comprises the soma simulation time, arbors reconstruction, and the integration of the spines along the dendritic arbors.The mesh optimization time comprises the mesh coarsening and smoothing.Axons of the shown neurons are limited to second-order branching only.