[vtkusers] vtkLODActor->GetProperty()->SetColor() does not maintain the input color?
David E DeMarle
dave.demarle at kitware.com
Fri Mar 2 15:25:20 EST 2012
Those should be normalized 0.0 to 1.0. Divide each of yours by 255.
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Fri, Mar 2, 2012 at 3:20 PM, Hong Yi <hongyi at renci.org> wrote:
> StructColors is defined as static variable and predefined as follows:
>
> double QtVTKApp::StructColors[][3] = { // each color corresponds to a loaded structure - use red (255, 0, 0) as highlight color
> {0, 255, 0}, {255, 128, 0},
> {0, 128, 255}, {190, 174, 212}, {255, 255, 255},
> ... // many other color RGB values predefined are omitted here
> }
>
> I am on a tight deadline to write a paper draft in the next couple of weeks, but will provide a small compilable example that illustrates the problem if this problem does not get addressed by then. I will follow up on this when I've got time. In the meanwhile, let me know if you have any other suggestions for possibly fixing this problem.
>
> Many thanks,
>
> Hong
>
> -----Original Message-----
> From: Bill Lorensen [mailto:bill.lorensen at gmail.com]
> Sent: Friday, March 02, 2012 1:39 PM
> To: Hong Yi
> Cc: David E DeMarle; VTK Users
> Subject: Re: [vtkusers] vtkLODActor->GetProperty()->SetColor() does not maintain the input color?
>
> What is StructColors and how is it initialized?
> Can you provide a small compilable example that illustrates the problem. Maybe use a singe sphere for each actor.
>
> Bill
>
> On Fri, Mar 2, 2012 at 11:26 AM, Hong Yi <hongyi at renci.org> wrote:
>> A little bit more experimental results on this:
>>
>> Looks like the orange color (255, 128, 0) changes to yellow (255, 255, 0) (with green component bumped up to 255), the bluish color (0, 128, 255) changes to cyan (0, 255, 255) (again with green component bumped up to 255). The red color (255, 0, 0) and the pick color (255, 0, 255) will be preserved though. Hopefully this bit of experiment observation could provide some kind of clues on this...
>>
>> Thanks,
>>
>> Hong
>>
>> -----Original Message-----
>> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
>> Behalf Of Hong Yi
>> Sent: Friday, March 02, 2012 11:12 AM
>> To: David E DeMarle
>> Cc: VTK Users
>> Subject: Re: [vtkusers] vtkLODActor->GetProperty()->SetColor() does not maintain the input color?
>>
>> See attached image with opacity set to 1.0. There are still the same kind of color mismatch (orange->yellow)...
>>
>> Looking forward to further insight on this.
>>
>> Thanks,
>>
>> Hong
>>
>> -----Original Message-----
>> From: David E DeMarle [mailto:dave.demarle at kitware.com]
>> Sent: Friday, March 02, 2012 11:05 AM
>> To: Hong Yi
>> Cc: Jothybasu Selvaraj; VTK Users
>> Subject: Re: [vtkusers] vtkLODActor->GetProperty()->SetColor() does not maintain the input color?
>>
>> On Fri, Mar 2, 2012 at 10:56 AM, Hong Yi <hongyi at renci.org> wrote:
>>> Actor->GetProperty()->SetOpacity(0.6);
>>
>> I'ld think this should just be making things things darker for the most part in this scene, but what happens if you change to 1.0 to turn of translucency?
>> _______________________________________________
>> 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
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
More information about the vtkusers
mailing list