Export Voxel Data
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.
Cita come
Cyprian Lewandowski (2024). Export Voxel Data (https://www.mathworks.com/matlabcentral/fileexchange/43640-export-voxel-data), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- Sciences > Biological and Health Sciences > Biomedical Imaging >
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > STL (STereoLithography) >
- MATLAB > Graphics > 2-D and 3-D Plots > Surfaces, Volumes, and Polygons > Volume Visualization > Scalar Volume Data >
- MATLAB > Graphics > Formatting and Annotation > 3-D Scene Control > Lighting, Transparency, and Shading >
Tag
Riconoscimenti
Ispirato da: stlwrite - write ASCII or Binary STL files, Smooth Triangulated Mesh, Converting a 3D logical array into an STL surface mesh
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.