[vtkusers] should I use vtkPolyData or something else?

Bill Lorensen bill.lorensen at gmail.com
Sat Jul 25 15:27:49 EDT 2009

You may want to look at Shepard's method:

// .NAME vtkShepardMethod - sample unstructured points onto structured
points using the method of Shepard
// .SECTION Description
// vtkShepardMethod is a filter used to visualize unstructured point data using
// Shepard's method. The method works by resampling the unstructured points
// onto a structured points set. The influence functions are described as
// "inverse distance weighted". Once the structured points are computed, the
// usual visualization techniques (e.g., iso-contouring or volume rendering)
// can be used visualize the structured points.
// .SECTION Caveats
// The input to this filter is any dataset type. This filter can be used
// to resample any form of data, i.e., the input data need not be
// unstructured.
// The bounds of the data (i.e., the sample space) is automatically computed
// if not set by the user.
// If you use a maximum distance less than 1.0, some output points may
// never receive a contribution. The final value of these points can be
// specified with the "NullValue" instance variable.

On Sat, Jul 25, 2009 at 3:02 PM, Lorenzo
Bernardi<lorenzo.bernardi at lpn.cnrs.fr> wrote:
> Dear All,
>  first of all I'd like to apology because I'm sure my questions have
> probably  already been asked but I'm struggling with vtk for two weeks and I
> think my problems comes more from using the correct vocabulary to find my
> anwer and so any pointer is welcome.
>   my problem is that I have a set of atomic coordinates and there are two
> values for each coordinates one is the type of atoms and the other the value
> of the wavefunction (a scalar). The data file is in hdf5 and is homemade.
> Question 1: vtkPolyData or not?
>   I'm using vtkPolyData with these atomic coordinates. There are not
> completely regular since atoms may slightly change position. I know the
> nearest neighbour of each atoms so maybe I should use something else like
> vtkStructuredGrid but my atoms are given at random from the file. Since I
> like to interpolate the wave function between coordinates maybe I have to
> use something else than vtkPolyData. Can you tell me what would be the best
> dataset for that? In fact it looks like what I need is the vtkPLOT3DReader
> but I don't want to write my data in a PLOT3D file. Unless it is the
> simplest solution.
> If vtkPolyData is not the correct way to deal with the problem then probably
> the rest is not really relevant except that I'd like to toggle the different
> dataset that is suppress the atoms
> of one type or the other.
> Question 2: One or more Polydata?
>  I was trying to have several values for the atomic coordinates, the type
> and the wavefunction but I didn't succeed in using the wavefunction. But
> this might be related to the fact that I would like to interpolate between
> the value of the wavefunction and maybe vtkPolyData is not the one for that.
>  For the atoms I can plot the atoms using glyphs and I would be interested
> in knowing how can I toggle on and off one type of atoms.  That is if I
> press on the key "a" the first type of atom is not shown an if I press "a"
> once more it reappears. I will probably only have up to five atoms type and
> for now three would be enough. Is it posible?
> sincerely
> L.
> _______________________________________________
> 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