[vtkusers] vtkProbeFilter inconsistency

Santosh Biradar scbiradar at gmail.com
Tue Aug 14 07:54:33 EDT 2018

Hi VTKers,

I am trying to use the vtkProbeFilter on an unstructured data set. I am
using a cell to point filter on my input dataset and trying to probe the
output of the cell to point filter

I have a snippet for what I am doing:

#picker for getting the point
picker = vtk.vtkCellPicker()
picker.Pick(x, y, 0, renderer)
points = picker.GetPickedPositions()
numPoints = points.GetNumberOfPoints()
print numPoints
if numPoints < 1:
pnt = points.GetPoint(0)

#probe filter
pt = vtk.vtkPoints()
pt.InsertPoint(0, x, y, z)
polydata = vtk.vtkPolyData()
probe = vtk.vtkProbeFilter()


val =

Now, I am getting inconsistent behavior of the probe filter.
Sometimes, I get the values of all the point data arrays as 0.0 for the
probed location.
I dont understand this behavior. It does work correctly but not always.

Alternately, I tried using the picker.GetCellId() and picker.GetPointId()
to directly fetch the value from the actor's input dataset (in this case,
output of cell to point filter). Again here, the point id obtained always
seems to be only a particular point in the cell irresepctive of whether
probed location is near that point or any other point in that cell. So, I
end up getting point data of a particular point in that cell no matter
where I probe in that cell.
Is using a vtkPointPicker the correct option here?

Also, should I explore using vtkPointLocator/vtkCellLocator ?

I hope the question is clear. I am using VTK-6.3 on Windows.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180814/a922b992/attachment.html>

More information about the vtkusers mailing list