-
Notifications
You must be signed in to change notification settings - Fork 5
Mesh Optimization
After the polygonization from the volume grid, a smooth mesh is created by applying the Laplacian operator and then optimized to create high fidelity topology and less tessellation. Mesh optimization includes homogeneous optimization and adaptive optimization.
Due to the finite resolution of volumes, and their discretized nature, polygonal meshes reconstructed from those volumes exhibit zigzagged or `staircase' artifacts on their surfaces (\textbf{Supplementary Fig.~S1a}). Such artifacts distort the organic appearance of the resulting meshes, unless surface smoothing is applied. We therefore use the Laplacian operator to remedy those staircase artifacts in an iterative scheme. % The Laplacian operator is an iterative algorithm which further smooths the mesh surface after each iteration. Initially, we build a list of neighbor vertices and faces for each vertex. In each iteration, it uses the aforementioned lists to compute a smoothing kernel for each vertex, applies it and then updates the mesh surface to prepare it for the next iteration. To compute the kernel, we identify the difference between the vertex and the arithmetic sum of the neighbour vertices, each weighted by their average cotangent. To compute the average cotangent, we use the two cotangents calculated from the two neighboring vertices of the edge formed by the vertex to the neighbour. To obtain the smoothed vertex, we linearly interpolate between the original vertex, and the original vertex weighted by the kernel. The interpolating parameter, also called the smoothing value, is an input to the algorithm chosen by the user, which must be greater than zero to have an effect. Additionally, an inflate parameter --also provided by the user-- can be specified to dampen the shrinking effect on thin parts of the mesh. This parameter is used in the same form as the smoothing value, but with the opposite effect, and its value must be less than zero to have an effect.
Default values for the laplcaitn iterations Default values for the laplacian parameters.
Irrespective to the applied surface extraction algorithm, the tessellation of the reconstructed surface depends primarily on the resolution of the volume grid that is used to sample and voxelize the input mesh. For convenience, the resolution is set in terms of number of voxels per microns. The resolution is a free parameter that is either controlled by the user or automatically set based on the axis-aligned bounding box (AABB) of the input mesh, the size of the finest detail in the mesh and the scale or focus of the potential experiment in which the resulting mesh will be plugged in. \textsc{Ultraliser} takes advantage of binary volume grids, in which each voxel is represented in memory with a single bit; it is therefore capable of creating large scale volumes which can resolve the finest features of an object, for example: the ultrastructure of a dendritic spine in tall-tufted layer 5 pyramidal neurons~\autocite{ramaswamy2015anatomy}. With such resolutions, the reconstructed mesh is excessively tessellated, possibly with tens of millions of polygons, whose practicality is undoubtedly questionable. \textsc{Ultraliser} integrates a mesh optimization module that can adaptively refine highly tessellated meshes to create optimized counterparts with preserved features. The mesh optimization module extends an existing implementation~\autocite{yu2008feature} that uses an angle-based approach for adaptive tessellation and normal-based smoothing to guarantee the quality of the resulting surface. The optimization process includes: surface smoothing, normal smoothing, flat coarsening, dense coarsening and also adaptive optimization.