[vtk-developers] Stencil improvement

David Gobbi david.gobbi at gmail.com
Mon Nov 8 11:21:51 EST 2010


Hi All,

I'm revisiting the "ImageStencil" classes that I added to VTK way back
around VTK 4.0.  These classes allow operations on arbitrarily-shaped
regions of an image via a run-length encoded binary image mask. They
were not implemented very well and I know that they caused a few
headaches (especially during the conversion to the VTK 5 pipeline
executive).  I have started a mini-project to bring the stencils
up-to-date and fix their most serious flaws.  The project wiki page is
here:
http://www.vtk.org/Wiki/VTK/Image_Stencil_Improvements

Two of the most important fixes have already been pushed to vtk-git:
1) The vtkPolyDataToImageStencil filter works with 2D contours now
2) The new vtkLassooStencilSource simplifies the creation of freehand
   contour stencils (single or stacked) in any orientation

The most troublesome fix will be fully moving these classes to the VTK
5 executive.  Many of the Stencil algorithms have an
"InformationInput" from which the algorithm pulls information (e.g.
spacing, origin, and extent) but not the data.  In the VTK 5
executive, there is no mechanism by which certain requests
(REQUEST_DATA in this case) can be forwarded to some inputs but not to
others.  So I think that I will have to make a proxy algorithm class
of some sort that will block these requests.

  - David



More information about the vtk-developers mailing list