-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to import various VTK and VTU file types #21
Comments
Thank you for the issue! It is definitely a goal to support files accepted by VTK or ParaView as much as possible. |
Thanks for the library! Is there a path forward to fix this or any obvious reasons why the parsing is failing? |
I took a quick look at the I haven't yet looked at the other files. It's possible they are failing for different reasons. I have been adding these undocumented fields/extensions to the vtk formats previously. I think these are inevitable, but I simply don't know what they are until someone finds files which don't work with It might be a while until I have time to dig into these myself, but I'm willing to help out if you have time trying to fix some of these failures :) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Added a parser for OFFSETS and CONNECTIVITY tags within legacy vtk files that mimic the way the xml file work. There is a new version of legacy vtk files (seemingly v5 and up) that specify cells via OFFSETS and CONNECTIVITY tags. This parser adds support for that. See issue #21 for exmaples. This commit addresses the parsing of the legacy files in that issue.
Added the ability to write cells in new offsets + connectivity format for vtk versions 5+. See issue #21 for details.
Since some files can give non uint8 type cell types, we explicitly cast everything to the right type instead of expecting it to be given correctly. This helps parse files generated by meshio (See issue #21)
Each inline (non-appended) binary DataArray now supports compression in the same way appended data did before. This commit concludes fixes for all failing meshes from issue #21. The remaining pygmsh tests are now enabled.
Each inline (non-appended) binary DataArray now supports compression in the same way appended data did before. This commit concludes fixes for all failing meshes from issue #21. The remaining pygmsh tests are now enabled.
Each inline (non-appended) binary DataArray now supports compression in the same way appended data did before. This commit concludes fixes for all failing meshes from issue #21. The remaining pygmsh tests are now enabled.
@elrnv I'm not sure if I should open a new issue for this but it seems to be related. A user of my surface reconstruction tool had problems loading a file that they converted from VTU to VTK using Paraview. Here is the content of the simpler file that causes the error:
Files to reproduce: legacy.zip |
Thank you @w1th0utnam3 for the flagging this! As far as I can tell the issue is the with DOS line endings. In the short term, feel free to swap to using Unix line endings, but please feel free to open another issue requesting support for dos line endings. It should be a simple fix in the parser. |
Thanks for looking into this. I formatted the files to use LF instead of CRLF for the line endings, but for me it did not seem to fix the issue, I still get |
I only tested the simplified vtk file in the zip. Now looking at legacy_full.vtk, it makes sense that it doesn't work, there are whole bunch of new fields like INFORMATION, METADATA, NAME, and DATA. This is a different issue than supporting CRLF line endings. To unblock you, you should be able to just remove those fields, but it would be good to add automatic support for them in the parser. |
Ah, sorry, I think when I tried to load the file with LF line endings I forgot to use the version 0.7 branch. In this branch changing from CRLF to LF actually works as you said. I'll open a separate issue regarding the line endings. However it also doesn't load the attributes in the file. I played a bit around and it seems like the usage of the datatype |
Yes absolutely I agree we should add support for |
Each inline (non-appended) binary DataArray now supports compression in the same way appended data did before. This commit concludes fixes for all failing meshes from issue #21. The remaining pygmsh tests are now enabled.
vtkio
is unable to parse VTK and VTU files generated bypygmsh
which internally usesmeshio
for generation of VTK and VTU files.I have tested the following file types:
Paraview is able to visualize each file without problem. The spreadsheet view for each file shows the appropriate data.
Here is the script used to generate the VTK and VTU files:
Here is the file I am using to test the import of these files:
And the output
I'm not sure if the problem is with
vtkio
ormehsio
. I have opened an issue here since Kitware's Paraview (which also develops VTK) reports no problems with these files.Thanks for your help!
The text was updated successfully, but these errors were encountered: