MantisBT - VTK
View Issue Details
0003130VTK(No Category)public2006-04-14 11:332012-12-12 12:04
Mathieu Malaterre 
David Gobbi 
lowminoralways
closedfixed 
 
 
0003130: vtkImplicitFunctionToImageStencil MTime
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 [^]
No tags attached.
Issue History
2008-11-30 09:10Mathieu MalaterreAssigned ToMathieu Malaterre => David Cole
2011-01-19 09:55David ColeAssigned ToDavid Cole =>
2011-02-16 15:48David GobbiAssigned To => David Gobbi
2011-02-18 09:28David GobbiStatustabled => @80@
2011-02-18 09:28David GobbiResolutionopen => fixed
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2012-12-12 12:04David GobbiNote Added: 0029875
2012-12-12 12:04David GobbiStatuscustomer review => closed

Notes
(0029875)
David Gobbi   
2012-12-12 12:04   
Fixed by commit 82407dbb on Feb 18, 2011.