This web page uses web assembly to convert a voxel-based NIfTI image (.nii; .nii.gz) to a triangle-based mesh format (.gii, .mz3, .obj, .ply, .stl, .vtk). For more details, see nii2mesh.
You can clone the project and test it locally using http-server. The repository comes with pre-compiled WebAssembly, but you can recompile the WASM code with the command make wasm. Note that Github allows you to publish your repositories as web pages, allowing you to publicly share your modifications. Commands for local testing include:
git clone https://github.com/rordenlab/nii2meshWeb
cd nii2meshWeb
make wasm
http-server
- nii2mesh provides details on the core code.
- vtk.js provides an alternate method for marching cubes.
- Will Usher has created a rust-based WASM Marching Cubes with a nice live demo.
- Web page and javascript wrapper based on work by MyMiniFactory.