[vtkusers] How to color objects with RGB/HSV information?

Immo Trinks trinks at esc.cam.ac.uk
Thu Jun 17 17:27:39 EDT 2004


Dear vtkUsers and vtkDeveloppers

Could you please help me with the following problem:
I have a polydata set with xyz points and RGB vectors assigned to the points 
(see example below).
How can I color the pixels using RGB or HSV information?
Searching the archives and reading the book I haven't found any example 
explaining the assignment of three color values to an object via a lookup 
table.
I know how to color objects with one scalar value for each object.
But I do not understand how to assign color to objects using three RGB or HSV 
values.
Is it correct to load the RGB information as vector or shall I use scalars?
I could as well provide HSV values instead of RGB if this would make the 
process easier.
Thank you very much for any help!

Immo

---------------------------------------------
# vtk DataFile Version 3.0
####
ASCII

DATASET POLYDATA
POINTS 3 float
 -14.10  29.00  -1.48
 -14.12  27.99  -1.48
 -14.14  27.35  -1.49

POINT_DATA 3
VECTORS colour float
 0.56  0.50  0.44
 0.55  0.50  0.43
 0.55  0.49  0.42
---------------------------------------------



More information about the vtkusers mailing list