Skip to content
SimpleTools24

What Is a DICOM File? Inside the .dcm Format

By SimpleTools24Published 4 min read

A DICOM file (usually .dcm) is a medical image stored in the Digital Imaging and Communications in Medicine format, the international standard used by CT and MRI scanners, X-ray systems, ultrasound machines and hospital imaging archives. Each file combines the image pixels with a large set of labelled metadata: who the patient is, how and when the image was acquired, and how it relates to other images in the same examination. That bundling is what makes DICOM different from a JPEG or PNG.

Why Medical Imaging Needs Its Own Format

A photo format only has to store pixels and a little camera information. Medical images need much more:

  • Clinical context: patient identity, referring physician, body part, study date.
  • Acquisition details: modality, slice thickness, pixel spacing, scanner settings.
  • Precise pixel values: CT values map to tissue density in Hounsfield units, so values must be stored exactly, often with 12 or 16 bits per pixel rather than 8.
  • Relationships: which images form a series, and which series form a study.

DICOM also defines how imaging systems exchange data over a network, but this article focuses on the file.

The Structure of a .dcm File

Preamble and Prefix

A standard DICOM file begins with a 128-byte preamble, often all zeros, followed by the four characters DICM. That signature at byte 128 is how software recognises the format; see file signatures and magic numbers for how this compares with other formats.

File Meta Information

Next comes a small group of elements describing the file itself, most importantly the Transfer Syntax UID, which tells a reader how the rest of the file is encoded.

The Data Set: Tags and Values

The bulk of the file is a sequence of data elements. Each has:

  • A tag, written as two hexadecimal numbers (group,element), such as (0010,0010) for Patient's Name.
  • A value representation (VR), a two-letter code for the data type, like PN for person name, DA for date, DS for decimal string or US for unsigned short.
  • A length and the value itself.
Examples of common DICOM tags
TagNameExample value
(0008,0060)ModalityCT
(0010,0010)Patient's NameDOE^JANE
(0018,0050)Slice Thickness1.25
(0020,000D)Study Instance UID1.2.840.113619.2.55...
(0020,000E)Series Instance UID1.2.840.113619.2.55...
(0020,0013)Instance Number42
(0028,0010)Rows512
(0028,0030)Pixel Spacing0.7\0.7
(7FE0,0010)Pixel Data(the image)

Note the person name format, with ^ separating family and given names, and the backslash separating multiple values.

Studies, Series and Instances

DICOM organises images in a hierarchy, each level with its own globally unique identifier (UID):

  • Study: one examination, such as "CT abdomen on a given date". Identified by the Study Instance UID.
  • Series: one set of images within the study, such as the axial slices with contrast. Identified by the Series Instance UID.
  • Instance: one file, usually one image or slice. Identified by the SOP Instance UID.

This is why a CD from a hospital can hold thousands of files with cryptic names: the viewer reassembles them using these UIDs, not the file names. SimpleTools24's online DICOM viewer does exactly this, grouping by study and series UIDs and ordering slices by instance number.

Transfer Syntaxes: Why Some Files Won't Open

The transfer syntax defines byte order, how VRs are written, and whether pixel data is compressed. Common ones include:

  • Implicit or explicit VR little endian: uncompressed and widely supported.
  • JPEG baseline and JPEG lossless: classic JPEG compression variants.
  • JPEG 2000: lossless or lossy wavelet compression.
  • RLE lossless: simple run-length encoding.
  • MPEG-2, H.264, HEVC: video encodings for ultrasound clips or endoscopy.

A viewer must have a decoder for the specific transfer syntax. When one file in a set refuses to display while others work, a different transfer syntax is the usual reason. How to open DICOM files covers troubleshooting.

Pixel Data and Bit Depth

DICOM images frequently store 12 or 16 bits per pixel, giving thousands of grey levels. A monitor can show only around 256 at once, so viewers map a chosen range of values onto the screen. That mapping is controlled by window width and window level; DICOM window and level explains how they work. Multi-frame files can also hold many images, such as a cine loop, in a single file.

Metadata Means Personal Data

Because patient identity travels inside each file, DICOM files are personal health records. Names, birth dates, IDs and sometimes institution details are present in the tags, and some images have identifying text burned into the pixels. Before sharing files, read what patient information is stored in DICOM files.

Look Inside a DICOM File

You can open a .dcm file to see both the image and its full tag list in the DICOM viewer. The tag panel can be filtered by tag number or name, and identifying values are hidden by default. Files are decoded on your device, not uploaded.

Frequently Asked Questions

Is DICOM the same as .dcm?

.dcm is the most common extension, but DICOM files can have any name or none at all. Software identifies them from their content.

Can DICOM files hold more than images?

Yes. DICOM can store structured reports, PDF documents, waveforms such as ECGs, and other objects.

Why do DICOM images look washed out in normal image viewers?

They store far more grey levels than a typical image. Without proper windowing, the range is squeezed and contrast is lost.

Is DICOM an open standard?

Yes. The standard is published freely by NEMA's DICOM Standards Committee and updated several times a year.

Summary

A DICOM file is an image wrapped in a rich, standardised set of tags. Tags carry identity and acquisition details, UIDs tie files into series and studies, and the transfer syntax decides whether a given viewer can decode it.

Sources