# Alpha Mesh Swc: automatic and robust surface mesh generation from the skeleton description of brain cells

Alex Mcsweeney-Davis, Chengran Fang, Emmanuel Caruyer, Anne Kerbrat, Jing-Rebecca Li

► To cite this version:

Alex Mcsweeney-Davis, Chengran Fang, Emmanuel Caruyer, Anne Kerbrat, Jing-Rebecca Li. Alpha Mesh Swc: automatic and robust surface mesh generation from the skeleton description of brain cells. Briefings in Bioinformatics, 2025, 26 (3), 10.1093/bib/baf258. hal-04913819

HAL Id: hal-04913819

https://hal.science/hal-04913819v1

Submitted on 27 Jan 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# Alpha_Mesh_Swc: automatic and robust surface mesh generation from the skeleton description of brain cells

¹Alex McSweeney-Davis, ¹Chengran Fang, ²Emmanuel Caruyer,

²,³Anne Kerbrat, ¹Jing-Rebecca Li

¹Inria-Saclay, Équipe Idefix ENSTA Paris, UMA, 828 Boulevard des Maréchaux, 91762 Palaiseau, France

²Empenn research team - IRISA Campus de Beaulieu, 263 Avenue du Général Leclerc, 35042 Rennes cedex, France

³CHU Rennes, Department of Neurology, F-35033, Rennes, France

Correspondence: jingrebecca.li@inria.fr

January 22, 2025

**Abstract:** In recent years, there has been a significant increase in publicly available skeleton descriptions of real brain cells from laboratories all over the world. In theory, this should make it possible to perform large scale realistic simulations on brain cells. However, currently there is still a gap between the skeleton descriptions and high quality simulation-ready surface and volume meshes of brain cells.

We propose and implement a tool called *Alpha_Mesh_Swc* to generate automatically and efficiently triangular surface meshes that are optimized for finite elements simulations. We use an Alpha Wrapping method with an offset parameter on component surface meshes to efficiently generate a global watertight mesh. Then mesh simplification and re-meshing are used to produce an optimal surface mesh. Our methodology limits the number of surface triangles while preserving geometrical accuracy, permits cutting and gluing of cell components, is robust to imperfect skeleton descriptions, and allows mixed cell descriptions (surface meshes combined with skeletons).

We compared the robustness, performance and accuracy of *Alpha_Mesh_Swc* against existing tools and found significant improvement in terms of mesh accuracy. We show, on average, we can generate fully automatically a brain cell (neurons or glia) surface mesh in a couple
of minutes on a laptop computer resulting in a simplified surface mesh with only around 10k nodes. The resulting meshes were used to perform diffusion MRI simulations in neurons and microglia. The code and a number of sample brain cell surface meshes have been made publicly available.

**Keywords:** mesh reconstruction; in silico; simulations; brain imaging; diffusion MRI

# 1 Introduction

The use of numerical phantoms to simulate diffusion MRI experiments plays a crucial role in developing and validating models to answer important biological questions (Girard et al., 2023; Palombo et al., 2019; Villarreal-Haro et al., 2023). A common use of such simulations is to validate models of the brain tissue used to interpret diffusion MRI signals (Jespersen et al., 2019; Olesen et al., 2022; Palombo et al., 2020; Rensonnet et al., 2018; Veraart et al., 2019). These models are often a variant of the Standard Model, which splits a brain region into several compartments (e.g. axon, soma, extra-cellular space etc) and uses analytical approximations to estimate the signal corresponding to each compartment (Novikov et al., 2019). These models can serve to provide estimates for biological parameters of clinical importance (Mercredi & Martin, 2018; Palombo et al., 2019). In addition, increasingly there is interest in applying machine learning techniques to estimate biological parameters from diffusion MRI signals (Fang et al., 2023; Nedjati-Gilani et al., 2017).

In Fang et al. (2023), we demonstrated how to construct an artificial neural network called a multi-layer perception (MLP) to estimate biophysical parameters from diffusion MRI data. We used a database of artificial voxels based on simulations of 1,163 neurons and 50 glial cells to train the MLP. Due to space limitations, the algorithm that we used for generating surface meshes of realistic brain cells was not described in that paper. In this paper we present the surface mesh generation algorithm of realistic brain cells that we developed and implemented, which significantly improves upon our original algorithm used in Fang et al. (2023) (available at https://github.com/fachra/swc2mesh).

To simulate diffusion MRI signals using random walker or finite elements simulations, it is necessary to have geometrical meshes that represent the brain cells. In finite elements simulations, we require a tetrahedral volume mesh of the interior of the brain cells. There are numerous software packages (Tetgen from Hang (2015), Gmsh from Geuzaine and Remacle (2009), CGAL from The CGAL Project (2024)) which can generate volume meshes from watertight surface meshes, so the primary challenge is the creation of watertight brain cell surface meshes.
When designing our mesh generation algorithm, we must take the following into account:

1. The algorithm must take as input commonly available skeleton descriptions of brain cells, such as the Swc file format (Cannon et al., 1998; Stockley et al., 1993), and be robust to imperfections in the skeleton descriptions. The surface mesh must be an accurate representation of the morphology, without significant distortion or omission of features.

2. The generated surface meshes must be watertight to create tetrahedral volume meshes.

3. The method must be robust and automatic with little required user intervention.

4. The algorithm computational cost should be low since a large number of meshes must be generated in a reasonable time.

5. The final finite element mesh should be of "good quality" and reasonable size for simulations, which means the surface mesh also should be of good quality and reasonable size.

A number of other works have presented meshing algorithms for simulation of diffusion MRI in brain cells. The tool MEDUSA (Ginsburger et al., 2019) packs multiple cells and fibers within a fixed volume. This is not the aim of our work here, where we will be simulating on individual cells whose geometry is predetermined. The work in (Palombo et al., 2019) that generates surface meshes to enable Monte-Carlo simulations of diffusion MRI is closer in aims to our work. However, that method relies on manual manipulations in the package Blender ("Blender", n.d.) via their package add-on called *SWC Mesh*, described in ("Blender Swc Mesh", n.d.). Thus, extending their approach to automatic and large scale mesh generation is challenging.

There are also tools that generate surface meshes from skeleton representations of cells for purposes other than diffusion MRI simulations. The majority of these focus on visualizing cells and are not suitable for finite element simulations because they do not require watertightness. Such tools include *NeuroMorphoVis* (Abdellah et al., 2017, 2018), *NeuroTessMesh* (Garcia-Cantero et al., 2017), *NeuroEditor* (Velasco et al., 2024) and *Neuronize* (Brito et al., 2013). A few more recent tools that state their primary aim as visualisation but also ensure watertightness are *NeuroSkelMeshEvolution* (Zhu et al., 2022) and the method introduced in Wang et al. (2024). The former requires high computational resources and does not model the soma accurately. The latter is not publicly available.

Finally the tools that aim to automatically generate watertight surface meshes for simulation purposes include the *Ultraliser* (Abdellah et al., 2023) and *AnaMorph* (Mörschel et al., 2017). *Ultraliser* uses the skeleton file to categorize cubes in a Cartesian grid as "inside" or "outside" the cell, the boundary
of this then becomes the surface mesh of the cell, which then undergoes smoothing and optimization. *AnaMorph* uses splines to create neurites branches and intersections are then repaired using explicit geometrical criteria. We also mention the Python library *Neuron* which implements an method proposed in (McDougal et al., 2013, 2022) to create a watertight surface for neurons to solve reaction-diffusion systems. However, this is done only as an intermediate step for simulating a reaction-diffusion system and we were not able to return the surface mesh. All the above existing tools have their own problems when it comes to diffusion MRI simulations, and we will conduct a comparison of our method with those that are publicly available later in this paper.

# 2 Theory

## 2.1 Skeleton description of brain cells

Three dimensional cell reconstructions are used widely in the neuroscience community and are typically encoded in an Swc file, in a tabular format. They can be produced semi-automatically from brain cell microscopic images (Glaser & Glaser, 1990; Peng et al., 2013) or randomly generated given several morphological parameters (Cuntz et al., 2010; Palombo et al., 2019).

An Swc file consists of a table of 7 columns, each one corresponding to a node's index; type; *x*,*y*, and *z* positions; cross-sectional radius; and parent node index. An illustration is presented in Figure 1 and more details can be found in Cannon et al. (1998). The type of the node indicates the part of the cell to which it belongs given by the following key: 1 - soma, 2 - axon, 3 - basal dendrite, 4 - apical dendrite, 5 - custom, 6 - unspecified neurites, 7 - glia processes (Ascoli et al., 2007). However for our purposes the real distinction is between the soma and the rest of the cell, which we shall refer to as neurites or processes in this paper.

A common way to represent these visually is by placing spheres of the corresponding radius at the soma nodes, and rounded cones between connected (non-soma) nodes. This representation is the basis for "Skeleton to mesh error metric" described in more detail in Section 3.5.

Raw skeleton descriptions often have a number of artifacts which can lead to poor meshing: branches can overlap one another; the radii of nodes can vary widely within a short distance; branches can twist and intersect back along themselves; the nodes are often not sampled uniformly along the skeleton.
<figure><img src="image_2.png" /><figcaption>Figure 1: (a) an illustrative example of an SWC file (not a real cell). From left to right, the columns represent node index, type of neuronal compartment, *x*, *y*, *z* coordinates, radius, and parent node index, respectively. For example, the second node represents a section of apical dendrite (type 4) located at [0, 0, 8] with a radius of 2 µm. It connects to its parent (the first node). If the parent index is -1, the current node is the root. (b) a visual representation of the neuron skeleton defined by the SWC file in (a). The red ⊗ symbol represents a soma node, and neurite nodes are denoted by red +. The blue lines whose lengths are *l*₁, ..., *l*₄ sketch the neuron skeleton. The dashed lines illustrate the neuron morphology in 3D. (c) the rounded cone that can be used to connect two consecutive nodes</figcaption></figure>

# 3 Method

We propose a new method called *Alpha_Mesh_Swc* to generate watertight surface meshes for simulations. Like the existing method *Ultraliser*, *Alpha_Mesh_Swc* also relies on distinguishing inside and outside grid elements. However, in contrast to *Ultraliser*, which uses a fixed grid of Cartesian cubes in three dimensions, we rely on the Alpha Wrap method (Portaneri et al., 2022), which can be thought of as using a grid of adaptive tetrahedra to define inside and outside for an input geometry object. This choice results in a higher mesh accuracy especially for complex and multi-scale geometries such as neurons and glial cells.

## 3.1 The Alpha_Mesh_Swc Method

A summary of the steps of *Alpha_Mesh_Swc* is illustrated in Figure 2. Short descriptions of the steps follow.

### 3.1.1 Pre-processing of skeleton description

First we perform an initial processing of the Swc file (see Figure 3), which consists of progressive node merges and insertions into the skeleton. The aim of this is to have a roughly uniform distance between a
<figure><img src="image_3.png" /><figcaption>Figure 2: Mesh generation pipeline for our method *Alpha_Mesh_Swc*: (a) the Swc file is processed to provide a more uniform skeleton. (b) the branches of the Swc are identified. (c) The spheres are placed at the end of each branch and at the soma. The tubular meshes are placed along every branch. (d) The Alpha Wrap method from (Portaneri et al., 2022) is applied to generate a large watertight uniformly meshed surface. (e) the method is simplified using repeated applications of the quadric edge metric algorithm from Garland and Heckbert, 1997. (f) the tetrahedral volume mesh generated by Tetgen (Hang, 2015). Part of the volume mesh is cut out to show the internal tetrahedra.</figcaption></figure>

node and its parent, and to insert additional nodes when the radius changes rapidly. The details are of the exact insertion and merging criteria is given in the Supplementary Material.

<figure><img src="image_4.png" /><figcaption>Figure 3: Processing the skeleton. The red ⊗ symbol indicates the soma and the red + symbols indicate non-soma nodes present in the original skeleton. Nodes are merged when they are too close together and have radii which are within a factor of two of one another. Additional nodes are inserted when: nodes are too far apart (right hand side of the neuron); between two adjacent bifurcation nodes sufficiently far apart (the two bifurcation nodes on the left); or when there is a rapid change in radius between adjacent nodes (before the first bifurcation node on the left hand side).</figcaption></figure>

### 3.1.2 Construction of initial meshes

The second step is to construct an initial non-watertight mesh to apply the Alpha Wrapping method. At this stage we identify all nodes that are labelled as a soma or are bifurcations nodes and insert a sphere of the corresponding node radius. These nodes are considered to be removed from the list of available nodes. The remaining nodes are separated into *branches* which are list of nodes ($i_1, i_2, ..., i_k$) with node $i_{k+1}$ being the only child of node $i_k$ (See Figure 4 (a)).
<figure><img src="image_5.png" /><figcaption>Figure 4: (a) Nodes are classified as being soma/bifurcation nodes which are given by the yellow ⊗ symbol, and the remaining nodes are grouped into connected components which we refer to as “branches”. These are given by the +, ×, ⊕, ○, *, ▲, ♦ symbols. (b) From the branches and soma nodes local meshes are produced and merged into one self-intersecting mesh. (c): A mesh constructed along the branch 2 (× in (a)). The mesh is generated by progressively translating, rotating, and scaling a polygon along the curve γ and placing spheres at the end nodes.</figcaption></figure>

To these lists we append the parent node $i_0$ of $i_1$ and construct an explicit tubular mesh containing these nodes, by the following steps.

We construct a spline $\gamma: [0, 1] \to \mathbb{R}^3$ which goes through each of the nodes in the branch. We also construct another spline $r: [0, 1] \to \mathbb{R}$ which interpolates the radius value at each node. The function $r$ is constrained not to lie outside of the range of radii values at the nodes along this branch. Here 0 is identified with the node $i_0$ and 1 with the final node $i_k$, and each node $i_j$ with the normalized arc-length value $t_j = \sum_{i=1}^j |p_i - p_{i-1}| / \sum_{i=1}^k |p_i - p_{i-1}|$.

We then compute an initial slice $v_0$ by first sampling points uniformly on the unit circle in the $x-y$ plane. These points are then scaled to the radius $r(0)$ and then rotated so that the z-axis aligns with $\dot{\gamma}(0)$. Then given the slice $v_{i-1}$ the slice $v_i$ is constructed by:

$$v_i = \frac{r(t_i)}{r(t_{i-1})} R_{\dot{\gamma}(t_{i-1}), \dot{\gamma}(t_i)}(v_{i-1} - \gamma(t_{i-1})) + \gamma(t_i)$$

where $R_{u,v}$ is a rotation matrix which sends the vector $u$ to align with vector $v$. Faces are then constructed explicitly between each slices $v_{i-1}, v_i$. Finally, spheres of radius $r(0)$ and radius $r(1)$ are placed centered at $\gamma(0)$ and $\gamma(1)$. An example of a mesh formed by this method is Figure 4 (c).

Each of these meshes are stored together as a single geometry object with all of the branches and all of the spheres from the soma nodes (See Figure 4 (b)). This mesh is certainly not watertight and may even have self-intersections along the branches, however it is quick to compute and these faults are taken care of by the next step.
### 3.1.3 Construction of a first watertight surface mesh

To this single geometry object we apply the Alpha Wrap method with an offset Portaneri et al., 2022. As default parameters, we chose $\alpha = 2r_{min}/L$ where $r_{min}$ is the minimum node radius of the Swc file and $L$ is the length of the diagonal of the bounding box containing the node positions. We choose the offset fraction ($\delta$ in Portaneri et al., 2022) to be $\alpha/30$. At the end of this stage the output mesh is a watertight surface mesh with a generally high ratio of quality triangles.

### 3.1.4 Simplification of the surface mesh

Once the output mesh has been computed by the Alpha Wrap method, we apply the Isotropic Remeshing method then the Quadric Edge Collapse method Garland and Heckbert (1997) and Hoppe et al. (1993). The first of these creates a more uniform mesh, the second reduces the size of the mesh, with a quality threshold of 0.3 and a target number of faces.

### 3.1.5 Finite element mesh from Tetgen

Once a watertight simplified mesh is saved Tetgen can be called to produce a tetrahedral volume mesh.

## 3.2 User input and workflow

To mesh a Swc file all that is required by the user is to input the initial Swc file. Optional parameters include: the minimum number of faces for the final mesh; the value of dfaces, which controls the levels of mesh simplification to attempt; and the value for $\alpha$ in the alpha wrapping step, with a smaller value of $\alpha$ producing a more accurate mesh. The default values $\alpha$ is set to be $\alpha = \min(2r_{min}, 0.0005d)$ where $r_{min}$ is the minimum cross sectional radius of the Swc file and $d$ is the diagonal of the bounding box containing the Swc nodes. These choices may be overwritten if the user decides a different $\alpha$ is necessary.

The user can specify that the simplification step is to be skipped. We do not recommend doing this if the user desires to use the mesh for simulations, as it will be too large to be computationally efficient.
<figure><img src="image_6.png" /><figcaption>Figure 5: Comparison of meshing output for different values of α. Here α is controlled by setting the ratio α/L ,where L is the length of the diagonal of the bounding box. Left: surface mesh computed in 15s, Right: surface mesh computed in 116 s.</figcaption></figure>

3.3 Potential limitations

As the Alpha Wrap method guarantees a watertight mesh which encloses the input, and the simplification
process checks for watertightness, the surface mesh is guaranteed to be a watertight mesh. It is possible
that during the simplification procedure, parts of the neuron is lost due to branches collapsing, however
we have not observed this during any of the neurons we have tested, so we believe that pathological
cases are rare. However, if the α parameter is set too large there is the possibility of branches being
merged together. This can be overcome by choosing a smaller value for α, although this will increase
the computation time. An example as to how α can effect the accuracy of the mesh is in Figure 5.

3.4 Mixed descriptions

Our method *Alpha_Mesh_Swc* is capable of creating a single coherent mesh from mixed descriptions of neurons. For example, the Imaris software (https://imaris.oxinst.com/) records the soma of the cell as a surface mesh and provides a separate skeleton description for the processes. We can merge these into a single watertight mesh by generating the tubular meshes from the skeleton representation as described in Section 3.1.2 combining them with the mesh from the soma. From here the Alpha Wrap method can be applied followed by mesh simplification.
## 3.5 Skeleton to mesh error metric

To assess the accuracy of a given surface mesh extracted from a Swc file we constructed a uniform point cloud representation $P$ of the cell surface directly from the skeleton representation: yo each soma node we associate a spherical point cloud centered on that node; To each non-soma node we associate a point cloud from a rounded cone connecting the node to its parent. To ensure a uniform distribution we use the Fibonacci lattice pattern (González, 2010). Once we have the point-clouds we remove any points which lie with the interior of another cone/sphere and we end up with a uniformly sampled point cloud along the surface of the cell.

For the mixed descriptions of cells given in Section 3.4 it is necessary to sample a point cloud from the soma surface mesh, and generate the corresponding neurite point cloud as above. These can then be merged removing interior points. Inspired by the distance energy defined for fitting a mesh to a point cloud presented in Hoppe et al. (1993), we now define a metric to measure the skeleton to mesh error:

$$ \text{Skeleton to Mesh Error} = \sqrt{\frac{1}{|P|} \sum_{p \in P} |d(p)|^2}, \qquad (1) $$

where $d: P \to [0, \infty)$ is the distance from each point in the point cloud to the surface mesh.

## 3.6 Implementation

The Alpha_Mesh_Swc method is available at https://github.com/SpinDoctorMRI/Alpha_Mesh_Swc. We found that a common issue was verifying whether meshes were watertight, with existing Python library methods answers not always corresponding to whether a finite element mesh could be produced. A summary of the types of mesh defects that may be present in watertight meshes are shown in Figure 6 (from Botsch (2010)). We introduced a two-step procedure, using the Python library Trimesh Dawson-Haggerty et al., n.d. to check the connectivity based defects ([a,b,d,e] in Figure 6), and TetGen to check for any self intersecting faces ([c] in Figure 6). As our simulations are run in the MATLAB toolbox SpinDoctor, the primary output of Alpha_Mesh_Swc is the surface mesh, which is then inputted into SpinDoctor along with the Swc file. As TetGen is included with Alpha_Mesh_Swc, it is also possible to obtain a finite element mesh directly from Alpha_Mesh_Swc.
<figure><img src="image_7.png" /><figcaption>Figure 6: Possible surface mesh defects that break watertightness. Reproduced from Botsch (2010).</figcaption></figure>

# 4 Results

We took a sample of typical neuron Swc files from Neuromorpho (https://neuromorpho.org/) and generated meshes from them. All computations related to mesh generation were performed on a laptop with 32 GB RAM, and a 2.10 GHz 12th Gen Intel(R) Core(TM) i7-12850HX. We recall that the criteria for a good surface mesh generator described in Section 1 are: accurate watertight meshes; low computational cost; low number of finite element nodes while keeping a high quality finite element mesh.

## 4.1 Comparison with existing methods on typical cells

We chose two typical neurons, a spindle cell 04b_spindle3aFI and the neuron 1-2-1.CNG, meshed them with existing methods (when available) and compared with Alpha_Mesh_Swc. The results are summarised in Table 1. The meshing tools NeuroMorphoVis (NMV), NeuroEditor, AnaMorph, and Neuronize produced non-watertight meshes so they are not appropriate for use in simulations. NeuroSkelMeshEvol (NSME) and BlenderSWCMesh (BSWCM) produced watertight meshes but the meshes are very large and the computational times are high. The main competition is between Alpha_Mesh_Swc, Ultraliser and the modified version of Ultraliser we implemented. Already, we see that Alpha_Mesh_Swc is robust against artifacts within the Swc files because it did not fail (in contrast to Ultraliser and Modified Ultraliser). It also produces the coarsest meshes while still taking a reasonable computational time.

We found that the Ultraliser method Abdellah et al., 2023 generally produces reasonable sized watertight
<table><caption>Table 1: The first 5 meshing tools produced watertight surface meshes. The last 4 meshing tools produced non-watertight meshes. "fail" refers to when the meshing tool crashed.</caption><thead><tr><th rowspan="2">Method</th><th colspan="2">04b_spindle3aFI</th><th colspan="2">1-2-1.CNG</th></tr><tr><th>Mesh size</th><th>Comp time (s)</th><th>Mesh size</th><th>Comp time (s)</th></tr></thead><tbody><tr><td colspan="5" style="text-align: left;">Watertight meshes</td></tr><tr><td>Alpha_Mesh_Swc</td><td>1,857</td><td>10</td><td>11,089</td><td>112</td></tr><tr><td>Modified Ultraliser</td><td>fail</td><td>fail</td><td>27,725</td><td>78</td></tr><tr><td>Ultraliser</td><td>fail</td><td>fail</td><td>64,180</td><td>8</td></tr><tr><td colspan="5" style="text-align: left;">Long comp time and large mesh size</td></tr><tr><td>NSME</td><td>14,277</td><td>24</td><td>329,925</td><td>6,270</td></tr><tr><td>BSWCM</td><td>974,104</td><td>35</td><td>1,451,175</td><td>515</td></tr><tr><td colspan="5" style="text-align: left;">Non-watertight meshes</td></tr><tr><td>NMV</td><td>10,322</td><td>1</td><td>450,766</td><td>1</td></tr><tr><td>NeuroEditor</td><td>948,056</td><td>&lt;1</td><td>7,625,247</td><td>&lt;1</td></tr><tr><td>AnaMorph</td><td>5,466</td><td>&lt;1</td><td>fail</td><td>fail</td></tr><tr><td>Neuronize</td><td>fail</td><td>fail</td><td>18,466</td><td>≈30</td></tr></tbody></table>

meshes quickly and robustly, however it models the soma as a deformable sphere which can significantly distort the output geometry. We corrected this issue with the *Modified Ultraliser* method, which applies the alpha-wrapping algorithm only to the collection of soma nodes, and then applies the *ultra-MeshesToMesh* tool to merge the *Ultraliser* mesh and the soma mesh. The final mesh is then passed into our simplification algorithm from Section 3.1.4.

More detailed comparisons between the individual methods can be found in the Supplementary Material.

## 4.2 Mesh Accuracy

We now use the Skeleton to Mesh Error defined in Section 3.5 to measure the accuracy of each surface mesh. The results are displayed in Table 2, which shows our method has the smallest error at 0.039 (for 1-2-1.CNG). The large errors of Blender, NeuroSkelMeshEvolution, and Ultraliser are largely due to the modelling of the soma. The mesh obtained from Modified Ultraliser does not have the soma problem, its error of 0.765 (for 1-2-1.CNG) comes from the neurites.

## 4.3 Meshing statistics

We tested Alpha_Mesh_Swc and Modified Ultraliser methods by applying them to a sample of 1000 different neurons from NeuroMorpho.org. For each cell we recorded the computation time, surface
<table><caption>Table 2: Skeleton to Mesh Error defined in Section 3.5.</caption><thead><tr><th>Method</th><th>04b_spindle3aFl</th><th>1-2-1.CNG</th></tr></thead><tbody><tr><td>Alpha_Mesh_Swc</td><td>0.204</td><td>0.039</td></tr><tr><td>Modified Ultraliser</td><td>NA</td><td>0.765</td></tr><tr><td>Ultraliser</td><td>NA</td><td>1.582</td></tr><tr><td>Blender SWC Mesh</td><td>5.161</td><td>36.702</td></tr><tr><td>NeuroSkelMeshEvolution</td><td>29.901</td><td>36.050</td></tr></tbody></table>

mesh size and surface mesh accuracy. We then piped each surface mesh into *TetGen* to produce finite element meshes using TetGen flags -pq1.2a1.009VC. To measure the quality of a finite element mesh, we recorded the shape measure (Knupp, 1999) for each tetrahedron in the mesh and recorded the proportion of tetrahedra which have a shape measure greater than 0.5. After successfully generating 1000 watertight surface meshes with our method all but five was easily meshed by TetGen. After rerunning our simplification algorithm on these cells with a lower number of faces from the simplified mesh, these meshes were accepted by *TetGen*.

The results are displayed in Table 3, graphical representations in Figure 7. We used the default resolution for *Modified Ultraliser* as in our experience a higher refinement level significantly increases the computational time (see Supplementary Material).

<table><caption>Table 3: Meshing statistics for *Alpha_Mesh_Swc* (AMS) and *Modified Ultraliser* (MU) method tested on 1000 neurons. *Alpha_Mesh_Swc* produced 1000 watertight meshes; *Modified Ultraliser* produced 977 watertight meshes.</caption><thead><tr><th>Statistic</th><th>Method</th><th>Median</th><th>Mean</th><th>Std dev</th><th>Min</th><th>Max</th></tr></thead><tbody><tr><td rowspan="2">Surface meshing time (s)</td><td>AMS</td><td>108.3</td><td>164.9</td><td>255.0</td><td>2.4</td><td>3563.9</td></tr><tr><td>MU</td><td>80.5</td><td>113.7</td><td>123.4</td><td>0.0</td><td>2136.7</td></tr><tr><td rowspan="2">Skeleton to Mesh error</td><td>AMS</td><td>0.077</td><td>0.083</td><td>0.047</td><td>0.013</td><td>0.822</td></tr><tr><td>MU</td><td>0.850</td><td>2.822</td><td>41.831</td><td>0.166</td><td>1286.546</td></tr><tr><td rowspan="2">Surface mesh vertices</td><td>AMS</td><td>3844</td><td>7661.3</td><td>14017.5</td><td>184</td><td>167288</td></tr><tr><td>MU</td><td>16300</td><td>17869.1</td><td>10510.2</td><td>510</td><td>72449</td></tr><tr><td rowspan="2">FE mesh vertices</td><td>AMS</td><td>111874</td><td>125441.5</td><td>68904.0</td><td>4488</td><td>1184383</td></tr><tr><td>MU</td><td>215246</td><td>255581.6</td><td>153836.3</td><td>7456</td><td>1234711</td></tr><tr><td rowspan="2">FE mesh quality</td><td>AMS</td><td>0.852</td><td>0.852</td><td>0.022</td><td>0.780</td><td>0.917</td></tr><tr><td>MU</td><td>0.909</td><td>0.905</td><td>0.024</td><td>0.498</td><td>0.927</td></tr></tbody></table>

We see that our method is significantly better at controlling the mesh error (0.083 versus 2.822) and generally leads to finite element meshes of smaller size (7,661 versus 17,869) and similar quality. Our method is also more robust, generating finite element meshes for every single cell. In the context of diffusion MRI simulations, an average meshing time of 3 minutes (165 seconds versus 113 seconds) is not too slow, as other stages in the simulation will take longer than this.
<figure><img src="image_8.png" /><figcaption>Figure 7: Meshing statistics from testing on 1000 neurons for our method, and *Modified Ultraliser*. There were 14 Skeleton to Mesh errors above 2 from *Modified Ultraliser* not shown. The computation time breakdown for *Alpha_Mesh_Swc* is shown in the top left with: (a)-(b): processing skeleton file; (c): building local meshes; (d): applying Alpha Wrap; (e): simplifying mesh.</figcaption></figure>
### 4.4 Mixed descriptions for human microglia

We applied the mixed descriptions version of our algorithm from Section 3.4 to 20 different human microglia, of which 10 were ramified and 10 were amoeboid. This data was provided by Franco-Bocanegra et al. (2021). Six of these meshes are shown in Figure 8. These meshes are now usable for finite element simulations of diffusion MRI experiments, the results of which will be the subject of a future work.

We found that this dataset did require manual modifications of some of the parameters. Specifically, we found it better to set the desired number of faces to 6000 and to manually set the alpha parameter to be 0.001 multiplied by the diagonal of the bounding box, with the exception of one cell. This cell had a process which did not intersect into the soma surface mesh, and a small alpha value led to two disconnected surfaces being formed. For this cell we therefore set the alpha parameter to 0.002 times the diagonal of the bounding box.

We also tested with the Modified Ultraliser method, however there were significant problems with most of the meshes, resulting from disconnected processes and a double layer being produced within the soma, as a result of small holes present in the input mesh. A detailed comparison between the methods can be found in the Supplementary material.

## 4.5 Diffusion MRI simulations

For a full introduction to diffusion MRI Finite Elements simulations and a detailed description of the toolbox SpinDoctor we refer to Li et al. (2019). Here we simply aim to present an example of how these meshes can be used for numerical simulations. SpinDoctor computes the diffusion MRI signal of a domain Ω by numerically solving the governing Bloch-Torrey partial differential equation for the transverse magnetization and integrating it over Ω to obtain the MRI signal. SpinDoctor supports the Numerical Matrix Formalism method Li et al., 2020, which computes the numerical eigenfunctions of the Laplace operator in the domain Ω. The solution to the Bloch-Torrey equation has an analytical representation in terms of these eigenfunctions, and once computed and stored this reduces the computation for a given domain to calculating matrix exponentials in the eigenfunction basis.

We conducted our simulations for the mesh of the cell 1-2-2.CNG with a PGSE sequence Stejskal and Tanner (1965) in the *x* direction with parameters *δ* = 10ms, *Δ* = 43ms, and *b*-values: 500, 1000, 2500, 4000, 6000, 7000, 8000, 100000 s/mm². In Figure 9 we present the plot of the signals as a function of the *b*-value and in Figure 10 the magnetization of the cell and the echo time.
<figure><img src="image_9.png" /><figcaption>Figure 8: Selection of surface meshes obtained using *Alpha_Mesh_Swc* from human microglia cells from Franco-Bocanegra et al. (2021). These are (left column) 714_3_2, 714_3_3, 766_4_3 and (right column) 818_1_3, 826_6_3, ctrl_010319_13_826-2_1.</figcaption></figure>
<figure><img src="image_10.png" /><figcaption>Figure 9: Diffusion MRI signals of 1-2-2.CNG using SpinDoctor for the PGSE sequence in the *x* direction with parameters *δ* = 10ms, *Δ* = 43ms, and *b*-values: 500, 1000, 2500, 4000, 6000, 7000, 8000, 100000 s/mm².</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Figure 10: Diffusion MRI magnetization of 1-2-2.CNG using SpinDoctor for the PGSE sequence in the *x* direction with parameters *δ* = 10ms, *Δ* = 43ms, and *b*-value: 500 s/mm².</figcaption></figure>
Simulating the signals for one cell is by itself not a significant advancement (see Fang et al. (2020) and Palombo et al. (2019)), however our *Alpha_Mesh_Swc* allows us to automate this and to run simulations on a much larger number of cells. The results of these simulations will be the subject of future work from us.

## 4.6 Meshed cells

We have made the surface meshes for the 1000 test Swc files publicly available at https://github.com/SpinDoctorMRI/Alpha_Mesh_SwcDataSet. In addition to these cells, we have also meshed 20 human microglia cells from Franco-Bocanegra et al. (2021), 64 human microglia cells from Torres-Platas et al. (2014), and 500 mouse microglia cells from Colombo et al., 2022. Then we have also meshed a further 1702 neuron meshes from Neuromorpho.org.

# 5 Discussion

We presented a new method *Alpha_Mesh_Swc* to output surface meshes from skeleton descriptions of brain cell geometries, fit for diffusion MRI simulation purposes. The method is an improvement on the one we used in Fang et al., 2023 and can be easily integrated into the diffusion MRI simulator SpinDoctor (Fang et al., 2020) or other simulators.

Our methodology is designed to be fully automatic, with no manual input or GUI manipulation required from the user in the mesh generation stages. It allows the use of reconstructed somas in combination with skeleton reconstructions, enabling a greater source of brain cell datasets. We showed that our approach is robust and accurate while maintaining a reasonable computational time. We include the option of segmenting the finite element meshes into soma and neurite/processes compartments to allow for efficient simulations of individual cell components. *Alpha_Mesh_Swc* was implemented using the Python programming language (Van Rossum, Drake, et al., 1995) calling functionalities from the library PyMeshLab (Muntoni & Cignoni, 2021). We have produced 1000 surface meshes using *Alpha_Mesh_Swc*. Both the code and a large number of surface meshes have been made publicly available.

We compared our method to several existing mesh generating methods that are publicly available (Abdellah et al., 2017, 2023; McDougal et al., 2022; Palombo et al., 2019; Wang et al., 2024; Zhu et al., 2022). *Alpha_Mesh_Swc* produced coarser surface meshes than existing methods, which will reduce the computational cost and time of subsequent diffusion MRI simulations. We defined a metric called the
"Skeleton to Mesh Error" to measure the discrepancy between a surface mesh representation of an Swc file and the original file. We found that our meshes are more accurate with respect to the input cell morphology than existing methods. We emphasize that a discrepancy between the mesh and the skeleton description can correspond in reality to inaccurate diffusion MRI signals.

We demonstrated how the meshes can be used to obtain accurate diffusion MRI signals from brain cells by coupling the surface meshes to the numerical matrix formalism method (Li et al., 2020) to solve the Bloch-Torrey equation, allowing rapid calculation of the diffusion signals for a large number of experiments. The speed, accuracy and reliability of *Alpha_Mesh_Swc* will enable diffusion MRI simulations for large numbers of cells, which will help the diffusion MRI community to develop new imaging protocols and data intensive methodologies.

In terms of potential future improvements, in this work we have used existing implementations of various external meshing algorithms in PyMeshLab. The recent work done in Abdellah et al. (2023), McDougal et al. (2022) and Wang et al. (2024) have demonstrated the computational efficiency of writing custom versions of these algorithms that are better suited to the sparse nature of neurons and other brain cells. In this paper we have shown that the tetrahedra based carving approach in the Alpha Wrap method gives more accurate brain cell branches than the cubes based carving approach implemented in Ultraliser. It is quite possible that a custom version of the Alpha Wrap method written in C++ and developed with the sparse geometry of the neuron in mind could compete with the speed of cubes carving approaches in Mörschel et al. (2017) and Abdellah et al. (2023), while keeping the improved accuracy and robustness of the Alpha Wrapping method. Specifically, the Alpha Wrap method iteratively carves a volume mesh which encloses the input geometry until a termination condition is met. The initial volume mesh forms a bounding box over the input which is then refined and carved heavily. Given the point and radius nature of the skeleton input, it is certainly possible to cover the input geometry with a tighter initial volume mesh before applying the Alpha Wrap method. There is also the possibility of using the local geometry information from the skeleton file to vary $\alpha$ over the volume mesh during the iteration procedure. By making $\alpha$ larger closer to the soma or thick branches and smaller over small branches and close to bifurcations, the surface mesh produced from the Alpha Wrap would be coarser and more adapted to the local geometry (Portaneri et al., 2022). This could in turn reduce the computational time of the mesh simplification, potentially allowing the user to skip it entirely if the Alpha Wrap mesh is already sufficiently coarse. These extensions require reworking the entire project in C++ to allow for these modifications and we leave it for future work.

While we have focused on finite elements diffusion MRI simulations, *Alpha_Mesh_Swc* is a useful tool for simulating other physical and biological processes within individual neurons. The surface meshes for
example can be used for Monte-Carlo simulations, such as in Palombo et al. (2019) using simulators like CAMINO Hall and Alexander (2009) (available at http://camino.cs.ucl.ac.uk/index.php?n=Main HomePage), and the finite element meshes can be used to solve other PDEs.

In summary, our work here provides a valuable addition to the group of brain cell mesh generation tools. Combined with numerical matrix formalism, we believe *Alpha_Mesh_Swc* will contribute to the development of new diffusion MRI imaging biomarkers by enabling data and computation intense techniques from machine learning and MR fingerprinting.

# 6 Conclusions

Diffusion MRI simulations require accurate and reasonably sized three-dimensional surface and volume meshes of brain cell geometries. We present the *Alpha_Mesh_Swc* method which accepts as input a Swc file of a neuron or glial cell and outputs a watertight surface mesh that is reasonably coarse while still accurately represents the cell geometry.

We defined a new metric called the Skeleton Mesh Error and compared several existing methods with our method. We showed that *Alpha_Mesh_Swc* reliably produces surface meshes of a higher accuracy than existing methods while keeping the meshes watertight and reasonably coarse. We also include the option to segment the finite element mesh into soma and branches compartments, permitting diffusion MRI simulations on cell components.

We have produced 1000 surface meshes using *Alpha_Mesh_Swc*. Our method is fully automatic, fast and robust. The output surface meshes are ready to be used to produce high quality and accurate finite element meshes for simulation purposes. Both the code and a large number of surface meshes have been made publicly available at https://github.com/SpinDoctorMRI/Alpha_Mesh_Swc

# Ethics

There are no ethical issues involved.
# Data and Code Availability

Our tool *Alpha_Mesh_Swc* is available at https://github.com/SpinDoctorMRI/Alpha_Mesh_Swc which also contains some sample Swc files and instructions on how to use the code. The scripts used to produce the figures and tables are available at https://github.com/SpinDoctorMRI/Alpha_Mesh_Swc/tree/Paper_Scripts, which also contains our implementation of *Modified Ultraliser*.

The 1000 surface meshes generated by *Alpha_Mesh_Swc* are available here: https://github.com/SpinDoctorMRI/Alpha_Mesh_SwcDataSet.

The SpinDoctor scripts and data used to generate the diffusion MRI simulations in this paper are available at https://github.com/SpinDoctorMRI/SpinDoctor/tree/Paper_NeuronMeshing.

# Author Contributions

Alex McSweeney-Davis: Methodology, Software, Formal analysis, Investigation, Writing – original draft, Visualization.

Chengran Fang: Software, Visualization, Investigation.

Emmanual Caruyer: Conceptualization, Investigation, Writing – review & editing, Visualization, Funding acquisition.

Anne Kerbrat: Conceptualization, Funding Acquisition.

Jing-Rebecca Li: Conceptualization, Methodology, Investigation, Formal analysis, Writing – review & editing, Funding acquisition.

# Funding

This work was produced within the project "Investigation of potential biomarkers to detect chronic inflammation in Multiple Sclerosis through diffusion MRI", funded by the Engineering for Health (E4H) interdisciplinary center of Institut Polytechnique de Paris, in the "Biomedical Engineering Seed Grant Program" by the Fondation Bettencourt Schueller.
**Declaration of Competing Interests**

The authors declare they have no competing interests.

**References**

Abdellah, M., Cantero, J. J. G., Guerrero, N. R., Foni, A., Coggan, J. S., Calì, C., Agus, M., Zisis, E., Keller, D., Hadwiger, M., et al. (2023). Ultraliser: A framework for creating multiscale, high-fidelity and geometrically realistic 3d models for in silico neuroscience. *Briefings in bioinformatics*, 24(1), bbac491.

Abdellah, M., Hernando, J., Antille, N., Eilemann, S., Markram, H., & Schürmann, F. (2017). Reconstruction and visualization of large-scale volumetric models of neocortical circuits for physically-plausible in silico optical studies. *BMC bioinformatics*, 18, 39–50.

Abdellah, M., Hernando, J., Eilemann, S., Lapere, S., Antille, N., Markram, H., & Schürmann, F. (2018). Neuromorphovis: A collaborative framework for analysis and visualization of neuronal morphology skeletons reconstructed from microscopy stacks. *Bioinformatics*, 34(13), i574–i582.

Ascoli, G. A., Donohue, D. E., & Halavi, M. (2007). Neuromorpho. org: A central resource for neuronal morphologies. *Journal of Neuroscience*, 27(35), 9247–9251.

Blender [Accessed: 2024-10-25]. (n.d.).

Blender swc mesh [Accessed: 2024-07-29]. (n.d.).

Botsch, M. (2010). Polygon mesh processing. *AK Peters*.

Brito, J. P., Mata, S., Bayona, S., Pastor, L., DeFelipe, J., & Benavides-Piccione, R. (2013). Neuronize: A tool for building realistic neuronal cell morphologies. *Frontiers in neuroanatomy*, 7, 15.

Cannon, R. C., Turner, D., Pyapali, G., & Wheal, H. (1998). An on-line archive of reconstructed hippocampal neurons. *Journal of neuroscience methods*, 84(1-2), 49–54.

Colombo, G., Cubero, R. J. A., Kanari, L., Venturino, A., Schulz, R., Scolamiero, M., Agerberg, J., Mathys, H., Tsai, L.-H., Chachólski, W., et al. (2022). A tool for mapping microglial morphology, morphomics, reveals brain-region and sex-dependent phenotypes. *Nature neuroscience*, 25(10), 1379–1393.

Cuntz, H., Forstner, F., Borst, A., & Häusser, M. (2010). One rule to grow them all: A general theory of neuronal branching and its practical application. *PLoS computational biology*, 6(8), e1000877.

Dawson-Haggerty et al. (n.d.). *Trimesh* (Version 3.2.0). https://trimesh.org/

Fang, C., Nguyen, V.-D., Wassermann, D., & Li, J.-R. (2020). Diffusion mri simulation of realistic neurons with spinductor and the neuron module. *NeuroImage*, 222, 117198.
Fang, C., Yang, Z., Wassermann, D., & Li, J.-R. (2023). A simulation-driven supervised learning framework to estimate brain microstructure using diffusion mri. *Medical Image Analysis, 90*, 102979.

Franco-Bocanegra, D. K., Gourari, Y., McAuley, C., Chatelet, D. S., Johnston, D. A., Nicoll, J. A., & Boche, D. (2021). Microglial morphology in alzheimer's disease and after aβ immunotherapy. *Scientific Reports, 11*(1), 15955.

Garcia-Cantero, J. J., Brito, J. P., Mata, S., Bayona, S., & Pastor, L. (2017). Neurotessmesh: A tool for the generation and visualization of neuron meshes and adaptive on-the-fly refinement. *Frontiers in neuroinformatics, 11*, 38.

Garland, M., & Heckbert, P. S. (1997). Surface simplification using quadric error metrics. *Proceedings of the 24th annual conference on Computer graphics and interactive techniques*, 209–216.

Geuzaine, C., & Remacle, J.-F. (2009). Gmsh: A 3-d finite element mesh generator with built-in pre- and post-processing facilities. *International journal for numerical methods in engineering, 79*(11), 1309–1331.

Ginsburger, K., Matuschke, F., Poupon, F., Mangin, J.-F., Axer, M., & Poupon, C. (2019). Medusa: A gpu-based tool to create realistic phantoms of the brain microstructure using tiny spheres. *Neuroimage, 193*, 10–24.

Girard, G., Rafael-Patiño, J., Truffet, R., Aydogan, D. B., Adluru, N., Nair, V. A., Prabhakaran, V., Bendlin, B. B., Alexander, A. L., Bosticardo, S., et al. (2023). Tractography passes the test: Results from the diffusion-simulated connectivity (disco) challenge. *NeuroImage, 277*, 120231.

Glaser, J. R., & Glaser, E. M. (1990). Neuron imaging with neurolucida—a pc-based system for image combining microscopy. *Computerized Medical Imaging and Graphics, 14*(5), 307–317.

González, Á. (2010). Measurement of areas on a sphere using fibonacci and latitude-longitude lattices. *Mathematical Geosciences, 42*, 49–64.

Hall, M. G., & Alexander, D. C. (2009). Convergence and parameter choice for monte-carlo simulations of diffusion mri. *IEEE transactions on medical imaging, 28*(9), 1354–1364.

Hang, S. (2015). Tetgen, a delaunay-based quality tetrahedral mesh generator. *ACM Trans. Math. Softw*, 41(2), 11.

Hoppe, H., DeRose, T., Duchamp, T., McDonald, J., & Stuetzle, W. (1993). Mesh optimization. *Proceedings of the 20th annual conference on Computer graphics and interactive techniques*, 19–26.

Jespersen, S. N., Olesen, J. L., Ianuş, A., & Shemesh, N. (2019). Effects of nongaussian diffusion on “isotropic diffusion” measurements: An ex-vivo microimaging and simulation study. *Journal of Magnetic Resonance, 300*, 84–94.
Knupp, P. (1999). *Matrix norms and the condition number: A general framework to improve mesh quality via node-movement* (tech. rep.). Sandia National Lab.(SNL-NM), Albuquerque, NM (United States); Sandia ...

Li, J.-R., Nguyen, V.-D., Tran, T. N., Valdman, J., Trang, C.-B., Van Nguyen, K., Vu, D. T. S., Tran, H. A., Tran, H. T. A., & Nguyen, T. M. P. (2019). Spindoctor: A matlab toolbox for diffusion mri simulation. *NeuroImage*, *202*, 116120.

Li, J.-R., Tran, T. N., & Nguyen, V.-D. (2020). Practical computation of the diffusion mri signal of realistic neurons based on laplace eigenfunctions. *NMR in Biomedicine*, *33*(10), e4353.

McDougal, R. A., Conte, C., Eggleston, L., Newton, A. J., & Galijasevic, H. (2022). Efficient simulation of 3d reaction-diffusion in models of neurons and networks. *Frontiers in Neuroinformatics*, *16*, 847108.

McDougal, R. A., Hines, M. L., & Lytton, W. W. (2013). Water-tight membranes from neuronal morphology files. *Journal of neuroscience methods*, *220*(2), 167-178.

Mercredi, M., & Martin, M. (2018). Toward faster inference of micron-scale axon diameters using monte carlo simulations. *Magnetic Resonance Materials in Physics, Biology and Medicine*, *31*, 511-530.

Mörschel, K., Breit, M., & Queisser, G. (2017). Generating neuron geometries for detailed three-dimensional simulations using anamorph. *Neuroinformatics*, *15*, 247-269.

Muntoni, A., & Cignoni, P. (2021, January). *PyMeshLab*. Zenodo. https://doi.org/10.5281/zenodo.4438750

Nedjati-Gilani, G. L., Schneider, T., Hall, M. G., Cawley, N., Hill, I., Ciccarelli, O., Drobnjak, I., Wheeler-Kingshott, C. A. G., & Alexander, D. C. (2017). Machine learning based compartment models with permeability for white matter microstructure imaging. *NeuroImage*, *150*, 119-135.

Novikov, D. S., Fieremans, E., Jespersen, S. N., & Kiselev, V. G. (2019). Quantifying brain microstructure with diffusion mri: Theory and parameter estimation. *NMR in Biomedicine*, *32*(4), e3998.

Olesen, J. L., Østergaard, L., Shemesh, N., & Jespersen, S. N. (2022). Diffusion time dependence, power-law scaling, and exchange in gray matter. *NeuroImage*, *251*, 118976.

Palombo, M., Alexander, D. C., & Zhang, H. (2019). A generative model of realistic brain cells with application to numerical simulation of the diffusion-weighted mr signal. *NeuroImage*, *188*, 391-402. https://doi.org/https://doi.org/10.1016/j.neuroimage.2018.12.025

Palombo, M., Ianus, A., Guerreri, M., Nunes, D., Alexander, D. C., Shemesh, N., & Zhang, H. (2020). Sandi: A compartment-based model for non-invasive apparent soma and neurite imaging by diffusion mri. *Neuroimage*, *215*, 116835.

Peng, H., Roysam, B., & Ascoli, G. A. (2013). Automated image computing reshapes computational neuroscience. *BMC bioinformatics*, *14*, 1-5.
Portaneri, C., Rouxel-Labbé, M., Hemmer, M., Cohen-Steiner, D., & Alliez, P. (2022). Alpha wrapping with an offset. *ACM Transactions on Graphics* (TOG), 41(4), 1–22.

Rensonnet, G., Scherrer, B., Warfield, S. K., Macq, B., & Taquet, M. (2018). Assessing the validity of the approximation of diffusion-weighted-mri signals from crossing fascicles by sums of signals from single fascicles. *Magnetic resonance in medicine*, 79(4), 2332–2345.

Stejskal, E. O., & Tanner, J. E. (1965). Spin diffusion measurements: Spin echoes in the presence of a time-dependent field gradient. *The journal of chemical physics*, 42(1), 288–292.

Stockley, E., Cole, H., Brown, A., & Wheal, H. (1993). A system for quantitative morphological measurement and electrotonic modelling of neurons: Three-dimensional reconstruction. *Journal of neuroscience methods*, 47(1-2), 39–51.

The CGAL Project. (2024). CGAL user and reference manual (5.6.1). CGAL Editorial Board. https://doc.cgal.org/5.6.1/Manual/packages.html

Torres-Platas, S. G., Comeau, S., Rachalski, A., Bo, G. D., Cruceanu, C., Turecki, G., Giros, B., & Mechawar, N. (2014). Morphometric characterization of microglial phenotypes in human cerebral cortex. *Journal of neuroinflammation*, 11, 1–14.

Van Rossum, G., Drake, F. L., et al. (1995). *Python reference manual* (Vol. 111). Centrum voor Wiskunde en Informatica Amsterdam.

Velasco, I., Garcia-Cantero, J. J., Brito, J. P., Bayona, S., Pastor, L., & Mata, S. (2024). Neuroeditor: A tool to edit and visualize neuronal morphologies. *Frontiers in Neuroanatomy*, 18, 1342762.

Veraart, J., Fieremans, E., & Novikov, D. S. (2019). On the scaling behavior of water diffusion in human brain white matter. *NeuroImage*, 185, 379–387.

Villarreal-Haro, J. L., Gardier, R., Canales-Rodríguez, E. J., Fischi-Gomez, E., Girard, G., Thiran, J.-P., & Rafael-Patiño, J. (2023). Cactus: A computational framework for generating realistic white matter microstructure substrates. *Frontiers in Neuroinformatics*, 17, 1208073.

Wang, Y., Li, Y., Tao, Y., Lin, H., & Wang, J. (2024). Fast reconstruction of water-tight surface mesh of neurons. *Journal of Visualization*, 27(3), 437–450.

Zhu, X., Liu, X., Liu, S., Shen, Y., You, L., & Wang, Y. (2022). Robust quasi-uniform surface meshing of neuronal morphology using line skeleton-based progressive convolution approximation. *Frontiers in Neuroinformatics*, 16, 953930.