[vtkusers] Probing a vtkUnstructuredGrid with a vtkDelaunay2D surface
j.robinson at kepler-systems.com
Sat Dec 8 11:43:48 EST 2018
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.
And we see the vtkDelaunay2D surface shows good results (displaying the
correct altitudes) when that surface is entirely inside the
However, when the surface protrudes from the top of the vtkUnstructuredGrid
volume, is where we get the incorrect interpolation:
What I need is the vtkDelaunay2D to be clipped when it protrudes from the
Any thoughts on how this might be achieved would be much appreciated.
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers