Reputation: 8506
How is the flux working with DICOM compression? Do I use any compression algorithm as Deflate for example? And then when I want to load the Image, I uncompress? So If I compress a Dicom file. If I try to open it in another program, it won't be loaded?
Upvotes: 1
Views: 1230
Reputation: 4750
Each Dicom file is composed by a series of tags.
Some tags store the study data, other tags store the patient data, some tags store the image data and properties and so on.
The tags are organized in groups, so each piece of information is identified by a group ID and by a tag ID.
The groups are ordered within the file, and the tags are ordered within the groups.
The first group in the file (usually with ID 2) contains the tag that specifies the transfer syntax: the transfer syntax is a sequence of number that specify the format of the following groups and the compression format used for the images. The group 2 is always stored uncompressed and with the explicit VR little endian transfer syntax.
Most of the compression formats are applied only to the images data: only the deflate compression is applied to all the groups and tags
When a dicom reader wants to read a file, it just need to parse the first tags to understand the transfer syntax of the following tags and compression scheme used for the images or file.
Upvotes: 1
Reputation: 90276
There are different compression algorithms for DICOM: deflate, jpeg or jpg2000, or others.
Your library is likely to provide proper option on output to set the compression accordingly, so dig in the docs or example. When you load it in another software, compression will be recognized and file properly loaded.
Upvotes: 1