Skip to content

neurolabusc/niivue-simplify

Repository files navigation

NiiVue voxels to mesh

A basic example of simplifying meshes. Open the live demo.

Comparisons

This repository includes different ports of Sven Forstmann's C++ Fast Quadric Mesh Simplification. The table below shows the time to simplify the mni152_2009.mz3 mesh to 10% of its input size.

Method Files Size (kb) Speed (ms)
nii2mesh nii2mesh.js 213 650
WASM C++ a.js 200 800
mXrap mesh-ta, quadric-mesh-simplification, wrapped_typed_array 65 2100
NiiVue simplify 15 2150

Neuroimaging meshes do not use UV mapping. For simplification of meshes with UV mapping, see this live demo.

For Developers

You can serve a hot-reloadable web page that allows you to interactively modify the source code.

git clone https://github.com/niivue/niivue-simplify
cd niivue-simplify
npm install
npm run dev

Links

  • This project includes four ports of Sven Forstmann's C++ Fast Quadric Mesh Simplification: a direct web assembly compilation, the mXrap pure JavaScript, the NiiVue team pure JavaScript and the nii2mesh C code compiled as web assembly.
  • This repository assumes mesh-based inputs. To convert voxels to meshes and simplify them, see this companion project.

About

Comparison of mesh simplification methods.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published