[vtkusers] color vtkTensorGlyph

Berenschot, G. G.Berenschot at student.tue.nl
Mon Oct 14 09:14:44 EDT 2002


Dear vtkUsers,

I have a problem with coloring vtkTensorGlyphs. The glyphs are created
correctly, but the color of the glyps is always red. I create a structured
point dataset with as attributes tensors and scalars(color). The attribute
scalar data is an vtkUnsignedChar array which is the color that I want to
give the glyphs. 

tensorPlane->GetPointData()->SetTensors(tensors);
tensorPlane->GetPointData()->SetScalars(scalars);

With this dataset I create the tensorglyphs. 

tensorGlyph->ColorGlyphsOn();
tensorGlyph->SetInput(tensorPlane);
tensorGlyph->SetSource(cube->GetOutput());
tensorGlyph->SetScaleFactor(0.0015);

Is there anybody who has an idea what is going wrong???

Kind regards,
Guus




More information about the vtkusers mailing list