[vtkusers] How to use vtkExtractSelection on points

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Wed Aug 31 10:25:16 EDT 2016


Hi Dave,

Use this example as your reference:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ExtractCellsUsingPoints

The condition for adding a point ID to the vtkgidtypearray (while iterating
over all points in the polydata), in your case would be
      -5.0 < polydata->GetPoint(i)[3] < 5.0

Beyond that change, the rest of the code would work as is.

​Hope that helps.​


*Sankhesh Jhaveri*
*Sr. Research & Development Engineer* | Kitware
<http://www.kitware.com> | (518)
881-4417




On Wed, Aug 31, 2016 at 5:14 AM, Dave Edmunds <david.edmunds at icr.ac.uk>
wrote:

> Hi all,
>
> I am confused about how to use a vtkSelectionNode combined with
> vtkExtractSelection. I basically want to extract all points from a
> vtkPolyData which have their Z coordinates in a certain range e.g. -5.0 < Z
> < +5.0.
> Could anyone help with this?
>
> Kind regards,
>
> Dave
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-
> vtkExtractSelection-on-points-tp5740070.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160831/acc3d732/attachment.html>


More information about the vtkusers mailing list