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

John Fraser John.Fraser at icr.ac.uk
Mon Dec 27 09:29:01 EST 2010


Not sure if this helps or not, I use vtkTupleInterpolator for
interpolation of (x,y) and it works fine, e.g.
 
...
interpolator.AddTuple(cps, factor);
...
interpolator.InterpolateTuple(value, factor);


>>> <l.vanmiegroet at ulg.ac.be> 12/27/10 9:22 AM >>>
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
_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only.  If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network.



More information about the vtkusers mailing list