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