vtkImplicitFunctionToImageStencil MTime
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The vtkImplicitFunctionToImageStencil does not check the MTime of the input ImplicitFunction, that is why the stencil doesn't update. Since a vtkImplicitFunction isn't a vtkDataObject, the VTK pipeline mechanism doesn't automatically take care of the updating.
Conversely, the vtkPolyDataToImageStencil is a true VTK filter that has a vtkDataObject as both input and output, and the pipeline behaves as expected.
The vtkImplicitFunctionToImageStencil works by evaluating the ImplicitFunction at every voxel within the UpdateExtent of the ImageData that is being stenciled, which is fairly inefficient.
The vtkPolyDataToImageStencil works by looking at where the raster lines of the image (i.e. lines of constant z,y) intersect the PolyData, and hence is very efficient as long as the PolyData is not too complex.
vtkPolyData spoly vtkPoints spoints
vtkImplicitSelectionLoop loop loop SetLoop spoints loop SetNormal 1 0 0 loop AutomaticNormalGenerationOn
vtkImplicitFunctionToImageStencil if2is if2is SetInput loop
vtkImageStencil stencil stencil SetInput [extract GetOutput] stencil SetStencil [if2is GetOutput] stencil ReverseStencilOn stencil SetBackgroundValue 128 stencil ReleaseDataFlagOff
http://www.vtk.org/pipermail/vtkusers/2003-December/070876.html