CT and DICOM — reference
Reference · Dense lookup material — return here later, do not learn from it cold. The teaching versions live in the lessons.
The identifiers (lookup)
| Tag | Name | Scope | Why it matters |
|---|---|---|---|
(0010,0020) |
PatientID |
Patient | De-identification/site key; grouping. Only meaningful within its assigning authority — pair with IssuerOfPatientID (0010,0021) across sites. |
(0020,000D) |
StudyInstanceUID |
Study | “This exam” |
(0020,000E) |
SeriesInstanceUID |
Series | “This acquisition/reconstruction” — the unit of work for a volume |
(0008,0018) |
SOPInstanceUID |
Instance | “This slice” — the join key a SEG uses to reference its source images |
(0020,0052) |
FrameOfReferenceUID |
Spatial frame | Names the patient coordinate frame. A match lets you compare geometry; it does not prove identical grids. |
(0008,0016) |
SOPClassUID |
Object type | What kind of object this is before you parse it |
(0008,0060) |
Modality |
Object type | CT, SEG, MR, OT, … — the one-tag filter |
Intensity / pixel tags
| Tag | Name | Purpose |
|---|---|---|
(0028,1052) |
RescaleIntercept |
Modality LUT offset; HU = stored × slope + intercept |
(0028,1053) |
RescaleSlope |
Modality LUT slope (often 1) |
(0028,0100) |
BitsAllocated |
typically 16 |
(0028,0103) |
PixelRepresentation |
0 = unsigned, 1 = signed |
(7FE0,0010) |
PixelData |
the raw pixel buffer (bulk OW/OB) |
(0018,1210) |
ConvolutionKernel |
the reconstruction kernel (texture variable) |
Geometry tags (full treatment in Chapter 2)
| Tag | Name | Purpose |
|---|---|---|
(0020,0032) |
ImagePositionPatient |
(x,y,z) of the top-left voxel centre, LPS mm |
(0020,0037) |
ImageOrientationPatient |
row and column direction cosines |
(0028,0030) |
PixelSpacing |
[row spacing, column spacing] |
(0018,0050) |
SliceThickness |
collimated/imaged slab |
(0018,0088) |
SpacingBetweenSlices |
distance between slice centres |
SOP Classes you will meet
1.2.840.10008.5.1.4.1.1.2— CT Image Storage (single CT slice).1.2.840.10008.5.1.4.1.1.66.4— Segmentation Storage (DICOM SEG).1.2.840.10008.5.1.4.1.1.481.3— RT Structure Set Storage (RTSTRUCT).
Value Representation (VR) — useful level
Each data element has a two-letter type code. You do not need the full table; you need three facts:
- Numeric values are often stored as text (
DS, decimal string) — so"0.78125\0.78125"is a normal way to store pixel spacing. - UIDs (
UI) are dot-separated strings; compare them as strings. - Pixel Data is bulk (
OW/OB) in(7FE0,0010).
Common VRs: PN (person name), DA (date), UI (UID), US (unsigned short),
DS (decimal string), OB/OW (other byte/word).
Transfer Syntax
TransferSyntaxUID (0002,0010) is the byte-level encoding of Pixel Data:
uncompressed (e.g. Explicit VR Little Endian 1.2.840.10008.1.2.1), JPEG-lossy,
JPEG-2000, etc. pydicom decodes most of these for you; if you ever read raw
PixelData bytes you must know the transfer syntax first.
Classic vs Enhanced CT
The “one instance = one slice” model is classic single-frame CT Image Storage. Enhanced CT is a multi-frame object where one SOP Instance contains many frames, each described by per-frame functional group macros (the same mechanism DICOM SEG uses). Geometry concepts are identical; only packaging differs.
What usually goes wrong
- Treating stored pixels as HU without applying slope/intercept — the most common silent error.
- Assuming
uint16everywhere — readPixelRepresentationandBitsAllocated. - Trusting
InstanceNumberor filename order for anatomical z-order. Order by geometry (Chapter 2). - Pooling reconstructions — a study contains several series (thin/thick axial,
coronal reformats, scout). A localizer/scout is a 2D planning image, not an
axial slice; stacking it corrupts the volume. Filter on
ImageType/ConvolutionKernel/SliceThickness. - Ignoring transfer syntax when reading raw bytes — you get garbage or a
decompression error. Let
pydicomhandle it; check for a missing package on compressed syntaxes.
A practical reading sequence (curated external)
Do not read the whole DICOM standard. Read these in order and stop when the model above becomes concrete:
- “DICOM is Easy” (Ronnie) —
dicomiseasy.blogspot.com. The canonical gentle introduction: thePatient→Study→Series→Instanceintuition from a real CT instance, tag by tag. Skip the networking posts (that is Chapter 5). - pydicom docs —
pydicom.github.io. “Dataset basics”/“elements” + the Pixel Data tutorial cover ~90% of what you need (dcmread,ds.pixel_array,RescaleSlope/Intercept). Skip creating new SOP instances. - Innolitics DICOM Standard Browser —
dicom.innolitics.com. Use as a reference, not a textbook; keep it open permanently. - The DICOM standard (normative) —
dicom.nema.org/standard.html. Read on demand: PS3.3 Image Plane Module / Image Pixel Module / Modality LUT. Skip PS3.4/5/7/8 (services/encoding/networking) until imaging informatics.
TRACE-CT connection
Every concept in this chapter is exercised by real code in TRACE-CT (read-only — do not copy it here):
- HU conversion —
scripts/seg_decode_resample.pyload_ct_volume_explicit()appliesvolume[k] = pixel × slope + interceptwhile building the volume. - Series grouping & metadata —
scripts/rider_preflight.pyclassifies each object bySOPClassUID/Modality, then builds per-series metadata (kernel, kVp,SliceThickness,ImageType,PixelSpacing, IOP/IPP). - Reconstruction selection —
rider_preflight.pyselects both a 1.25 mm LUNG and a 5.0 mm STANDARD reconstruction per acquisition — the two-reconstructions-of-one-acquisition effect, made real. - HU clipping before features —
rider_radiomics_extraction.pyclip_intensities()clips to[-1000, +400]HU after resampling and before PyRadiomics (it operates in physical HU, not stored pixels). - Localizer filtering & geometry validation —
load_ct_volume_explicit()drops localizers and validates orientation/spacing regularity before declaring a stack a usable volume.
Go deeper
- Innolitics entries for Rescale Slope/Intercept, Image Plane Module, Image Pixel Module.
- DICOM PS3.3 Image Plane / Image Pixel / Modality LUT modules — the normative source for geometry and slope/intercept semantics.
- PyRadiomics docs on image type and
binWidth— why working in HU (not stored pixels) is mandatory before feature extraction (Chapter 3). - Bushberg, Essential Physics of Medical Imaging — for CT reconstruction and dose depth when reconstruction/dose becomes an active TRACE-CT variable.
What to retain (chapter summary)
- CT measures projections, reconstructs slices; the stored pixel is an algorithmic output, not raw physics.
HU = stored_pixel × RescaleSlope + RescaleIntercept. Never use stored pixels as HU.Patient → Study → Series → Instance; geometry and reconstruction live at the Series level.- The hierarchy organises data but does not define volume geometry — that needs IOP/IPP/spacing per instance (Chapter 2).
- Reconstruction kernel and slice thickness are quantitative variables: two reconstructions of one scan are different images and can give different features.