- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think there is a bug in the IPP samples (ipp-samples.8.0.0.005), dicom.cpp, function ReadImageRLE().
With 16-bit RLE-encoded data, the bug surfaces:
if(precision > 8)
{
ippsSwapBytes_16u_I((Ipp16u*)decData, width * height);
image.CopyFrom((Ipp16s*)decData, step, roi); // BUG
}
else
image.CopyFrom(decData, step, roi);
The step parameter is wrong. It is a copy of image.Step(), and it should be the step of the decData buffer, which is width*2.
The bug presents itself with either scanline mismatches in the resulting image, or with an AV because of buffer overflow.
Also, possibly Ipp16u should be used in CopyFrom, since pixels are usually 16u. Otherwise, the Dicom tag Pixel Representation should be used to determine if the pixels are signed or not.
Suggestion:
image.CopyFrom((Ipp16u*)decData, width*2, roi);
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Thomas,
Many thanks for finding this. Unfortunately, it is impossible for us to update the samples, because we are stopping support of UIC/Picnic samples, due to changed priorities to GPU support mostly.
Regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have understood that samples are end-of-life, but I also posted about that in the sticky note.
Just curious!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page