how to access computation of scalarstocolors mapping

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to access computation of scalarstocolors mapping

kshivann
hi all,
     i would like to color each cell/point in a polydata according to my set of
requirements. right now vtkscalarstocolors function calculates the colors of
the cell/point automatically given the saturation range and scalar range. is
there a way to input rgb values for the cell/point individually.

thanks

kiran

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: how to access computation of scalarstocolors mapping

Deepak Roy Chittajallu

Hi kiran,
 
Did you try using vtkLookUpTable, it lets you define a color for each scalar value.
 
Is that what you wanted.
 
Let me know.
 
Regards,
 
Deepak
 
On 2/8/06, [hidden email] <[hidden email]> wrote:
hi all,
    i would like to color each cell/point in a polydata according to my set of
requirements. right now vtkscalarstocolors function calculates the colors of
the cell/point automatically given the saturation range and scalar range. is
there a way to input rgb values for the cell/point individually.

thanks

kiran

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: how to access computation of scalarstocolors mapping

Deepak Roy Chittajallu
Hi kiran,
 
to my knowledge, vtkLookUpTable does not put any limit over the colors to be added.
 
you can add as many entries to the table as you want.
 
vtkLookUpTable::SetNumberOfTableValues(  );

For each table entry, you can assign any of the 24 million ( 256 red x 256 green x 256 blue rgb combinations ) colors.

In essence you can use all the 24 million colors to the lookup table, and refer to them using a linear color index - which would be your polydata scalars.

Please read the documentation of vtkLookUpTable clearly ---

http://www.vtk.org/doc/nightly/html/classvtkLookupTable.html#45e8946b4f0c250ec9ab8236bcc20a12

Regards,

Deepak Roy

On 2/8/06, [hidden email] <[hidden email]> wrote:

hi,
i guess vtklookuptable lets 256 colors to be defined. is there a limit to
number of colors to be defined. how do i do it if i have more than 256 scalar
values.

kiran

Quoting Deepak Roy <[hidden email]>:

> Hi kiran,
>
> Did you try using vtkLookUpTable, it lets you define a color for each scalar
> value.
>
> Is that what you wanted.
>
> Let me know.
>
> Regards,
>
> Deepak
>
> On 2/8/06, [hidden email] <[hidden email]>
> wrote:
>>
>> hi all,
>>     i would like to color each cell/point in a polydata according to my
>> set of
>> requirements. right now vtkscalarstocolors function calculates the colors
>> of
>> the cell/point automatically given the saturation range and scalar range.
>> is
>> there a way to input rgb values for the cell/point individually.
>>
>> thanks
>>
>> kiran
>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>






_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers