[Ves] How to color polydata with Scalars in VES

Casey Goodlett casey.goodlett at kitware.com
Mon Mar 3 10:51:32 EST 2014


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> 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>
> 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/20140303/300e2d6f/attachment-0003.html>


More information about the Ves mailing list