[vtkusers] SetScalars of SG from Field
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Tue Apr 9 04:55:51 EDT 2002
>>>>> "RH" == Randy Heiland <heiland at ncsa.uiuc.edu> writes:
RH> I'm trying to update scalars in a struct grid from a FIELD
RH> file, but the results don't get re-rendered properly. What am
RH> I missing?
Your code gives me the same results. After trying many things I got
around the problem by doing the following:
sg1 = vtkStructuredGrid()
sg1.DeepCopy(sg)
sg1.GetPointData().SetScalars(so)
mapper.SetInput(sg1)
I then tried this:
m = vtkDataSetMapper()
m.SetInput(sg)
actor.SetMapper(m)
Both approaches work fine. This looks like a bug somewhere in
vtkDataSetMapper? I believe there is also a similar problem with the
pnmwriter. Even tho the rendered image shows up correctly it does not
dump the new image.
FYI, I'm using 'vtk version 4.1.1, vtk source $Revision: 1.1200 $,
$Date: 2002/04/07 03:45:13 $ (GMT)'
prabhu
More information about the vtkusers
mailing list