VTK: The data array in the element may be too short

谁说胖子不能爱 提交于 2021-01-27 18:41:01

问题


I'm trying to visualize some data in vtr format. For this purposes I've created a couple npy files by this library, then I've converted this files by PyEVTK into the vtr format (like in the lowlevel.py example). But when I'm trying to visualize this data by ParaView, an error appears:

ERROR: In /var/tmp/portage/sci-visualization/paraview-4.0.1-r1/work/ParaView-v4.0.1-source/VTK/IO/XML/vtkXMLDataReader.cxx, line 510
vtkXMLRectilinearGridReader (0x36bb080): Cannot read point data array "Pressure" from PointData in piece 0.  The data array in the element may be too short.

Can anybody explain, what exactly means this error message, and what's wrong with the my visualization data?

Solved:

I made a stupid mistake - data size in header was different from the actual data size, and this was the cause of error.


回答1:


This error may be coming from the XML header declaration, that may not contain all data needed. You may miss the header_type that contains the size of each info written between each set of data.

<VTKFile type="UnstructuredGrid" version="0.1" byte_order="BigEndian" header_type="UInt64">


来源:https://stackoverflow.com/questions/23293300/vtk-the-data-array-in-the-element-may-be-too-short

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!