How to use the function indexing in vtkGlyph2D

vtkglyph2D have function SetIndexModeToScalar, but how can I pass the index array to vtkglyph2D? I want to show different char using this class.