[vtkusers] Overwriting original data after using stencil ?
David Netherway
david.netherway at adelaide.edu.au
Tue Feb 5 21:21:58 EST 2002
Hello David,
Sorry, clip was created as below:
vtkImageClip clip
clip ByPassOn
clip SetInput [$reader GetOutput]
clip SetOutputWholeExtent $xNMin $xNMax $yNMin $yNMax $zNMin $zNMax
clip ClipDataOff
clip ReleaseDataFlagOff
Actually for the data being processed clip was not needed so I took it out
of the pipeline so that where clip appears in my original email the data is
sourced from an vtkImageAppend. The same behaviour occurs.
vtkImageAppend append
... appends data from a set of vtkImageReslicers
set reader append
vtkImageViewer viewer
viewer SetInput [$reader GetOutput]
# the viewer displays the initial data of interest with using the
WindowLevelIntercface.tcl
volumeMapper SetInput [$reader GetOutput]
vtkVolume volume
volume SetMapper volumeMapper
volume SetProperty volumeProperty
vtkRenderer renderer
renderer AddVolume volume
vtkImageStencil imageStencil
imageStencil SetInput [$reader GetOutput]
imageStencil SetBackgroundValue 0
imageStencil SetStencil [stencil GetOutput]
volumeMapper SetInput [imageStencil GetOutput]
# display etc...
The stencil is applied appropriately but the $reader 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 $reader output data would be stay
the
same.
Does someone expect this behaviour? I would appreciate some comments.
Thanks, David
----- Original Message -----
From: "David Gobbi" <dgobbi at irus.rri.ca>
To: "David Netherway" <david.netherway at adelaide.edu.au>
Cc: <vtkusers at public.kitware.com>
Sent: Wednesday, February 06, 2002 12:06 PM
Subject: Re: [vtkusers] Overwriting original data after using stencil ?
> 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
> >
>
> _______________________________________________
> 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