[vtkusers] Overwriting original data after using stencil ?

David Gobbi dgobbi at irus.rri.ca
Tue Feb 5 20:36:24 EST 2002


Hi David,

You are correct that the vtkImageViewer display should not change
(I'm guessing the 'viewer' is a vtkImageViewer) but I have no idea
what a 'vtkClip' is since there is no such class in VTK...

 - David


On Wed, 6 Feb 2002, David Netherway wrote:

> 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
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list