bastian
(Bastian)
1
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 …
cory.quammen
(Cory Quammen (Kitware))
2
You can get the X coordinates array with vtkRectilinearGrid::GetXCoordinates()
bastian
(Bastian)
3
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 vtkRectilinearGrid
s.)
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