[vtkusers] Help! scalar colors to RGB colors
-Daniel-
ich_daniel at habmalnefrage.de
Wed Mar 5 16:13:32 EST 2014
Thanks, this is helpful!
But only colors {red, green, blue} with the red-value greater than 0.5 will
be displayed.
//code snippet
..
vtkLookupTable lut = new vtkLookupTable();
lut.SetNumberOfTableValues(2);
lut.Build();
lut.SetTableValue(0, oldColor[0], oldColor[1], oldColor[2], 1);
lut.SetTableValue(1, newColor[0], newColor[1], newColor[2], 1); // <- only
colors with red >0.5
vtkPolyDataMapper mapper = new vtkPolyDataMapper();
mapper.SetInputData(polydata);
mapper.SetScalarModeToUsePointData();
mapper.ScalarVisibilityOn();
mapper.SetScalarRange(0, 1);
mapper.SetLookupTable(lut);
..
// end of code snippet
--
View this message in context: http://vtk.1045678.n5.nabble.com/Help-scalar-colors-to-RGB-colors-tp5726198p5726207.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list