<div dir="ltr">Fraser,<div><br></div><div>I don't know if any filter in VTK do exactly what you want. You can try using the filter vtkBinningFilter from<div><br></div><div><a href="https://github.com/MADAI/MADAIWorkbench/tree/master/Plugins/BinningFilter">https://github.com/MADAI/MADAIWorkbench/tree/master/Plugins/BinningFilter</a></div><div><br></div><div>Otherwise, you can loop through and count the points in each voxel manually. You'll probably want to use a subclass of vtkAbstractPointLocator (<a href="http://www.vtk.org/doc/nightly/html/classvtkAbstractPointLocator.html">http://www.vtk.org/doc/nightly/html/classvtkAbstractPointLocator.html</a>) to accelerate point queries.</div><div><br></div><div>HTH,</div><div>Cory</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 26, 2016 at 7:52 AM, Fraser Callaghan <span dir="ltr"><<a href="mailto:fraser.callaghan@sydney.edu.au" target="_blank">fraser.callaghan@sydney.edu.au</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-AU" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hello, <u></u><u></u></p>
<p class="MsoNormal">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). <u></u><u></u></p>
<p class="MsoNormal">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?)<u></u><u></u></p>
<p class="MsoNormal">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.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks for your help.<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal">Fraser<u></u><u></u></p>
</font></span></div>
</div>
<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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Cory Quammen<br>Staff R&D Engineer<br>Kitware, Inc.</div>
</div>