[vtkusers] Specify color of a vtkPolyData object
David E DeMarle
dave.demarle at kitware.com
Wed Apr 21 15:27:30 EDT 2010
David is right, there is no built in way to make that happen
automatically in VTK.
You could however put the chosen color in the PolyData's field data
array set., and then it will be up to your code to retrieve that and
tell the Actor to use it as its color.
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109
On Wed, Apr 21, 2010 at 3:13 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Wed, Apr 21, 2010 at 11:49 AM, Xiaofeng Z <xf10036 at hotmail.com> wrote:
>> Thanks for your response. But I creates poly data in a class other than the
>> class that creates actors. I would like to let poly data object to carry
>> the color information. Is it possible to specify one color for the entire
>> poly data? I don't need to specify color for each point or cell, etc.
>>
>> Thanks!
>>
>> Xiaofeng Z
>
> Nope. Either color the actor, or color all of the points of the
> polydata the same color. It is even more abstract than that, you are
> not assigning the polydata colors, you are simply adding an array of
> colors and then telling later filters that you want to interpret those
> values as colors.
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK 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