Hi,
I am an intermediate Paraview user and I am trying to learn how to use the Programmable Filter. I have read Chapter 6 in the Reference manual 6. Programmable Filter — ParaView Documentation 6.0.0 documentation . I have my own little CSV file with 20 points and tried using some example code, specifically the first example in section 6.3.1, which simply adds midpoints between all the existing points.
I import the CSV and apply a TableToPoints filter. I can see the points rendered as spheres from this filter in the viewer so I know the data has been loaded in properly. Then, I add a Programmable Filter and I copy and paste the few lines of code into the Script section. Nothing happens. I don’t get any errors or any new output of any kind.
Code from Section 6.3.1:
# 'inputs' is set to an array with data objects produced by inputs to
# this filter.
# Get the first input.
input0 = inputs[0]
# compute a value.
dataArray = input0.PointData["V"] / 2.0
# To access cell data, you can use input0.CellData.
# 'output' is a variable set to the output dataset.
output.PointData.append(dataArray, "V_half")
I have a hunch that I am missing something bigger like Paraview is missing a package or something. I even tried uninstalling and reinstalling Paraview on my system but it didn’t fix the problem.
Ultimately, I want to connect the points in my CSV into a line which is why I started down the path of Programmable filters in the first place. Based on other information I have read the only reasonable way to connect multiple points with lines is programmatically.
Looking forward to any help anyone has to offer. Thanks!