[vtkusers] Overwriting original data after using stencil ?

David Netherway david.netherway at adelaide.edu.au
Tue Feb 5 20:19:09 EST 2002


I had some behaviour that I did not expect and would like some comments. I
will try to reproducee the code flow removing all of the extraneous stuff.

vtkClip clip
clip SetInput [reader GetOutput]
# set clip range etc...

viewer SetInput [clip GetOutput]
# the viewer displays the initial data of interest with the following using
the WindowLevelIntercface.tcl

volumeMapper SetInput [clip GetOutput]

vtkVolume volume
  volume SetMapper volumeMapper
  volume SetProperty volumeProperty
vtkRenderer renderer
  renderer AddVolume volume

vtkImageStencil imageStencil
  imageStencil SetInput [clip GetOutput]
  imageStencil SetBackgroundValue 0
  imageStencil SetStencil [stencil GetOutput]

volumeMapper SetInput [imageStencil GetOutput]
# display etc...

The stencil is applied appropriately but the clip output now shows the
effect of the stencil even though I have not changed the viewer input.
I was not expecting this. I expected the clip output data would be stay the
same.

Does someone expect this behaviour? I would appreciate some comments.

Thanks, David





More information about the vtkusers mailing list