[vtk-developers] Bug in vtkImageMapToWindowLevelColors.cxx

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Aug 28 10:23:24 EDT 2007


On 8/28/07, Sebastien BARRE <sebastien.barre at kitware.com> wrote:
> At 8/28/2007 09:46 AM, Mathieu Malaterre wrote:
>
> >   Anyway I decided to track down the issue with vtkImageViewer2, and
> >found out what the issue might be (see attached patch).
> >   I am not sure I understand what used to be done before.
>
> What used to be done is what is described in the description of the
> class: the *first* component is mapped through the LUT. If not LUT,
> the input data is passed through, and here the doc is apparently
> talking about the first component, so in the case of anything with
> more than one component is promoted to a gray scale image (hence the
> copying). Changing that would break the behavior of that class IMHO
> (i.e. it would no do what it used to do).
> I did not look at the patch but you did not describe what you would
> implement otherwise.

Oh nevermind, I did not read carefully the documentation. My initial
thought was that I should be able to use vtkImageViewer2 just like I
use vtkImageViewer, where window/level are nicely handled for RGB
images.
Anyway I think the easiest option for me is to simply have my own
version of vtkImageMapToWindowLevelColors within GDCM.

Sorry for the noise,

-- 
Mathieu



More information about the vtk-developers mailing list