<div class="gmail_quote">On Tue, Apr 20, 2010 at 3:34 AM, Lars Friedrich Lars <span dir="ltr"><<a href="mailto:lars-friedrich@gmx.net">lars-friedrich@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello David Welch,<br>
<br>
referring to your original question "how to voxelize a simple surface" I added a VTK wiki example:<br>
<br>
<a href="http://www.cmake.org/Wiki/VTK/Examples/PolyDataToImageData" target="_blank">http://www.cmake.org/Wiki/VTK/Examples/PolyDataToImageData</a><br>
<br>
It shows how we could incorporate vtkPolyDataToImageStencil into voxelizing a *closed* surface.<br>
<br>
Please NOTE: as I wrote on the example page I'm not sure about the image origin. The visual agreement in the sphere-image-overlay (paraview) is not perfect and I'm not sure whether or not we had to introduce some spacing-dependent image origin offset to compensate that. If you use that code and find out something in this direction it would be great if you contributed it to that example!<br>
<br>
HTH,<br>
<br>
lars<br><br></blockquote><div class="gmail_quote"><br></div>David W -</div><div class="gmail_quote"><br></div><div class="gmail_quote">Yes, the normals are definitely necessary. With a mesh, you can simply run vtkPolyDataNormals. With a point set, you'd have to use my vtkPointSetNormalEstimation and vtkPointSetNormalOrientation filters (part of the same surface reconstruction journal submission). Unfortunately I don't know what it means by the missing ImageData element.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Lars -</div><div class="gmail_quote"><br>Looks great, thanks! Hopefully David W will play around with it and solve the mystery of the origin problem.</div><div class="gmail_quote">
<br clear="all">Thanks,<br><br><div>David </div></div>