DICOM Basic Concepts
DICOM (Digital Imaging and Communications in Medicine) is the international standard (ISO 12052) for medical imaging and related information, used for storing, exchanging, and transmitting medical images and related data. DICOM files not only contain pixel data (the image itself) but also contain extensive metadata describing the image, organized as “data elements” within “Information Object Definitions” (IOD).
✅ 1. Core Structure of DICOM Files
File Header (File Meta Information)
- 128-byte fixed-length preamble (usually all 0x00, optional)
- 4-byte DICOM prefix “DICM”
- File meta information group (Group 0002), including:
- (0002,0000) File Meta Information Group Length
- (0002,0001) File Meta Information Version
- (0002,0002) Media Storage SOP Class UID
- (0002,0003) Media Storage SOP Instance UID
- (0002,0010) Transfer Syntax UID
- (0002,0012) Implementation Class UID
- (0002,0013) Implementation Version Name
Dataset
- Contains actual image information and metadata, following specific IODs (such as CT Image IOD, MR Image IOD, etc.)
- Data elements organized by tags, formatted as (gggg,eeee), where gggg is the group number and eeee is the element number
- Each data element includes: Tag, VR (Value Representation), Value Length, Value
✅ 2. Core Information Object (IOD) Structure Explanation
Each DICOM image belongs to a SOP Class (Service-Object Pair Class), for example:
- CT Image Storage (1.2.840.10008.5.1.4.1.1.2)
- MR Image Storage (1.2.840.10008.5.1.4.1.1.4)
- Secondary Capture Image Storage (1.2.840.10008.5.1.4.1.1.7)
Each SOP Class corresponds to an IOD that defines mandatory or optional data elements.
Typical IOD Modules Include:
| Module Name | Type | Description |
|---|---|---|
| Patient | Module | Patient basic information (e.g., name, ID, gender, birth date, etc.) |
| Study | Module | Examination (Study) information (e.g., Study Instance UID, examination date/time, doctor, etc.) |
| Series | Module | Series information (e.g., Series Instance UID, modality, equipment, etc.) |
| Equipment | Module | Equipment information (e.g., manufacturer, model, software version, etc.) |
| Image | Module | Image-specific information (e.g., image orientation, position, pixel spacing, window width/level, etc.) |
| Pixel Data | Module | Pixel data itself (7fe0,0010) |
✅ 3. Key Data Elements Example
| TAG(gggg,eeee) | Name | Description |
|---|---|---|
| (0010,0010) | Patient’s Name | Patient name |
| (0010,0020) | Patient ID | Patient unique identifier |
| (0010,0030) | Patient’s Birth Date | Birth date |
| (0010,0040) | Patient’s Sex | Gender |
| (0020,000D) | Study Instance UID | Study unique identifier |
| (0020,000E) | Series Instance UID | Series unique identifier |
| (0008,0018) | SOP Instance UID | Image instance unique identifier |
| (0008,0060) | Modality | Imaging modality (CT, MR, US, etc.) |
| (0008,0020) | Study Date | Study date |
| (0008,0030) | Study Time | Study time |
| (0020,0032) | Image Position (Patient) | Image position in patient coordinate system |
| (0020,0037) | Image Orientation (Patient) | Image orientation (row/column vectors) |
| (0028,0030) | Pixel Spacing | Physical pixel dimensions (mm) |
| (0028,0010) | Rows | Image row count |
| (0028,0011) | Columns | Image column count |
| (0028,0100) | Bits Allocated | Bits allocated per pixel |
| (7FE0,0010) | Pixel Data | Actual pixel data (may be compressed) |
✅ 4. Transfer Syntax
Determines how data is encoded (byte order, compression, etc.), common ones include:
- Implicit VR Little Endian (1.2.840.10008.1.2) — Default
- Explicit VR Little Endian (1.2.840.10008.1.2.1)
- JPEG Lossless (1.2.840.10008.1.2.4.70)
- JPEG 2000 (1.2.840.10008.1.2.4.90)
- Deflated Explicit VR Little Endian (1.2.840.10008.1.2.1.99)
✅ 5. Summary
DICOM File = File Meta Information + Dataset (following specific IOD)
Core information is organized in a hierarchical structure: Patient → Study → Series → Image → Pixel Data Corresponding TAGs: PatientID → StudyInstanceUID → SeriesInstanceUID → SOPInstanceUID → PixelData. In ER models, this is represented as: Patient → Study → Series → Image 1 → N → N → N
For multi-frame images where NumberOfFrames > 1, special handling is required. Multi-frame images are primarily generated by ultrasound, cardiovascular angiography, and ECG devices.
All information is accessed through standardized tags, supporting cross-vendor interoperability.
Recommended Libraries for Parsing or Generating DICOM Files:
- Python: pydicom - A pure Python package for parsing and handling DICOM files
- C++: DCMTK - A collection of libraries and applications implementing large parts of the DICOM standard
- Java: dcm4che - A service-oriented architecture for healthcare enterprises
- C#: fo-dicom - DICOM for .NET, supporting .NET Framework, .NET Core, UWP, Android, iOS, and Unity
- Rust: dicom-rs - A DICOM toolkit written in Rust with focus on parsing, writing, and network communication
For AI learning and big data analytics, pydicom is recommended. For PACS system development, fo-dicom is recommended as it has better compatibility than dcm4che. dicom-rs has a higher learning curve. DCMTK requires payment for JPEG2000 transfer syntax decoding. dcm4che is currently the slowest in parsing speed, but has the most auxiliary tools.
Debugging Tools:
- DVTk
- Wireshark + DICOM plugin
These are excellent for debugging DICOM communications.
Key Benefits of DICOM Standards
- Interoperability: Enables communication between different medical imaging systems
- Standardization: Consistent format for medical image storage and exchange
- Rich Metadata: Comprehensive patient and image information
- Scalability: Supports various imaging modalities and applications
Keywords and Descriptions
- Primary Keywords: DICOM, medical imaging, healthcare standards, DICOM file structure, medical imaging data
- Secondary Keywords: PACS, medical imaging standards, DICOM IOD, DICOM transfer syntax, healthcare software
- Meta Description: Complete guide to DICOM core information structure, file format, and medical imaging standards for healthcare professionals and developers.
- Target Audience: Healthcare software developers, medical imaging system architects, healthcare IT professionals
- Content Value: Comprehensive overview of DICOM file structure, data elements, and implementation guidelines for medical imaging systems