from paraview.simple import *
import numpy as np
from vtkmodules.vtkCommonDataModel import vtkTable
from vtkmodules.vtkCommonCore import vtkDoubleArray
num_points = 100
# Calculate points
angles = np.linspace(np.radians(0), np.radians(90), num_points)
x_points = 2.5 * np.cos(angles)
# Initialize the table
table = vtkTable()
# Add X,... columns
x_array = vtkDoubleArray()
x_array.SetName("X")
x_array.SetNumberOfValues(num_points)
for i, val in enumerate(x_points):
x_array.SetValue(i, val)
table.AddColumn(x_array)
# Step 3: Convert Table to Points
table_to_points = TableToPoints(table) # <-- Error: Expecting proxy as input
I want to create a set of points and use those points as destination for Resample With Dataset filter. To do this, I create a TableToPoints instance using the points as input, which causes the error
table_to_points = TableToPoints(table) # <-- Error: Expecting proxy as input
File "/opt/ParaView-5.11.2-MPI-Linux-Python3.9-x86_64/lib/python3.9/site-packages/paraview/simple.py", line 2725, in CreateObject
raise RuntimeError ("Expecting a proxy as input.")
RuntimeError: Expecting a proxy as input.
How can I make that running?