12 DICOM Images

12.1 The DICOM file format

For a complete description of the DICOM format, see the specification page at

http://medical.nema.org/standard.html

which provides a brief description. Another excellent resource is the blog by Roni Zaharia:

http://dicomiseasy.blogspot.ca/

Each DICOM file contains a number of concatenated attributes (a.k.a. elements), one of which defines the embedded binary image pixel data. The other attributes act as meta-data, which can contain identity information of the subject, equipment settings when the image was acquired, spatial and temporal properties of the acquisition, voxel spacings, etc.... The image data typically represents one or more 2D images, concatenated, representing slices (or ‘frames’) of a 3D volume whose locations are described by 13.5 the meta-data. This image data can be a set of raw pixel values, or can be encoded using almost any image-encoding scheme (e.g. JPEG, TIFF, PNG). For medical applications, the image data is typically either raw or compressed using a lossless encoding technique. Complete DICOM acquisitions are typically separated into multiple files, each defining one or few frames. The frames can then be assembled into 3D image ‘stacks’ based on the meta-information, and converted into a form appropriate for display.

Table 12.1: A selection of Value Representations
VR Description
CS Code String
DS Decimal String
DT Date Time
IS Integer String
OB Other Byte String
OF Other Float String
OW Other Word String
SH Short String
UI Unique Identifier
US Unsigned Short
OX One of OB, OW, OF

Each DICOM attribute is composed of:

  • a standardized unique integer tag in the format (XXXX,XXXX) that defines the group and element of the attribute

  • a value representation (VR) that describes the data type and format of the attribute’s value (see Table 12.1)

  • a value length that defines the length in bytes of the attribute’s value to follow

  • a value field that contains the attribute’s value

This layout is depicted in Figure 12.2. A list of important attributes are provided in Table 12.2.

Tag VR Value Length            Value Field
Figure 12.2: DICOM attribute structure
Table 12.2: A selection of useful DICOM attributes
Attribute name VR Tag
Transfer syntax UID UI 0x0002 , 0x0010
Slice thickness DS 0x0018 , 0x0050
Spacing between slices DS 0x0018 , 0x0088
Study ID SH 0x0020 , 0x0010
Series number IS 0x0020 , 0x0011
Aquisition number IS 0x0020 , 0x0012
Image number IS 0x0020 , 0x0013
Image position patient DS 0x0020 , 0x0032
Image orientation patient DS 0x0020 , 0x0037
Temporal position identifier IS 0x0020 , 0x0100
Number of temporal positions IS 0x0020 , 0x0105
Slice location DS 0x0020 , 0x1041
Samples per pixel US 0x0028 , 0x0002
Photometric interpretation CS 0x0028 , 0x0004
Planar configuration (color) US 0x0028 , 0x0006
Number of frames IS 0x0028 , 0x0008
Rows US 0x0028 , 0x0010
Columns US 0x0028 , 0x0011
Pixel spacing DS 0x0028 , 0x0030
Bits allocated US 0x0028 , 0x0100
Bits stored US 0x0028 , 0x0101
High bit US 0x0028 , 0x0102
Pixel representation US 0x0028 , 0x0103
Pixel data OX 0x7FE0 , 0x0010