[vtkusers] SetColor can not take effect, strange!!

Jianlong Zhou zhou at isg.cs.uni-magdeburg.de
Mon Feb 25 11:16:54 EST 2002


Hi, all,
I met a problem. I want to set a surface color to red. But the SetColor() in vtkActor can not 
take its effect. It is always in blue. But I have never specified the blue color for surface. 
What's the problem? Following is part of my tcl code. Hope any help.


vtkImageShrink3D shrink 
	   shrink SetInput [reader GetOutput]
	   shrink SetShrinkFactors 2 2 2
	   shrink AveragingOn
	   shrink Update

vtkContourFilter  contour  
	   contour SetInput [shrink GetOutput]
	   contour SetValue 0  1087

vtkPolyDataMapper baseMapper
              baseMapper SetInput [contour GetOutput]

vtkActor base
              base SetMapper baseMapper

              ####here specify red color, but cannot take effect
              [base GetProperty] SetColor 1.0  0  0 
              [base GetProperty] SetOpacity 0.5  


best regards,
Jianlong



More information about the vtkusers mailing list