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

ALIZIER Julien AUSY julien.alizier-ausy at irsn.fr
Fri Jun 18 03:24:00 EDT 2004


Hi Immo,

I think you are almost there.
Try to use 'unsigned_char' instead of 'float' for your color data and set
them between 0 and 255.

-- Julien



-----Message d'origine-----
De : Immo Trinks [mailto:trinks at esc.cam.ac.uk]
Envoyé : jeudi 17 juin 2004 23:28
À : vtkusers at public.kitware.com
Objet : [vtkusers] How to color objects with RGB/HSV information?


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
---------------------------------------------
_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list