DICOM file compression

My work requires the use of DICOM files. Each DICOM file contains many .dcm files in one directory. I need to send these files over the network, which is somewhat related to the huge file size. I am also a programmer, and I was wondering what is the ideal way to compress such files? I am talking about compression, which will be performed on the local computer and then decompressed on the destination computer (namely, compression is intended solely to speed up data transfer over the network). Is there an easy way to trim DICOM files? (the files contain images of the entire head, while I am only interested in a small part of the head).

Thanks!

+4
source share
4 answers

In the medical context, lossy compression is somewhere between the discouraged and the forbidden. If you insist on cropping existing datasets, the standard requires that you generate at least new identifiers for images and series. The standard allows lossless compression in the jpeg2000 format, but this is quite rare - if I had to bet, I would say that your data set is uncompressed at all.

In my experience, it is much better to compress the medical data set in the form of a solid archive, that is, combine all the images into one stream. This makes a lot of sense, because, as a rule, there are many similarities between neighboring images, and this is a way to use this similarity (unified compression dictionary). This is available as a command line option for both rar and gzip compressors.

+3
source

Decision:

gdcmconv --jpeg uncompressed.dcm compressed.dcm 

or for better compression ratio:

 gdcmconv --jpegls uncompressed.dcm compressed.dcm 

See: http://gdcm.sourceforge.net/html/gdcmconv.html

I would also recommend abandoning lossy compression, you need to be a DICOM wizard to do it correctly (see the derivation mechanism in the DICOM standard). I would also recommend not cropping the image (you will need to restore the UID, update the Frame or Reference ...)

NTN

+2
source

You can use something simple, such as lzma compression at one end, to pack files and send them. This is the easiest solution, since you can capture something like gzip and batch extract files easily programmatically. This can be of great help, as modern computers prefer to transfer / receive one large file over many small files (one 1 GB file will transfer much faster than 10,000 100 KB files).

Regarding the actual reduction in the total size, each .dcm file is probably a slice (if you look at something like MRI or CT data), and the viewer that you use will reconstruct the slices into a three-dimensional image. It is impossible to trim them, but parsing the DICOM format is a bit more complicated. I do not know about any free programs that will help you parse the DICOM files, but I have not been looking for some time.

Since DICOM is a container format, the image data that you use is usually stored in a common format (such as JPEG), so if you can capture the corresponding part of the file to extract image data, you can use any of the image processing tool downloads available to crop the image to any size you choose.

+1
source

We have a compressed router called "DICOM Shrinkinator", which can do this when it transfers the study to PACS:

http://fluxinc.ca/medical/dicom-shrinkinator/

+1
source

Source: https://habr.com/ru/post/1314963/


All Articles