[vtk-developers] setting specific colors to vtkPolyData

Miri Trope miritrope at gmail.com
Sat Jan 7 06:28:01 EST 2012


Hi All,

I'm new to vtk and would like to represent some specific colors on my
vtkPolyData by vtkFloatArray.
Until now, I managed to do that in the following way but more colors have
been represented than I wanted (actually, four colors).

//calculating my vtkFloatArray
  myVtkFloatArray->SetNumberOfComponents(1);
  myVtkFloatArray->SetNumberOfValues(numPoints);
  myVtkFloatArray->SetValue(ind, someVal);

//setting this array on mySurface scalars
mySurface->GetPointData()->SetScalars(myVtkFloatArray);

Now, I'd like to set a specific color for each range of values from
myVtkFloatArray and represent less colors then are being represented now
(remove one color from the middle range).

I searched in web and found out that look up table can satisfy my needs,
but I haven't found a method without the use of rendering (mapper, render
window etc). I'd like that the result image would be represented on
orthogonal planes, thus the use of rendering isn't an option.

Any help would be very appreciated.
Miri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120107/e066016f/attachment.html>


More information about the vtk-developers mailing list