[vtkusers] extracting a surface from scalars
Florian Sylla
uws67643 at stud.uni-stuttgart.de
Mon May 3 11:50:28 EDT 2010
hello,
in the following code there are skalarDatas assigned to every grid
point. I used the LookupTable-function for coloring the different
skalarvalues. So i got a nice colored output(for example the pressure
gradient).
Now i'm trying to get a surface(3D) out of my colored objekt with only
one defined Scalarvalue, e.g. to see where in my object the pressure is
at exactly 2bar.
Someone can give me a hint?
Thanks
Flo
# set name of the scalar data array to stressselection
self.stressScalarArray.SetName(self.scalSelection)
# add scalar data array to main grid
self.warpVector.GetOutput().GetPointData().AddArray(self.stressScalarArray)
# label scalar data array as an attribute to main grid
self.assignScalar = vtk.vtkAssignAttribute()
self.assignScalar.SetInput(self.warpVector.GetOutput())
self.assignScalar.Assign(self.scalSelection, 'SCALARS', 'POINT_DATA')
self.assignScalar.Update()
self.warpVectorMapper.SetInput(self.assignScalar.GetOutput())
self.warpVectorMapper.SetLookupTable(self.lookup)
More information about the vtkusers
mailing list