Export Voxel Data

Export objects described in a logical matrix, label matrix or voxel list to STL and PovRay mesh2.
2.1K Downloads
Updated 27 Oct 2017

View License

Export Voxel Data
===================
This submission allows to export multiple objects described in logical matrix, label matrix or voxel list data to STL and PovRay mesh2 format.
Mesh can be determined from the data using convhull, isosurface or geometric method.
Extracted mesh can be smoothed, resampled and translated as required.
Package provides a script, which allows to generate a simple PovRay scene, where exported objects are included with a given colour, transparency and texture. Objects can be coloured using some array of scalars as a key.
Similar script is written to export a Blender "configuration" file, which can be opened with a Blender add-on (also attached) that imports STL files and assigns each object a colour specified in the "configuration" file.
A manual describing every option is provided. Further examples that use real data are available to download (links are included in the manual).
External scripts used/included within the upload (that are not present on MathWorks):
- resampling script from "iso2mesh" package by Qianqian Fang (Available at: iso2mesh.sourceforge.net)
- a stereoscopic camera add-on to Blender by Sebastian Schneider (Available at: noeol.de/s3d/)
License crash difficulties
===================
The resampling part of the package could not be included in the submission itself, but on first required use of the resampling part it will be downloaded from my Google Drive and added to the package. This is because it uses some functions from iso2mesh package, which is distributed under GNU license and MathWorks.com does not support it.
Similar situation applies to Blender Addons. Both are distributed under GPL license, hence are not included in the package, but there is a hotlink present in the package to download them.
I am sorry for additional problems, but this was the easiest way I could think of to overcome the problem of licensing.
Notes
===================
This package is a by-product of my main internship project, which was analysis of random rod packing. Further examples mentioned above use some of the data collected.
I did my best to make the package up to MathWorks standard, but it is my first submission, so I would appreciate all comments and suggestions on what to change.

Cite As

Cyprian Lewandowski (2024). Export Voxel Data (https://www.mathworks.com/matlabcentral/fileexchange/43640-export-voxel-data), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

Updated download path for the Mesh Resampling code. (Thanks Chacoon)
Removed the License Files folder.

1.0.0.0