This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, September 12, 2014 12:47:02 AM(UTC)
Groups: Registered
Posts: 2
How can I compress DICOM overlay data (6000:3000) image?
I am saving DICOM images as J2K, however the overlay image data remains uncompressed.
I have tried compressing the overlay data explicitly using RLE:
private RasterImage compressOverlay(RasterImage image)
{
var cmd = new ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType.ShiftNegativeToZero);
if (image.OverlayCount > 0)
{
for (var overlayIndex = 0; overlayIndex < image.OverlayCount; overlayIndex++)
{
var overlayImage = image.GetOverlayImage(overlayIndex, RasterGetSetOverlayImageMode.Copy);
cmd.Run(overlayImage);
overlayImage.ChangeCompression(RasterCompression.Rle);
image.SetOverlayImage(overlayIndex, overlayImage, RasterGetSetOverlayImageMode.Copy);
}
}
return image;
}
However, upon saving the above image into DICOM dataset, the OverlayData element becomes uncompressed.
How can I persist the compressed overlay image to DICOM dataset? Better yet, is there any way to convert overlay images to J2K/JPG format? Section 8 (https://www.dabsoft.ch/dicom/5/8/) seems to indicate overlay data can be compressed.
#2
Posted
:
Sunday, September 14, 2014 4:37:31 AM(UTC)
Groups: Registered
Posts: 256
brass9,
According to the DICOM Standard, overlay data is just uncompressed 1-bit image. It can't be compressed.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.