[vtkusers] Count polydata in VTI voxels

Fraser Callaghan fraser.callaghan at sydney.edu.au
Mon Sep 26 17:59:53 EDT 2016


Thanks for the tips Cory.
I also received this morning the latest Kitware blog on Scalable Point Processing in VTK:
https://blog.kitware.com/scalable-point-processing-in-vtk/
Will look into and follow this closely also.
Thanks all


From: Cory Quammen [mailto:cory.quammen at kitware.com]
Sent: Tuesday, 27 September 2016 12:01 AM
To: Fraser Callaghan <fraser.callaghan at sydney.edu.au>
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Count polydata in VTI voxels

Fraser,

I don't know if any filter in VTK do exactly what you want. You can try using the filter vtkBinningFilter from

https://github.com/MADAI/MADAIWorkbench/tree/master/Plugins/BinningFilter

Otherwise, you can loop through and count the points in each voxel manually. You'll probably want to use a subclass of vtkAbstractPointLocator (http://www.vtk.org/doc/nightly/html/classvtkAbstractPointLocator.html) to accelerate point queries.

HTH,
Cory



On Mon, Sep 26, 2016 at 7:52 AM, Fraser Callaghan <fraser.callaghan at sydney.edu.au<mailto:fraser.callaghan at sydney.edu.au>> wrote:
Hello,
I have a dense set of polydata and would like to convert to a vtkImageData with each cell containing a count of the number of points, from the poly data, that are in that cell (returning a CellData array) (I suppose any input data would be relevant).
Does a method exist that will count the points within a voxel like this? Or am I better to loop through each cell counting as I go? (or something else – I guess some clever AMR approach would be most efficient?)
Note – vtkGaussianSplatter does not give the result I want – when trying to limit a point’s influence to only one cell either no influence of a “bubble” effect exists.

Thanks for your help.
Fraser

_______________________________________________
Powered by www.kitware.com<http://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
Staff R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160926/71a3a9a3/attachment.html>


More information about the vtkusers mailing list