[vtk-developers] Is vtkprobefilter working correctly ? Here is an example to test…

foufara foufara at yahoo.fr
Tue May 9 13:47:12 EDT 2017


Hi Ken,

thank you for your answer. 
I'm really flattered to get an answer from one of the fathers of VTK (right
?) whose book lies on my desk ! :-)

I realize I could have been more clearer on what I intend to do.
I want indeed interpolate from one dataset to another, from the source point
or cell data to the input points.
For that purpose vtkprobefilter seems perfect.
I also understand that the interpolation will be different whether the data
are point or cell located on the source :
- for pointdata, it will be interpolation based on the parametric
coordinates of the input points in the cells that contain them
- for celldata it will just be passing cell values to the input points
contained in them…

Please correct me if I'm wrong so far…

However I notice that on some occasions vtkprobefilter fails while it should
not (according to me)

So I though I can get the same celldata "interpolation" using vtkcellLocator
to identify which cell contains each input point and then passing manually
the right values from the source cells to the input points.

And doing that I realize that vtkcellLocator does find the "right" cells
where vtkprobeFilter fails.
So I don't expect here to get the same results in terms of interpolated data
(at least when we deal with point data, since cell data should be treated
the same way here, right ?) but in terms of which cell is found to contain
each input point.

The example I joined in a previous post (in python and then C++) shows that
the cells identified are different (vtkprobefilter fails but vtkcelllocator
don't). Check the prints.

What surprises me is that, by reading the vtk code, it seemed to me that
about the same functions were called by each filter (vtkpointlocator to
identify the closest point in the source, then FindCell and FindCellWalk for
each cell using the points, etc.).

I'm trying to "debug" (I'm sure it's not really bugged") each filter to
understand where the difference arises. But I'm not used to C++ (see my
other post : "Best way to add a print in a distribution file ?").

Finaly, I wrote earlier "find the "right" cells" because in my example the
source cells are "warp hexa" (built from warp quadrangles). So the cell
found to contain a point by either vtkprobefilter (when it works) or
vtkcellLocator is not necessarily the cell that physically contains the
point. You'll see it if you run the python version of my example and check
the outputs in paraview. But I don't know if I can do better.

Well I hope I'm clearer now, and not too long :-)

Thank you for you help on that.

Raphaël





--
View this message in context: http://vtk.1045678.n5.nabble.com/Is-vtkprobefilter-working-correctly-Here-is-an-example-to-test-tp5743104p5743162.html
Sent from the VTK - Dev mailing list archive at Nabble.com.


More information about the vtk-developers mailing list