[vtkusers] How to Assign RGB to Each Cell

David E DeMarle dave.demarle at kitware.com
Tue Jan 2 17:15:49 EST 2007


Create a vtkUnsignedChar array with 3 components and 100 tuples.
Set each of those 300 values with your color components. Then have
tell the mapper to use that array to color by.

cheers
Dave DeMarle

On 1/2/07, Li Qichong <txqcl at hotmail.com> wrote:
> Hi, VTK GURU
>     I have a question for assigning RGB to each cell. Assuming we have
> 10x10 cells, each cell has three components: A1,A2 and A3 and A1 is
> corresponding to Red, A2 to green and A3 to Blue. So How can I assign RGB
> to each cell?
> Thanks for help.
> Qi
>
> _________________________________________________________________
> 与世界各地的朋友进行交流,免费下载  Live Messenger;
> http://get.live.com/messenger/overview
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>


More information about the vtkusers mailing list