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

Christoph Palm christoph.palm at web.de
Tue Aug 31 09:29:39 EDT 2004


Hi Bill,

next try, the image was to large for sending!

Regards,

	Christoph

Am Die, den 31.08.2004 schrieb Lorensen, William E (Research) um 14:47:
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.TIF
Type: image/tiff
Size: 13238 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040831/b9ed9441/sample.tiff


More information about the Insight-users mailing list