Access coordinates of RectilinearGrid data (Programmable Filter)

Does anyone happen to know how to access the coordinates of grid points for a RectilinearGrid from within a programmable filter?

I have given up searching the internet for a solution.

This works, but it’s so slow, it’s unusable:
https://cvw.cac.cornell.edu/ParaViewAdv/progfilter

The grid coordinates have to be stored as three 1D vectors somewhere, but how can I access them?

Unfortunately, I don’t have a MWE. If just Paraview had a rectilinear grid source in the Sources menu …

You can get the X coordinates array with vtkRectilinearGrid::GetXCoordinates()

Ah thanks @cory.quammen, I should pay more attention to the vtk class documentation.

I had checked the python help, but that doesn’t list GetXCoordinates.
(My input is actually a vtkMultiBlockDataSet containing vtkRectilinearGrids.)

for ind, (block_in, block_out) in enumerate(zip(inputs[0], output)):
    print(help(block_in))

shows


where GetXCoordinates() is not listed.

However,

for ind, (block_in, block_out) in enumerate(zip(inputs[0], output)):
    print(help(block_in.GetXCoordinates))

does indeed show