How to connect points in paraview?

二次信任 提交于 2019-12-02 07:11:52

问题


I have a question. I'm new to paraview and I'm learning how to use it. I need to make a graph from data that are stored in .csv file (2 columns). I have them loaded and converted using TabletToPoints filter. I want ask if it's possible to connect these points by point ID so they will create a line (previous point with next point and so on)

I found a solution:

pdi = self.GetPolyDataInput()
pdo =  self.GetPolyDataOutput()
numPoints = pdi.GetNumberOfPoints()
pdo.Allocate()
 for i in range(0, numPoints-1):
 points = [i, i+1]
 # VTK_LINE is 3
 pdo.InsertNextCell(3, 2, points)

回答1:


Not directly. You can write a Programmable Filter that uses a Python script to create the vtkPolyData dataset with the appropriate.

Refer to some of the examples on the ParaView Wiki (http://www.paraview.org/Wiki/Python_Programmable_Filter) to get started.



来源:https://stackoverflow.com/questions/22438140/how-to-connect-points-in-paraview

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