View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001843VTK(No Category)public2005-05-11 15:412016-08-12 09:54
ReporterMark Wyszomierski 
Assigned ToWill Schroeder 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001843: vtkImageMapToWindowLevelColors can do win/level on RGB data with no LUT
DescriptionIn vtkImageMapToWindowLevelColors, if there is no lookup table but the input image data is RGB/RGBA, all the color channel data is set to the same win/level, making it appear greyscale when drawn to screen (at least through vtkImageViewer2 anyways).

Instead, in this case where there is no LUT but the image data is in the RGB/RGBA format, can we just do the scaling per component so that the color data is retained:

*optr = result_val;
case VTK_RGB:
    *(optr+1) = result_val;
    *(optr+2) = result_val;

to:

unsigned char rgb_lvl[3];

case VTK_RGB:

    for (int i = 0; i < 3; i++) {
        if (*(iptr + i) <= lower) {
            rgb[i] = lower_val;
        }
        else if (*(iptr + i) >= upper) {
            rgb[i] = upper_val;
        }
        else {
            rgb[i] = (unsigned char) ((*(iptr + i) + shift)*scale);
        }
    }
    *(optr+0) = rgb_lvl[0];
    *(optr+1) = rgb_lvl[1];
    *(optr+2) = rgb_lvl[2];
    break;

and so forth for RGBA/LUMINANCE cases. I just put that in to see if it works and the output looks ok.
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0036785)
Kitware Robot (administrator)
2016-08-12 09:54

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:54 Kitware Robot Note Added: 0036785
2016-08-12 09:54 Kitware Robot Status expired => closed
2016-08-12 09:54 Kitware Robot Resolution open => moved


Copyright © 2000 - 2018 MantisBT Team