BINVOX
Parser and builder for BINVOX voxel file format.
Specification of vox file format can be found here.
Table of Contents
Install
$ npm install --save binvox
Usage
Syntax
// Import via ES6 modules;// or UMDconst BINVOX = ;
Example
This Node.js example reads a BONVOX file and parses it:
const fs = ;const BINVOX = ; fs
where data.buffer
is an instance of ArrayBuffer.
It is recommended to read the official BINVOX specification, in order to understand the structure of the data.
The output consists of various file information, in addition to the actual voxel data:
dimension: depth: 32 width: 32 height: 32 translate: depth: 1181 width: 2139 height: -169 scale: 30206 voxels: ...
voxels
contain the actual voxel data (points), and looks like this:
x: 0 y: 2 z: 3 x: 0 y: 3 z: 3 x: 0 y: 4 z: 3 ...
where the index of each voxel is ordered by the voxel's "location in space".
API
BINVOX.Parser
BINVOX.Builder
License
Copyright © 2020 André Storhaug
BINVOX is licensed under the MIT License.