[Dcmlib] Bug in ComputeRLEInfo

jean-michel.rouet at philips.com jean-michel.rouet at philips.com
Mon Nov 15 11:50:08 CET 2004


Hi all,

I think there is a bug in ComputeRLEInfo.

      uint32_t rleSegmentOffsetTable[15];
      for( int k = 1; k <= 15; k++ )
      {
         rleSegmentOffsetTable[k] = ReadInt32();
      }

should be replaced by

      uint32_t rleSegmentOffsetTable[15];
      // for( int k = 1; k <= 15; k++ )
      for( int k = 1; k <= nbRleSegments; k++ )
      {
         rleSegmentOffsetTable[k] = ReadInt32();
      }


TestReadWriteReadCompare was always failing on acuson RLE encoded images.

Now this test only fails with pixel deiffer (as expanded in memory) with:
        gdcm-jpeg-losslessthoravision.dcm
        kodak-12-mono1-odd_terminated_sequence.dcm
and some warnings are displayed with 
        PHILIPS_Integris_H-8-MONO2-Multiframe.dcm
as
   Testing: ../gdcmData/PHILIPS_Integris_H-8-MONO2-Multiframe.dcm
           step 1 ...Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: 1 extraneous bytes before marker 0xd9
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: 2 extraneous bytes before marker 0xd9
2...3...4...OK.

JM

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20041115/32451968/attachment.html>


More information about the Dcmlib mailing list