seung-lab / zmesh

Marching Cubes & Mesh Simplification on multi-label 3D images.
GNU General Public License v3.0
58 stars 8 forks source link

fix: simplification works on larger meshes #31

Closed william-silversmith closed 2 years ago

william-silversmith commented 2 years ago

Previously, when pre-existing meshes were provided to the simplifier, they were in physical coordinates and therefore often 30-40x more spaced out than the voxel versions. For very large meshes, this can push them past the limits the packed coordinate representation can tolerate (2^20 for uint64_t). This caused gross corruption in large simplified meshes, the obvious use case.

Now we divide by the voxel resolution before simplifying, which increases the range considerably

image (7)

.