[vtkusers] SCALARS and COLOR_SCALARS

xiaoxu wang xiaoxu.wang at gmail.com
Tue Feb 26 21:56:58 EST 2008


 Dear vtkUsers,

There are two types of scalar definition,  SCALARS and
COLOR_SCALARS. I don't know how to switch between these two. When it is
using  COLOR_SCALARS, can we still use LookupTable to  display the data?
 When using SCALARS, I can use the following code to display the scalars. It
does not work when using COLOR_SCALARS. Is there any way to comvert
COLOR_SCALARS to SCALARS?

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
reader=vtkPolyDataReader()
mapper = vtkDataSetMapper()
lut = make_lookupTable('jet.txt')

mapper.SetLookupTable(lut)
mapper.SetInput(reader.GetOutput())
actor = vtkActor()
actor.SetMapper(mapper)
actor.GetProperty().SetOpacity(0.8)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Thanks in advance
Xiaoxu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080226/bcb676ee/attachment.htm>


More information about the vtkusers mailing list