This code a script to convert stl data of closed surfaces into voxelized vtk files (ascii).
pip3 install vtk
pip3 install pyevtk
python3 stl_to_vtk_voxelization.py
The stl model was referred to here.
https://qiita.com/dwatanabee/items/b938b46ef911a43b92ba
stl file is "GNU Lesser General Public License v2.1", and the others are MIT.