Probing a vtkUnstructuredGrid with a vtkDelaunay2D surface

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Probing a vtkUnstructuredGrid with a vtkDelaunay2D surface

JimRobinson

Dear All,

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
function.

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();
            _BathymetryProbeFilter.SetInputData(_TIN.GetOutput());
            _BathymetryProbeFilter.SetSourceData(_USGrid);

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.


<http://vtk.1045678.n5.nabble.com/file/t342484/vtkIMage1.jpg>

And we see the vtkDelaunay2D surface shows good results (displaying the
correct altitudes) when that surface is entirely inside the
vtkUnstructuredGrid volume.

<http://vtk.1045678.n5.nabble.com/file/t342484/vtkIMage2.jpg>

However, when the surface protrudes from the top of the vtkUnstructuredGrid
volume, is where we get the incorrect interpolation:

<http://vtk.1045678.n5.nabble.com/file/t342484/vtkIMage3.jpg>

What I need is the vtkDelaunay2D to be clipped when it protrudes from the
vtkUnstructuredGrid.

Any thoughts on how this might be achieved would be much appreciated.

Regards,

Jim






--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers