[vtk-developers] vtkCheckerboardSplatter

Will Schroeder will.schroeder at kitware.com
Sun Feb 15 18:28:37 EST 2015

In our continuing effort to speed up VTK and add in new parallel computing
support, we just implemented a new version of vtkGaussianSplatter. The new
class, vtkCheckerboardSplatter, is much faster in serial mode, and if you
enable threading (e.g., use TBB through vtkSMPTools) it is >10x faster
depending on the number of threads and particulars of the input data.

While I was at it, I also multithreaded a portion of vtkGaussianSplatter so
this class is a bit faster too when threading is enabled.

The code is undergoing review in gerrit:

Surprisingly vtkGaussianSplatter is still in widespread use, mainly to
convert unstructured data (by sampling with points), or data without
topology, into a volumetric dataset. The resulting volume can then be
isocontoured, volume rendered, etc. The problem with this class is that it
was originally written over 20 years ago as a demonstration and has lots of
other cobwebs in evidence. Most importantly, this original implementation
does not lend itself to effective shared memory parallel processing. As a
result, we created the vtkCheckerboardSplatter that threads across the
splat footprint, as well as splatting multiple points simultaneously.

The basic idea is to use a 8-way checkerboarding to splat points in safely
separated regions of the volume so that the splat operations can write into
the output volume without write contention. Think of creating blocks
consisting of checkerboard squares (like an octree) each one of eight
colors, where the points resident in one of the colors/squares can be
simultaneously splatted in parallel. The splat operation, for big enough
splat footprints, is threaded as well.

There were some other modifications to the API, mainly the splat footprint
is separated from the Gaussian radius. Also, the accumulation process is
slightly different, and the input and output types have been expanded to
include combinations of (float,double).

If you are interested, please try it out and provide feedback. I'm also
looking for candidates for other classes to multithread / speed up, so
please let me know via separate email. At some point I'll write up a paper
but I'm having too much fun coding now to be slowed down by that sort of
thing :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150215/e6a753b7/attachment.html>

More information about the vtk-developers mailing list