[vtk-developers] New vector modes for vtkScalarsToColors

David Gobbi david.gobbi at gmail.com
Tue Mar 1 13:20:58 EST 2011


I've pushed my vtkScalarsToColors changes to VTK's git master,
so it is best if you start from there and then push your changes
to gerrit or just email a patch to the list.

 - David


On Tue, Mar 1, 2011 at 11:11 AM, Arnaud GELAS
<arnaud_gelas at hms.harvard.edu> wrote:
> David,
>
> This is something we would need anyway for our project.
> So we would be happy to contribute such a feature to VTK!
>
> Where is it developed?
> on your github's fork? which branch?
>
> Thanks,
> Arnaud
>
> On 03/01/2011 11:10 AM, David Gobbi wrote:
>>
>> Yes, the thought has crossed my mind... I've had to work with
>> multi-channel images in the past.
>>
>> These methods could be added to vtkScalarsToColors:
>>   SetVectorModeToIndependent()
>>   SetLookupTableForChannel(vtkScalarsToColors *colors, int channel)
>>
>> When in this Independent mode, each component could be mapped through
>> one of the "child" lookup tables.  The colors from each channel would
>> then be summed and clamped.
>>
>> If you are willing to add a feature like this, I'll gladly help to get
>> it integrated.
>>
>>  - David
>>
>>
>> On Tue, Mar 1, 2011 at 8:27 AM, Arnaud GELAS
>> <arnaud_gelas at hms.harvard.edu>  wrote:
>>>
>>> David,
>>>
>>> Currently, in the field of microscopy we can have up to 32 channels
>>> (components) images, and for each channel we have an associated color.
>>> (Although, most of the time people use less than 6 channels.)
>>>
>>> Do you think it would be possible to make a more general mode for such
>>> color
>>> spaces?
>>>
>>> Arnaud
>>>
>>> On 02/28/2011 12:39 PM, David Gobbi wrote:
>>>>
>>>> Hi All,
>>>>
>>>> I'm in the process of adding more VectorModes to vtkScalarsToColors.
>>>> Right now it supports:
>>>>   Component - map one vector component through the table
>>>>   Magnitude - map the vector magnitude through the table
>>>>
>>>> However, I have to deal with multi-component data that is already
>>>> color data.  When I apply a vtkLookupTable, I want it to automatically
>>>> treat multi-component data as color data, and only apply the lookup
>>>> when it receives single-component data. So I've added the following
>>>> vector mode:
>>>>   RGBColors - if input is multi-component, convert to unsigned char
>>>>
>>>> Mathieu has already requested modes for YCbCr and other color
>>>> spaces, which vtkScalarsToColors could convert on-the-fly to
>>>> RGB.  To me, it makes sense to have all the conversions handled
>>>> in vtkScalarsToColors so that they can be shared by the Imaging
>>>> and Graphics pipelines.
>>>>
>>>> Any comments/questions?
>>>>
>>>>  - David
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>>
>>>
>
>



More information about the vtk-developers mailing list