简体   繁体   English

在Paraview中使用大型csv文件中的数据

[英]Using data from large csv file in Paraview

The closest question I could find to this issue is How to store a vector field with VTK? 我可以找到的最接近的问题是如何使用VTK存储向量字段? C++, VTKWriter C ++,VTKWriter

Basically I have a large csv file which is comprised of rows representing each timestep and columns representing the properties of a large number of particles (without headers). 基本上,我有一个很大的csv文件,该文件由代表每个时间步长的行和代表大量粒子(无标题)的属性的列组成。 Essentially the columns go as t, x1, x2, ..., y1, y2, ..., z1, z2, ... and I am trying to use paraview to make sense of this. 从本质上讲,这些列分别为t,x1,x2,...,y1,y2,...,z1,z2,...,而我正尝试使用paraview来说明这一点。 It is impractical to do this via the table to points filter in the GUI and was wondering if there was another way to do it? 通过表格在GUI中的点过滤器进行此操作是不切实际的,并且想知道是否还有另一种方法?

The only solution I can think of is to slice the dataframe and use the python interface with a loop. 我能想到的唯一解决方案是对数据帧进行切片,并在循环中使用python接口。 I was wondering if there was a way through the GUI or if it makes more sense to convert to a vtk file? 我想知道是否有一种通过GUI的方法,或者转换为vtk文件是否更有意义? I am new to paraview and wish to know the best way to do this. 我是Paraview的新手,并希望了解执行此操作的最佳方法。

The best way to achieve that is by using a Python Programmable Source. 最好的方法是使用Python可编程源。

Using Python (eg. with numpy) it would be quite easy to reader the data and provide it to paraview timestep by timestep. 使用Python(例如,使用numpy),将很容易读取数据并将其逐时提供给paraview。

See some Programmable Source examples here : https://www.paraview.org/Wiki/Python_Programmable_Filter 在此处查看一些Programmable Source示例: https : //www.paraview.org/Wiki/Python_Programmable_Filter

If you have no experience with the VTK pipeline, this will not be a trivial task. 如果您没有使用VTK管道的经验,这将不是一件容易的事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM