[Ves] How to color polydata with Scalars in VES

Aashish Chaudhary aashish.chaudhary at kitware.com
Tue Feb 25 09:37:58 EST 2014


Bo,

If I remember it correctly, you can name your scalar array "foo" and then
pass that array name to the Kiwi (have a look at the documentation for the
exact signature)

vtkDataArray* da = ....;
da->SetArrayName("foo");



On Tue, Feb 25, 2014 at 9:34 AM, Bo Yu <yubo1983 at gmail.com> wrote:

> Hi, I am so sorry to interrupt again.
> This time I want to paint the polydata with different colors in each
> region. I found there is a method called
> void vesKiwiPolyDataRepresentation::colorByScalars(const std::string&
> arrayName)
> , which seem similar to the one I used before to set color of a polydata
> in VTK.
> polydata->GetCellData()->SetScalars(vtkDataArray *da).
>
> But why the input is a string called arrayName? If you know, Could you
> tell me how to use this method or give me some simple examples?
>
> Thanks in advance.
>
> Bo Yu
>
>
>


-- 
| 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/20140225/59cfb72d/attachment-0003.html>


More information about the Ves mailing list