[vtkusers] Using vtkLookupTable to assign an rgb color to each point of a 3D point cloud.

Jeff Baumes jeff.baumes at kitware.com
Mon Mar 30 10:30:59 EDT 2009


Karima,

> I have a 3d model and I have for each point(x,y,z) of my model its texture
> (r,g,b).

Do you mean color? Texture coordinates (i,j) should be assigned using
SetTCoords.

I assume instead you have RGB (0-255) colors for each point. These can
be assigned to a 3-component vtkUnsignedCharArray and added to the
PointData. Name the array, and call

mapper->SetColorModeToDefault();
mapper->SetScalarModeToUsePointFieldData();
mapper->SelectColorArray(name);

Jeff



More information about the vtkusers mailing list