[vtkusers] get value at x y z (interpolate)
l.vanmiegroet at ulg.ac.be
l.vanmiegroet at ulg.ac.be
Wed Dec 29 14:27:27 EST 2010
Hi, i made a mistake as i do not have any values in my polydata so the interpolateTuple does not work and shepardmethod too.
In fact, i want to reconstruct a surface by building it level set value.
I use this :
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filters/SurfaceFromUnorganizedPointsWithPostProc
or would also like to use this
http://www.insight-journal.org/browse/publication/718
>From SurfaceFromUnorganizedPointsWithPostProc a contouring is used and it seems that vtkSurfaceReconstructionFilter creates a grid and assign values.
How could i get the values from vtkSurfaceReconstructionFilter that are used by the vtkContourFilter?
I want to determine myself where is the zero level, not by using vtkContourFilter so i need all scalar values on a grid or for any x,y,z.
Any ideas ?
----- Mail original -----
De: "David Gobbi" <david.gobbi at gmail.com>
À: "vtkusers" <vtkusers at vtk.org>
Envoyé: Lundi 27 Décembre 2010 22:36:30
Objet: Re: [vtkusers] get value at x y z (interpolate)
On Mon, Dec 27, 2010 at 9:38 AM, David Doria <daviddoria at gmail.com>
wrote:
> On Mon, Dec 27, 2010 at 8:29 AM, John Fraser <John.Fraser at icr.ac.uk>
> wrote:
>> 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);
>
> Laurent,
>
> As far as I know in VTK you have to have "structured" data to do any
> interpolation (where polydata is "unstructured").
>
> Take a look at these:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ShepardMethod
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/CardinalSpline
>
> They should convert your polydata into a structured data set that you
> can then perform interpolation on.
VTK can interpolate any data that has cells, but interpolating data
from 2D cells (i.e. polygons, triangles) can be tricky. The
general-purpose filter for doing interpolation is vtkProbeFilter which
takes two inputs: one input for the data to be interpolated, and
another input that has the points at which you do the interpolation.
There is also a low-level method for doing interpolation: all
vtkDataSets have a FindCell(x,y,z,...) method that can return a cell
(i.e. polygon, FEM element, etc) and the interpolation weights to
apply to each point that makes up the cell.
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
More information about the vtkusers
mailing list