Ok, I think I found a way to do it.

First get the proxy of the filter itself 
(http://public.kitware.com/pipermail/paraview/2011-November/023336.html 
<http://public.kitware.com/pipermail/paraview/2011-November/023336.html>):

import paraview.servermanager as sm
proxies = sm.ProxyManager().GetProxiesInGroup("sources").values()
selfProxy = [p for p in proxies if p.GetClientSideObject() is self][0]

Then get the selected points of the proxy’s input like this 
(http://stackoverflow.com/a/27805049):

proxy = paraview.simple.GetActiveSource()
active_selection = proxy.GetSelectionInput(proxy.Port)

/Allan


> On 17 Mar 2015, at 14:03, Allan Lyckegaard <[email protected]> wrote:
> 
> Hi Paraview users,
> 
> I have been searching this list and the documentation but without luck.
> 
> I am working on a python programmable filter with two vtkimagedata as inputs. 
> In the paraview GUI, both input vtkimagedata has an associated selection 
> picked by “Select Points With Polygon”.
> 
> How do I in the python programmable filter find out what points have been 
> selected in the two input vtkimagedata?
> 
> /Allan

_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to