dicom

Getting started with dicom

Remarks#

This section provides an overview of what dicom is, and why a developer might want to use it.

It should also mention any large subjects within dicom, and link out to the related topics. Since the Documentation for dicom is new, you may need to create initial versions of those related topics.

DICOM stands for D-igital I-maging and CO-mmunications in M-edicine. It consists of three main parts;

  1 - a file format for images and reports
  2 - a set of defined services 
  3 - a network protocol

and several standards related to creating, storing and exchanging the files (1) by using the services (2) over the network protocol (3).

DICOM is used in all modern medical imaging equipment so developers creating software for use in medicine must use the standard in order to operate in environments with other medical equipment and software.

Installation or Setup

Detailed instructions on getting dicom set up or installed.

Understanding the DICOM File Format

The DICOM Image file is a tagged image file; the file contains both an image (most of the time) and a collection of data about the image. The data in a DICOM image file is stored as a sequence of individual elements. Each element contains one item of information about the image or the image itself. DICOM elements are binary, so DICOM files cannot be viewed with a text editor.

DICOM elements have several components. These are;

tag - a number which identifies the type of element
data type - a description of the data type of the data in the element
length - the number of bytes of data in the 
data - the data stored in the element

an example;

0010,0010 PN 12 Elemans^John

In this example the tag is broken into two parts, the group and element numbers. Group and element numbers will be explained elsewhere. It is important to note that the above example is an ASCII representation of the example element. In hex it appears as follows;

10001000 504E0C00 454C454D 414E535E 4A4F484E

Note the byte order in the tag and element length, it can be either in an actual file. So the parts are;

tag - 10001000 = 00100010 or 0010,0010
type - 504E = PN
length - 0C00 = 12
data - 54C454D 414E535E 4A4F484E = Elemans^John

All elements in a DICOM file are stored in ascending sequence of tag numbers.

Note that the data type PN is not just a string type. DICOM specifies types which are more complex than simple programming types. PN defines the layout of the string in order to indicate the name parts etc.

As mentioned, the image data itself is just another element in a DICOM file. The image data element is the last element in a file and looks like this;

tag - 7FE0,0010
type - OB or OW (other Byte or other Word)
length - depends on the image
data - binary data for the image

Because DICOM allows a wide variety of image data formats, one cannot simply read the last tag and display it. Other elements describe the image size, bits per pixel, colour data etc.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow