I wrote a python script to interpolate data using the ResampleWithDataset filter. I also want to output the result of the filter in a csv file. Here is what I tried:
This works, but prints all columns, which are
“u”, “Points:0”, “Points:1”, “Points:2”, and “vtkValidPointMask”.
What I want is to output only the “u” column.
But this outputs only “Points:0”, “Points:1”, “Points:2”. Regardless of what I write in
passArrays.RowDataArray = [‘u’], always the three columns are printed.
So is the PassArrays filer the right filter for outputting only some columns obtained from ResampleWithDataset ?
As you can see, I can only uncheck the columns u and vtkValidPointMask within the Pass Arrays filter. Unchecking the Points column is not possible.
However, what I want is to output only the u column.
I’m afraid this is not possible in pvpython sadly. You would need to convert your dataset to a vtkTable but there is no such filter. It would be trivial to add though.
Because points are not an array in a dataset, they are points. You cant have a dataset without points. You need to convert to a table first, which contain only arrays and no geometry/topology.