Re: [Gdcm2] Buffer problem in Qt environment
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Mathieu M. <mat...@gm...> - 2009-06-17 14:31:58
|
On Wed, Jun 17, 2009 at 4:26 PM, Sylvain ADAM<syl...@ho...> wrote: > Yep, that's exactly why I've chosen to use the RGB 24 bits format in 8-8-8, > which displays the image without losing too much information in 8-bits. > > As I didn't know before and I was passing the 16-bits buffer to a RGB16 > format, this is why I had a weird blue-green image. To the best of my knowledge this is NOT a bug. The only reason why this would happen is if the reader failed somehow but you would still try to copy the buffer. Eg: ImageReader ir; ir.SetFileName( ); bool b = ir.Read() assert( b == false ); // programmer should not go any further when imagereader fails Image& i = ir.GetImage(); char *b = new char[ ir.GetBufferLength() ] i.GetBuffer( b ) Use the code ConvertToQImage.cxx and try to make it crash, with any sample dataset you have. If you do, send me that dataset (you can use anything from gdcmData). 2cts -- Mathieu |