The vox-loader is a NiiVue plugin that converts MagicaVoxel .vox volumes into NIfTI volumes. It uses the vox-reader library to parse vox files. This is designed to be a minimal loader to illustrate NiiVue plugin loader design. Note that for more complex formats you would want to set the spatial properties of the NIfTI header (pixdim, sform).
To illustrate this library, vox2nii
is a node.js converter that can be run from the command line:
git clone [email protected]:rordenlab/vox-loader.git
cd vox-loader
npm install
node ./src/vox2nii.js ./tests/testData/monu1.vox
You can also embed this loader into a hot-reloadable NiiVue web page to evaluate integration:
git clone [email protected]:rordenlab/vox-loader.git
cd vox-loader
npm install
npm run dev
- ephtracy provides sample models and the specification. Note the sample model included in this repository is one of these models.
Two similar libraries are provided. Both are equally simple for node usage, but the vox-reader is a bit simpler for web usage.