[vtkusers] VTKPolyData to 3D image

David Doria daviddoria+vtk at gmail.com
Tue Apr 20 07:37:37 EDT 2010


On Tue, Apr 20, 2010 at 3:34 AM, Lars Friedrich Lars <lars-friedrich at gmx.net
> wrote:

> Hello David Welch,
>
> referring to your original question "how to voxelize a simple surface" I
> added a VTK wiki example:
>
> http://www.cmake.org/Wiki/VTK/Examples/PolyDataToImageData
>
> It shows how we could incorporate vtkPolyDataToImageStencil into voxelizing
> a *closed* surface.
>
> 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!
>
> HTH,
>
> lars
>
>
David W -

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.

Lars -

Looks great, thanks! Hopefully David W will play around with it and solve
the mystery of the origin problem.

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100420/3d664e90/attachment.htm>


More information about the vtkusers mailing list