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

ALIZIER Julien AUSY julien.alizier-ausy at irsn.fr
Fri Jun 18 06:55:26 EDT 2004


Hi again,

This file works in ParaView :

<begin>
# vtk DataFile Version 3.0
####
ASCII
DATASET POLYDATA

POINTS 3 float
 0.0  0.0  0.0
 1.0  0.0  0.0
 0.0  1.0  0.0

POLYGONS 1 4
3 0 1 2

POINT_DATA 3
VECTORS colour unsigned_char
 255  0  0
 0  255  0
 0    0 255
<end>

-- 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



More information about the vtkusers mailing list