<div dir="ltr">Livia,<div><br></div><div>The IDs list passed to IDSelectionSource takes processorID and point/cell ID pairs. Your IDs was set to [0, 1], which means "select point 1 from processor 0". To select points 0, 1, and 2, for example, set your IDs setting to [0, 0, 0, 1, 0, 2].</div><div><br></div><div>See the data descriptor for IDs at [1].</div><div><br></div><div>HTH,</div><div>Cory</div><div><br></div><div>[1] <a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/paraview.simple.IDSelectionSource.html">http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/paraview.simple.IDSelectionSource.html</a></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 15, 2015 at 5:31 AM, <span dir="ltr"><<a href="mailto:livia.barazzetti@istb.unibe.ch" target="_blank">livia.barazzetti@istb.unibe.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal">I would like to use the ExtractSelection filter by providing an ID List, as hinted in the doc <a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/paraview.simple.ExtractSelection.html?highlight=extractselection#paraview.simple.ExtractSelection" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/paraview.simple.ExtractSelection.html?highlight=extractselection#paraview.simple.ExtractSelection</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">What is the correct syntax? First I tried :<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:black">e = ExtractSelection(Sphere1, [1,2])</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:red">Traceback (most recent call last):</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:red">File "<console>", line 1, in <module></span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:red">File "R:\ParaView 4.4.0\lib\paraview-4.4\site-packages\paraview\simple.py", line 1520, in CreateObject</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:red">raise RuntimeError, "Expecting a proxy as input."</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:red">RuntimeError: Expecting a proxy as input.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:red"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:red"><u></u> <u></u></span></p>
<p class="MsoNormal">Then I tried:<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:black">>>> selection = paraview.simple.IDSelectionSource(ContainingCells=0, FieldType = "POINT", IDs = [0,1])</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:black">>>> e = ExtractSelection(Sphere1, Selection = selection)</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:black">>>> e.UpdatePipeline()</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:black">>>> e.GetDataInformation().GetNumberOfPoints()</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:#009600">1L<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:#009600">#I expected 2 points<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:red"><u></u> <u></u></span></p>
<p class="MsoNormal">and then, when I tried to visualize the result, I got:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:Courier;color:maroon">ERROR: In C:\bbd\b51c3c7f\source-paraview\ParaViewCore\ServerManager\Rendering\vtkSMParaViewPipelineControllerWithRendering.cxx, line 542</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:Courier;color:maroon">vtkSMParaViewPipelineControllerWithRendering (000000000C747260): Data cannot be shown in the defaulted render view!!</span><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks<u></u><u></u></p>
<p class="MsoNormal">Livia<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:Courier;color:red"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Verdana","sans-serif";color:#6d6d6d">Livia Barazzetti<br>
Ph.D. Student - Medical Image Analysis<br>
Institute for Surgical Technology and Biomechanics<br>
University of Bern<br>
Stauffacherstrasse 78<br>
CH-3014 Bern<br>
Tel <a href="tel:%2B41%2031%20631%2059%2048" value="+41316315948" target="_blank">+41 31 631 59 48</a><br>
</span><span style="color:#0d1c7f"><a href="http://www.istb.unibe.ch/" target="_blank"><span style="font-size:7.5pt;font-family:"Verdana","sans-serif";color:blue">http://www.istb.unibe.ch</span></a></span><span><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</font></span></div>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>