[Insight-users] Bug reading palette grayscale images in
	itkTiffImageIO.cxx
    Christoph Palm 
    christoph.palm at web.de
       
    Mon Aug 30 11:34:43 EDT 2004
    
    
  
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 
    
    
More information about the Insight-users
mailing list