This post was created to summarize current status of possibilities to convert/export VTK 3D image data into OpenVDB volumetric voxel data / grid format (.vdb). This is getting to be a frequently asked question, so I hope to redirect people to this thread in future.
Please feel free to post with updates and corrections, I hope somebody will work to improve the situation at some point.
No native VTK exporter for OpenVDB exists AFAIK.
C++ solution: Install OpenVDB and VTK libraries, then create a customized C++ program yourself to export your data to OpenVDB.
Python solution: Use VTK via Python and pyopenvdb. This requires that you can both
import pyopenvdbin your Python environment.
pyopenvdbis not universally accessible via pip. Please reply below if you got it working, on which platform, how, etc. However, VTK is available via
pip install vtk.
pyopenvdbis available at least in Ubuntu Linux by package
- Currently no code examples (please post below if you can share some!).