[vtkusers] Forcing an Update of a vtkSource
Kevin Teich
kteich at cortechs.net
Tue Feb 19 17:03:31 EST 2002
[Berk]
> Calling Modified() on the outut object will have no effect because
> the pipeline does not check the modification time of outputs.
> You need to call Modified() on the source itself (assuming that
> it is a sub-class of something like vtkSource, vtkImageSource etc.)
That seems to restore the scalars to their original values, i.e. the
content of the file. Probably because in my SetValue() function, I am
modifying the scalars of the output, not the scalars in the Reader object
itself. (I realize this is probably incorrect, but I played with a bunch
of different methods and this is the only one I found that works.)
I guess my problem is that I'm not sure where I should be changing this
data. My Reader is based on vtkVolume16Reader and it doesn't do anything
like this. In fact, it appears to only supply its output with scalar
information once in its Execute() function, probably because it assumes
the file data will not change. I assumed the output cached this data, and
that if I wanted to modify it, i would modify the output's scalars.
Perhaps, in my Reader, I should keep an internal copy of the file data as
a DataArray, change that in my SetValue() function, and modify Execute()
in the Reader to set the output scalars to that copy?
Thanks for your help.
--
Kevin Teich
More information about the vtkusers
mailing list