[Ves] How to color polydata with Scalars in VES

Aashish Chaudhary aashish.chaudhary at kitware.com
Wed Feb 26 13:41:30 EST 2014


Casey,

On Wed, Feb 26, 2014 at 1:37 PM, Casey Goodlett
<casey.goodlett at kitware.com>wrote:

>
> On Wed, Feb 26, 2014 at 1:30 PM, Aashish Chaudhary <
> aashish.chaudhary at kitware.com> wrote:
>
>>
>> Do this in your code
>>
>> polydata->GetPointData()->SetScalars(colors);
>>
>
> You would also need to update the colors array to contain the same number
> of tuples as vertices (3).
>

In the same code Bo sent us that was the case. His problem was he was not
seeing colors.

- Aashish

>
> If your data is raw RGB tuples as unsigned char rather than something that
> needs to pass through a lookup table, you might need to use
>
> colorByRGBArray()
>
> rather than
>
> colorByScalars()
>

That's a good point.

>
> --
> Casey B. Goodlett, Ph.D.
> R&D Engineer
> Kitware, Inc. - North Carolina Office
> http://www.kitware.com
> (919) 969-6990 x310
>



-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20140226/f619ed31/attachment-0003.html>


More information about the Ves mailing list