[vtk-developers] Incorrect color function in vtkImageMapToWindowLevelColors with lookupTable

David Gobbi david.gobbi at gmail.com
Wed May 30 16:55:29 EDT 2018


According to the VTK testing dashboard, removing the "color modulation"
code does not cause any VTK to fail, see the "CDash" link on the following
page:
https://gitlab.kitware.com/vtk/vtk/merge_requests/4350

So there isn't any code in VTK that relies on the old behavior of
vtkImageMapToWindowLevelColors.  I also looked at the image rendering code
in 3D Slicer.  Interestingly, it uses this class without a lookup table,
and then applies a lookup table to the resulting 8-bit data (so a two-stage
process, vtkImageMapToWindowLevelColors to generate 8-bit data, followed by
vtkImageMapToColors with a 256-entry lookup table to generate color data).
So apparently the Slicer folks found the LUT behavior of this class to be
not useful, and had to added extra stage to their pipeline to apply the LUT.

Does anyone out there use the color modulation feature of
vtkImageMapToWindowLevelColors?

 - David


On Wed, May 30, 2018 at 8:56 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> Hi Victor,
>
> I have updated the vtkImageMapToWindowLevelColors documentation according
> to my understanding of how it works:
> https://www.vtk.org/doc/nightly/html/classvtkImageMapToWindowLevelC
> olors.html
> Honestly I think the class would be better without the "color modulation"
> feature.  If you are displaying grayscale, you can use the class without a
> lookup table.
>
> It might be possible to set GL_UNSIGNED_INT_2_10_10_10_REV in VTK if you
> make your own frame buffer object, but you can't use it with any of the
> usual image viewers or image mappers that are already in VTK, since they
> all assume 8 bits per color component for the display.  The luminance via
> RGB trick should work fine if you have a suitable grayscale monitor with
> RGB input.
>
>  - David
>
>
>
> On Tue, May 29, 2018 at 3:21 AM, xVict <suharev at roentgenprom.ru> wrote:
>
>> Hi David,
>>
>> To test the vtkImageMapToWindowLevelColors class the sources was uploaded
>> on
>> GitHub:
>> https://github.com/xThorn/vtk-tests
>> See mapToWLC folder.
>>
>> By first item: can I set texture type GL_UNSIGNED_INT_2_10_10_10_REV?
>>
>> In https://www.vtk.org/Wiki/VTK/Image_Rendering_Classes
>>
>> Many greyscale monitors with DVI inputs use the equation L = 0.30*R +
>> 0.59*G
>> + 0.11B to convert the 24-bit RGB DVI signal into a greyscale signal. For
>> such monitors, it is possible to create a vtkLookupTable with 4096 entries
>> that provides distinct greyscale values via appropriately-chosen RGB
>> values.
>>
>> This method works through GDI.
>>
>> Victor.
>>
>>
>>
>> --
>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Dev-f1251487.html
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> https://vtk.org/mailman/listinfo/vtk-developers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtk-developers/attachments/20180530/cfca5642/attachment.html>


More information about the vtk-developers mailing list