<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">Hi Dave,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">Use this example as your reference: <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ExtractCellsUsingPoints">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ExtractCellsUsingPoints</a></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">The condition for adding a point ID to the vtkgidtypearray (while iterating over all points in the polydata), in your case would be</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"> -5.0 < polydata->GetPoint(i)[3] < 5.0</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">Beyond that change, the rest of the code would work as is. </div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">Hope that helps.</div><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><span style="color:rgb(11,83,148)"><span style="font-family:verdana,sans-serif"><b><font size="2">Sankhesh Jhaveri</font></b><br><i>Sr. Research & Development Engineer</i> | </span></span><span style="font-family:verdana,sans-serif;color:rgb(11,83,148)"><a href="http://www.kitware.com" target="_blank">Kitware</a> | </span><span style="font-family:verdana,sans-serif;color:rgb(11,83,148)">(518) 881-4417</span><div><br><b></b><br> </div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Aug 31, 2016 at 5:14 AM, Dave Edmunds <span dir="ltr"><<a href="mailto:david.edmunds@icr.ac.uk" target="_blank">david.edmunds@icr.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I am confused about how to use a vtkSelectionNode combined with<br>
vtkExtractSelection. I basically want to extract all points from a<br>
vtkPolyData which have their Z coordinates in a certain range e.g. -5.0 < Z<br>
< +5.0.<br>
Could anyone help with this?<br>
<br>
Kind regards,<br>
<br>
Dave<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/How-to-use-vtkExtractSelection-on-points-tp5740070.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/How-to-use-<wbr>vtkExtractSelection-on-points-<wbr>tp5740070.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<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/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div></div>