[vtkusers] Index of points stored in vtkPolyData?
Cory Quammen
cory.quammen at kitware.com
Tue Jul 26 22:42:14 EDT 2016
vtkIdFilter does what you want:
http://www.vtk.org/doc/nightly/html/classvtkIdFilter.html
Just call vtkIdFilter::PointIdsOn() to generate point IDs. You can get
the ids from your visiblePointsPolyData with
visiblePointsPolyData->GetPointData()->GetArray("vtkIdFilter_Ids").
If you don't like the array name "vtkIdFilter_Ids", you can change it with
vtkIdFilter::SetIdsArrayName(const char *)
HTH,
Cory
On Tue, Jul 26, 2016 at 5:34 PM, BBerco <bebe0705 at colorado.edu> wrote:
> The end of my last message was maybe a bit misleading.
>
> Basically, I am wondering if the vtkPolyData *points_polydata* can be
> augmented with an id "column" such that each point is associated with an ID.
> So that the subset *visiblePointsPolyData* contains not only the coordinates
> of the visible points, but their ID as well.
>
> I am still reluctant to use a closest point approach to find the
> correspondence between the two sets, since this would be redundant with the
> rubber band selection, as the latter already provides the coordinates of the
> visible points (which would just need to be augmented with the ID of the
> visible points to make me a happy person).
>
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Index-of-points-stored-in-vtkPolyData-tp5739338p5739367.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
--
Cory Quammen
R&D Engineer
Kitware, Inc.
More information about the vtkusers
mailing list