Kitware / vtk-js

Visualization Toolkit for the Web
https://kitware.github.io/vtk-js/
BSD 3-Clause "New" or "Revised" License
1.23k stars 371 forks source link

How to transfer a .vtk into vtp file #1312

Closed buptwny closed 4 years ago

buptwny commented 4 years ago

In the cow example, I found the cow.vtp file and I want to transfer my vtk file to vtp. when I tried to do this, I found that I can use vtkDataConverter to figure out this problom, but I don't know how to use the vtkDataConverter correctly, and I found that answer was given in 2016, is there any way new to do this now or where can I find a little detail explain about the vtkDataConverter? Thanks a lot!

buptwny commented 4 years ago

and I found that vtkDataConverter runs in MacOs, so If I work in winOs i can't use this tool?

jourdain commented 4 years ago

The vtkDataConverter is not required as vtk.js support (now) natively .vtp and .vti format rather than the format the script generate. The vtkDataConverter script is based on ParaView which runs on all the platform (windows, linux, mac). You can use ParaView to load your file and save it into another format. For vtp/vti you should use the appended format with the zlib compression.

buptwny commented 4 years ago

Thank you very much! I just started using vtkjs, I will try to solve that with your answer!