ananth_adroit
ananth_adroit

Reputation: 347

Identify Compressed DICOM image by tag

How to identify whether a dicom image is in compressed format ? And also want to know how to read compressed image pixel data ?

Upvotes: 10

Views: 10734

Answers (3)

Paolo Brandoli
Paolo Brandoli

Reputation: 4750

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.

Upvotes: 0

malat
malat

Reputation: 12490

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.

Ref: http://gdcm.sourceforge.net/html/gdcminfo.html

Upvotes: 6

CharlesB
CharlesB

Reputation: 90276

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.

Upvotes: 4

Related Questions