vtkProbeFilter fails in 2D

Hi all,
I am trying to probe a planar source (fig1) with a sector-like input (fig2), which is also planar. However, I get this weird output (fig 3). Here is my code:

sector_avg = True
filler = vtk.vtkContourTriangulator()
probe_sec = vtk.vtkProbeFilter()
if sector_avg:
    filler.SetInputData(basal[0])
    probe_sec.SetSourceData(clipIn.GetOutputDataObject(0))
    probe_sec.SetInputConnection(filler.GetOutputPort())
    probe_sec.Update()

mapper2 = vtk.vtkPolyDataMapper()
mapper2.SetInputConnection(probe_sec.GetOutputPort())
mapper2.ScalarVisibilityOn()



Thank you all for your help :slight_smile:

Hello Again!

After a while of struggling, I found the reason why I get these weird results and how to obviate the problem. Thought it might be helpful for others also.

The vtkProbeFilter works with interpolating points located on the input. So, if your input does not have enough point resolution on edges the number of triangles formed by vtkContourTriangulator() would be low and the probe cannot interpolate the source. Thus, by increasing the number of nodes on the edges and then triangulating the surface, you would get what you want. This can also be tricky when one aims to use geometrical sources, in my case vtkDiskSource(); you should be careful to increase the radial and circumferential resolution and then perform probing.

Hope this can help some :slight_smile: