[vtkusers] rendering colored polydata

Anders Wallin anders.e.e.wallin at gmail.com
Thu Apr 29 03:03:31 EDT 2010


> You need to replace
>
> polydata.GetPointData().SetVectors(Colors)
>
> with
>
> polydata.GetPointData().SetScalars(Colors)
>

that's confusing. why are these examples using SetVectors() ?
http://www.vtk.org/Wiki/VTK/Examples/Python/ColoredTriangle
http://www.vtk.org/Wiki/VTK/Examples/ColoredPoints

do they work with some non-default renderer settings?

another thing: when setting the color of an actor like so:
GetProperty().SetColor(color)
the color RGB values seem to be normalized to 1, i.e. red=(1,0,0)

but with polydata it appears red=(255,0,0) ?

AW



More information about the vtkusers mailing list