[vtkusers] glyphs..
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Fri May 4 02:42:18 EDT 2001
hi,
>>>>> "KRS" == K R Subramanian <krs at zappa.uncc.edu> writes:
>> From the docs, I understand glyphs can be scaled based on
>> scalar or
KRS> vector data. Can the glyph colors also be controlled by the
KRS> input data at the same time? For instance if I have a cube
KRS> glyph, I would like it to be scaled based on vector data and
KRS> its color altered based on scalar value. In fact what I am
KRS> doing is to scale in Z by the scalar value and also color by
KRS> a lookup table - though this seems somewhat redundant, it
KRS> clarifies the visualization.. qn. is, can this be done via
KRS> glyphs?
Sure! You can definitely do this. If this is plain vector
visualization you first do something like the following:
cones = vtkGlyph3D()
# Set it to color by vector data
cones.SetColorModeToColorByVector()
# or color by scalars
cones.SetColorModeToColorByScalar()
Then you just connect the appropriate Lookup table and set the right
scalar range for the mapper and you are done. It doesnt matter as to
what glyph you use.
For streamlines the approach is similar. Just use SpeedScalarsOn() to
color by vectors and do SpeedScalarsOff() to color by scalars.
prabhu
More information about the vtkusers
mailing list