Compressing the DICOM image using DCMTK

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Jyoti
Posts: 17
Joined: Wed, 2004-12-01, 04:33

Compressing the DICOM image using DCMTK

#1 Post by Jyoti »

What is the command to compress the DICOM image using DCMTK? Can we compress XML DICOM data?

Thanks,
Jyoti

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

What is the command to compress the DICOM image using DCMTK?
dcmcrle for RLE compression and dcmcjpeg for JPEG compression.
Can we compress XML DICOM data?
What do you mean by that?

Jyoti
Posts: 17
Joined: Wed, 2004-12-01, 04:33

#3 Post by Jyoti »

Thanks for the reply.

If I am right, compressing DCM or JPEG images leads to decrease in quality of the image.

Also without compression , the load on the network is quite high while transferring the images from one machine to another on a low bandwidth connection.

Hence I was wondering that to retain the image's quality, I can probably convert the image to xml using dcm2xml and then compress this XML file which is just a text file. I can then transfer this file over the network. On the receiving end, I can de-compress XML file and then convert it back to dcm image. That is why I was asking whether it is possible to compress the XML file.

I don't know what I am thinking is right or not. Please correct me if I am wrong.

Thanks,
Jyoti

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#4 Post by Jörg Riesmeier »

Hence I was wondering that to retain the image's quality, I can probably convert the image to xml using dcm2xml and then compress this XML file which is just a text file. I can then transfer this file over the network. On the receiving end, I can de-compress XML file and then convert it back to dcm image.
The XML format will bloat the size of your file significantly because it uses hexadecimal or base64 encoding for the pixel data. So it's probably better to use the deflated transfer syntax (i.e. ZIP compression) for the DICOM file -- see "dcmconv +td". However, this requires both storage SCU and SCP to support this transfer syntax. A transparent compression during transmission might also be a solution.

Btw, JPEG lossless or JPEG-LS would also be possible but the first one is not really lossless in a mathematical sense as currently implemented in the DCMTK and the second one is not implemented at all. We do have a JPEG 2000 implementation which ensures a lossless compression but this module is not yet available (see other related postings).

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest