[vtkusers] table of glyphs

aeych aeych at voila.fr
Thu Sep 9 02:52:48 EDT 2004


Hello,
I need your help ! I would to use VTK for plotting two different glyphs (glyph1 and glyph2) on a geometry.
I have created a vtk data set that have a vector and a scalar attribute data.
I want to represent the geometry with the glyph1 on nodes that have a negative scalar value, and glyph2 on nodes that have a positive scalar value.
My glyphs will be oriented along the input vectors, and will be scaled and colored according to scalar data.
I have tried to use a table of glyphs in my code but the result is not what I want.
I don't know how to obtain the good index in my table of glyphs.
vtkFieldDataToAttributeDataFilter vdata0
 vdata0 SetInput [toto GetOutput]
 vdata0 SetInputFieldToPointDataField
 vdata0 SetOutputAttributeDataToPointData
 vdata0 SetVectorComponent 0 $data 0
 vdata0 SetVectorComponent 1 $data 1 
 vdata0 SetVectorComponent 2 $data 2
 vdata0 SetScalarComponent 0 $data 3 
 vdata0 Update
vtkGlyph3D glyph0
 glyph0 SetInput [vdata0 GetOutput]
 glyph0 SetNumberOfSources 2
 glyph0 SetSource 0 [Glyph1 GetOutput]
 glyph0 SetSource 1 [Glyph2 GetOutput]
 glyph0 SetIndexModeToScalar
 glyph0 ScalingOn
 glyph0 SetScaleModeToScaleByScalar
 glyph0 SetColorModeToColorByScalar
 glyph0 SetVectorModeToUseVector
 glyph0 OrientOn
....
Is it possible to do what I want ?
Can anybody help me or send me an example ?
Thanks for help !
Aude
------------------------------------------

Faites un voeu et puis Voila ! www.voila.fr 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040909/4f15641d/attachment.htm>


More information about the vtkusers mailing list