[Insight-users] Bug reading palette grayscale images in itkTi ffImageIO.cxx

Lorensen, William E (Research) lorensen at crd.ge.com
Tue Aug 31 08:47:29 EDT 2004


Christoph,
Do you have a sample image stored as a grayscale palette? Now that the bug
has been fixed, we could make a regression test for that image type.

Bill

-----Original Message-----
From: Christoph Palm [mailto:christoph.palm at web.de]
Sent: Monday, August 30, 2004 11:35 AM
To: insight-users at itk.org
Subject: [Insight-users] Bug reading palette grayscale images in
itkTiffImageIO.cxx


Hi all,

after problems with reading grayscale palette tif images
(the result was always black),
I found a posting of Maik Flanagin in the vtk users list.
There, he suggested a bug fix for RGB palette images. Now
I know, the same has to be done for grayscale palette images:

In the method

int TIFFImageIO::EvaluateImageAt( void* out, void* in )

I changed the following:

   case TIFFImageIO::PALETTE_GRAYSCALE:
      this->GetColor(*source, &red, &green, &blue);
      *image = static_cast<unsigned char>(red >> 8);

Now all works fine. I suggest to change this in the
itk source distribution.

Regards,

	Christoph 

_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list