<div dir="ltr"><div>good to know David, thanks!!!<br><br></div>- Dean<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 23, 2017 at 11:21 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Elvis,</div><div><br></div><div>I'd recommend generating a stencil with vtkPolyDataToImageStencil, then iterating over over all the voxels inside the stencil with vtkImagePointDataIterator:</div><div><br></div><div><a href="http://www.vtk.org/doc/nightly/html/classvtkPolyDataToImageStencil.html" target="_blank">http://www.vtk.org/doc/nightly<wbr>/html/classvtkPolyDataToImageS<wbr>tencil.html</a><br></div><div><a href="http://www.vtk.org/doc/nightly/html/classvtkImagePointDataIterator.html" target="_blank">http://www.vtk.org/doc/nightly<wbr>/html/classvtkImagePointDataIt<wbr>erator.html</a><br></div><div><br></div><div>The iterator can efficiently give you the pointId for every voxel enclosed by the polyhedral surface (works for concave as well as convex surfaces). Once you have the pointId, you can set that voxel to whatever you want. There's a brief and vaguely relevant description on gitlab: <a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/1118" target="_blank">https://gitlab.kitware<wbr>.com/vtk/vtk/merge_requests/<wbr>1118</a></div><span class="HOEnZb"><font color="#888888"><div><br></div><div> - David</div></font></span><span class=""><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 23, 2017 at 6:45 PM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I have a set of points describing multiple convex polyhedra. The<br>
polyhedra are for the most part disjoint in space, but they may<br>
intersect slightly in some places.<br>
<br>
I need to create an empty voxel volume (all scalars 0), and then<br>
"fill" the voxels that are inside one (or several) of the polyhedrons<br>
with some Perlin noise. I also have access to normals for the faces<br>
constituting the polyhedra, if necessary.<br>
<br>
Finally, I also have a single separate polyhedron (non-convex this<br>
time), and as a finishing step, I'd like to fill the voxels that are<br>
inside this polyhedron with a constant scalar value.<br>
<br>
Can VTK help me here?<br>
<br>
As this is new territory for me as far as VTK goes, any<br>
pointers/advice on how to go about it would be much appreciated.<br>
<br>
Cheers,<br>
Elvis<br></blockquote></div></div></span></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></div>