How to identify whether a dicom image is in compressed format ? And also want to know how to read compressed image pixel data ?
3 Answers
You can use command line tool to dump this type of information, eg gdcminfo:
$ gdcminfo 012345.002.050.dcm
MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage]
TransferSyntax is 1.2.840.10008.1.2.4.70 [JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression]
...
Pay attention that for the case of JPEG 2000 and JPEG-LS the transfer syntax itself is not sufficient to indicate whether or not the Pixel Data stream has been lossy or lossless compressed. This could be important for your organisation as lossy compression could impact professional interpretation.

- 12,152
- 13
- 89
- 158
-
For JPEG-2000 and JPEG-LS there are several formats, part of them are definitely lossless, and some may be lossy and may be lossless. – Adiel Mar 08 '17 at 08:48
Encoding of the data set embedded in a Dicom file (or message) is specified through the transfer syntax UID
tag (0002,0010). There are many types of compressed ones (JPEG, RLE, JPEG Lossless, JPEG 2000, ...)
For more info see section 10 of PS3.5.
As for reading the compressed image data, see the various DICOM libraries, it depends on the language you use of course.

- 86,532
- 28
- 194
- 218
You should parse the dicom stream.
When you reach the tag 0002,0010 then you know the transfer syntax that specifies the format of the dicom stream (high or low endian, implicit or explicit VR) and the compression scheme applied to the image). Up to the tags in the group 0002 included the format is low endian with explicit VR.

- 4,681
- 26
- 38