[vtkusers] Solid Voxelization with VTK

David Gobbi david.gobbi at gmail.com
Fri Sep 28 23:44:06 EDT 2018


Hi Berti,

It's nice to see that the orientation voting gives such a clean result.  To
get a result without gaps it would be necessary to take a completely
different approach to the rasterization: rasterize the polygons themselves,
instead of rasterizing the volume enclosed by the polygons.

Neither of the filters is parallel.  I designed them both so that they
could be parallel, but I never wrote the threading code because they
already worked fast enough for my application.

For instance, vtkPolyDataToImageStencil has this method:

    void vtkPolyDataToImageStencil::ThreadedExecute(
      vtkImageStencilData *data,
      int extent[6],
      int threadId)

The vtkImageStencilData object is made so that it can be written and read
in a thread-safe manner, so in order to multithread this filter, one would
just have to subdivide the extent along Z and then write a threaded "For()"
loop, e.g. with vtkSMPTools.h.

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180928/dbc3de93/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eiffel_tower_wrong_orientation.jpg
Type: image/jpeg
Size: 88782 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180928/dbc3de93/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eiffel_tower_right_orientation.jpg
Type: image/jpeg
Size: 37648 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180928/dbc3de93/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eiffel_tower_false.png
Type: image/png
Size: 54477 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180928/dbc3de93/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alienqueen_voxelization.jpg
Type: image/jpeg
Size: 65454 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180928/dbc3de93/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alienqueen_majority_voting.jpg
Type: image/jpeg
Size: 101543 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180928/dbc3de93/attachment-0007.jpg>


More information about the vtkusers mailing list