[vtkusers] Graph vertex coloring not working

Jeff Baumes jeff.baumes at kitware.com
Mon Mar 29 21:42:58 EDT 2010


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

On Sun, Mar 28, 2010 at 1:57 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> I am trying to make a simple tree and color the vertices:
> http://www.vtk.org/Wiki/VTK/Examples/Graphs/ColorVertices
> I am expecting a red, green, blue, and yellow vertex, but instead I am
> seeing two red and two blue vertices.
> Can anyone what I am doing wrong?
> Thanks,
>
> David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list