[vtkusers] How do I control the color of a surface?

Ilan ilan.tal at gmail.com
Mon Mar 12 08:42:40 EDT 2012


I have an initial program going with a Java wrapper which gives me contours,
of the skin or bones or both.

What I think is the relevant code segment is:
		vtkPolyDataMapper map1 = new vtkPolyDataMapper();
		map1.SetInput(skinNormals.GetOutput());
		map1.SetImmediateModeRendering(1);
		
		actor1 = new vtkActor();
		actor1.SetMapper(map1);
		actor1.GetProperty().SetColor(0, 1.0, 0);

Without the last line for setting the color what I receive is a red surface
for values below 1000 and a blue surface for values above 1000. This is
fine, but I thought I'd try making it a green surface, so I added the
SetColor line. It ignores me completely and I don't know why. Can anyone
give me a hint?
Thanks,
Ilan


--
View this message in context: http://vtk.1045678.n5.nabble.com/How-do-I-control-the-color-of-a-surface-tp5557606p5557606.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list