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

Koning, P.J.H. de (LKEB) P.J.H.de_Koning at lumc.nl
Mon Feb 25 11:28:47 EST 2002


25-02-02 17:16:54, "Jianlong Zhou" <zhou at isg.cs.uni-magdeburg.de> wrote:

>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.
>
Some part, probably the contourFilter is generator scalar information. Use

baseMapper=>ScalarVisibiltyOff();

and then the colors should work.

>
>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
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-
bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>





More information about the vtkusers mailing list