[vtkusers] Question with vtkImageViewer2

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Oct 27 05:19:04 EDT 2008


Hi Ken,

On Mon, Oct 27, 2008 at 2:36 AM, Ken Urish <ken.urish at gmail.com> wrote:
> Mathieu
>
> Im finally getting around to tackle the problem of imageViewer2 not
> handling rgb or greyscale bigger than unsigned char. I appreciate your
> post from August. After looking at your code, I had a question or two:
>
> 1) Do I use your vtkImageMapToWindowLevelColors2 as a helper class -
> ie I feed the image through this class and then send the output to
> vtkImageViewer2? I downloaded gdcm and I dont see it in the code so
> its a bit trickey to figure out how to use it. Could you point me to a
> place in gdcm where it's used?

$ cd gdcm
$ grep -r vtkImageMapToWindowLevelColors2 *
...
Utilities/VTK/vtkImageColorViewer.cxx:
vtkImageMapToWindowLevelColors2 *WindowLevel     =
vtkImageMapToWindowLevelColors2::New();

Then:

$ grep -r vtkImageColorViewer *
Utilities/VTK/Applications/gdcmviewer.cxx

Have a look at tha app (quite complex though).

searching for vtkImageColorViewer on the web; also reveal:
http://code.google.com/p/devide/source/browse/trunk/devide/modules/viewers/DICOMBrowser.py

hope that's enough, otherwise drop a note on gdcm mailing list.

> 2) Also, why does remapping it allow imageViewer2 to display colors?
> I'm new to itk so i could not see this in the code.

s/itk/vtk/g

Did you read & understand my post:
http://www.vtk.org/pipermail/vtk-developers/2007-August/004687.html

imageViewer2 display colors just fine, it's just the window/level'ing
that discard all but the first component.

HTH
-- 
Mathieu



More information about the vtkusers mailing list