[vtkusers] get value at x y z (interpolate)

l.vanmiegroet at ulg.ac.be l.vanmiegroet at ulg.ac.be
Mon Dec 27 04:21:30 EST 2010


Hi David, 

I do not want the closest point, i really need an interpolated values at given coordinates. Not the closest point.
VTK uses some interpolation between points when displaying scalar values, so how can i obtain a scalar values at any x-y-z. 

I have a polydata, but what are the steps from this polydata to be able to query a value at any x-y-z. 
The vtkcountourfilter is interoplating values to create the iso surface, so it is possible.
Laurent


----- Mail original -----
De: "David Doria" <daviddoria at gmail.com>
À: "l vanmiegroet" <l.vanmiegroet at ulg.ac.be>
Cc: "vtkusers" <vtkusers at vtk.org>
Envoyé: Lundi 27 Décembre 2010 00:59:53
Objet: Re: [vtkusers] get value at x y z (interpolate)

On Sun, Dec 26, 2010 at 10:16 AM, <l.vanmiegroet at ulg.ac.be> wrote:
> Hi all,
>
>
> I searched for two hours how to simply obtain the value at a point
> coordinates x,y,z from a polydata ?
>
> I found the evaluation for implicit function but how to do the same
> from a polydata ?
>
> Cheers
> Laurent.

Since a polydata explicitly defines points, it only makes sense to
query the data associated with them by index. If you want to find a
point in your polydata that is closest to a particular (x,y,z), check
out vtkPointLocator. There are some examples here:
http://www.vtk.org/Wiki/VTK/Examples/Cxx#Data_Structures

David



More information about the vtkusers mailing list