Probing a vtkUnstructuredGrid with a vtkDelaunay2D surface
I am trying to develop a utility in my data visualization software whereby I
can take a vtkUnstructuredGrid with scalar and vector values at the points
and find the interpolated value of the scalar or vector field on the surface
(essentially at the points) defined by a vtkDelaunay2D object.
This is easy to do if the probing surface is a plane (so therefore defined
by a function) or, I imagine, if the probing surface is defined by any
I have managed to do it using a vtkProbeFilter, whereby I set the probing
surface to be the vtkDelaunay2D (below - _TIN) and the source data as the
vtkUnstructuredGrid (_USGrid). The following nearly gets there:
vtkProbeFilter _BathymetryProbeFilter = new vtkProbeFilter();
However, if the _TIN protrudes from the _USGrid, then the algorithms can't
interpolate a field value at the points of the _TIN that are outside of the
_USGrid, and so it sets them to zero. This means that the resulting colour
map is wrong.
Here is a randomly generated vtkUnstructuredGrid with the field values
simply being the altitude (z value) at each point.