[Ves] How to color polydata with Scalars in VES
Bo Yu
yubo1983 at gmail.com
Mon Mar 3 11:01:19 EST 2014
Yes, the colors are blended. Thank you, It sounds reasonable to color
duplicate points of the triangles, but is that means I have to regenerate
the polydata? I will try it tomorrow (Tokyo time ;)
Bo Yu
On Tuesday, March 4, 2014, Casey Goodlett <casey.goodlett at kitware.com>
wrote:
> Is the problem that colors are being blended across the triangles? If so,
> you need to duplicate the vertices such that each triangle is defined by
> three unique vertices (its ok to have multiple vertices with the same XYZ
> locations).
>
> Let me know if that makes sense.
>
> Thanks
>
>
> On Mon, Mar 3, 2014 at 10:48 AM, Bo Yu <yubo1983 at gmail.com<javascript:_e(%7B%7D,'cvml','yubo1983 at gmail.com');>
> > wrote:
>
>> Thank you for your information, Casey, the color do appear, but it seems
>> that was colored "vertex by vertex", not as I expected: "cell by cell".
>> I am using bitbucket with my colleagures. I'll try to create a new repo
>> in github to let you see.
>>
>> Bo Yu
>>
>>
>> On Tuesday, March 4, 2014, Casey Goodlett <casey.goodlett at kitware.com<javascript:_e(%7B%7D,'cvml','casey.goodlett at kitware.com');>>
>> wrote:
>>
>>>
>>> On Mon, Mar 3, 2014 at 12:42 AM, Bo Yu <yubo1983 at gmail.com> wrote:
>>>
>>>>
>>>> pd->GetPointData()->SetScalars(colorTable);//color works like on each
>>>> vertexes and scalar, color table is an vtkUnsignedCharArray which contains
>>>> same tuples as vertexes number.
>>>> //pd->GetCellData()->SetScalars(colorTable);//no color at all, color
>>>> table is an vtkUnsignedCharArray which contains same tuples as cells number.
>>>>
>>>>
>>>
>>> Bo,
>>>
>>> Once you you run the filter you should not overwrite the scalars as done
>>> on these lines.
>>>
>>> If you already built your colorTable for the vertices you dont need to
>>> use the CellDataToPointData filter at all just set directly as point data.
>>>
>>> Is your problem that colors dont appear or they are not as you intended?
>>>
>>> Can you share how you have constructed your colorTable? Is your code
>>> anywhere public like github that we could look at?
>>>
>>> Thanks
>>>
>>> --
>>> Casey B. Goodlett, Ph.D.
>>> R&D Engineer
>>> Kitware, Inc. - North Carolina Office
>>> http://www.kitware.com
>>> (919) 969-6990 x310
>>>
>>
>
>
> --
> Casey B. Goodlett, Ph.D.
> R&D Engineer
> Kitware, Inc. - North Carolina Office
> http://www.kitware.com
> (919) 969-6990 x310
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20140304/f9f866e2/attachment-0003.html>
More information about the Ves
mailing list