[vtkusers] Load update of datafile

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Sun Jun 10 03:20:20 EDT 2001


hi,

>>>>> "BdC" == Benitio del Cruz <theqontinuum at hotmail.com> writes:

<snip>

    BdC> vtkDataSetReader, to which several filters are attached.  No
    BdC> matter how I try to tickle the reader, it won't reread the
    BdC> file. I've tried Update(), OpenVTKFile(), Modified(), etc. I
    BdC> worked around it for the moment by creating a second
    BdC> vtkDataSetReader, pointing to the same file, attaching it to
    BdC> the pipeline, and then deleting the old one. It is kind of
    BdC> working, but not exactly a nice solution.  Anybody got any
    BdC> ideas?

Maybe your version of vtk needs upgrading?  I have used this with
recent nightlies and it works pretty well.

$python

>>> from vtkpython import *
>>> d = vtkStructuredPointsReader()
>>> d.SetFileName ("heart.vtk")
>>> d.Update ()
>>> d.GetOutput ().GetPointData ().GetScalars ().GetRange ()
(0.0, 255.0)
# I changed the file meanwhile replacing one point with the value 555
>>> d.Modified ()
>>> d.Update ()
>>> d.GetOutput ().GetPointData ().GetScalars ().GetRange ()
(0.0, 555.0)

So, it definitely works.  Either you need to upgrade or the particular
reader that you are using is broken.

prabhu




More information about the vtkusers mailing list