VTK:元素中的数据数组可能太短 [英] VTK: The data array in the element may be too short

查看:55
本文介绍了VTK:元素中的数据数组可能太短的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试以vtr格式可视化一些数据.为此,我通过此库创建了几个 npy 文件,然后我已经通过 PyEVTK 将该文件转换为vtr格式(如 lowlevel.py 示例).但是,当我尝试通过ParaView可视化此数据时,会出现错误:

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?

已解决:

我犯了一个愚蠢的错误-标头中的数据大小与实际数据大小不同,这是导致错误的原因.

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

推荐答案

此错误可能来自XML标头声明,该标头可能未包含所有需要的数据.您可能会错过 header_type ,其中包含每个数据集之间写入的每个信息的大小.

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">

这篇关于VTK:元素中的数据数组可能太短的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆