[vtkusers] Graph vertex coloring not working

David Doria daviddoria+vtk at gmail.com
Tue Mar 30 09:00:38 EDT 2010


On Mon, Mar 29, 2010 at 9:42 PM, Jeff Baumes <jeff.baumes at kitware.com> wrote:
> vtkGraphLayoutView does not support a special unsigned char array
> named "color" for coloring vertices. You will need to use an array
> with normal scalar values (e.g. a vtkIntArray) and then use
> vtkViewTheme's point lookup table to set up the proper mapping of
> integers to colors.
>
> Jeff

Hi Jeff,

Isn't that what this function is for:
http://www.vtk.org/doc/nightly/html/classvtkGraphLayoutView.html#a45b37f2ed2ee24681616deea31b98e00

?

I did what you said (using a vtkViewTheme) and it still seems to have
the problem of 2 vertices get colored one color (red) and two another
(green).

The new version is here:

http://www.vtk.org/Wiki/VTK/Examples/Graphs/ColorVertices

Thanks,

David



More information about the vtkusers mailing list