Inferensys

Glossary

Value Representation (VR)

A two-character code in DICOM that defines the data type and format of an element's value, such as 'PN' for Person Name or 'DA' for Date, ensuring correct parsing.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
DICOM DATA TYPE ENCODING

What is Value Representation (VR)?

A two-character code in DICOM that defines the data type and format of an element's value, ensuring correct parsing.

Value Representation (VR) is a mandatory two-character code in the DICOM standard that explicitly defines the data type, byte length, and formatting constraints of a specific DICOM Tag's value field. It acts as a strict schema, instructing a parser whether the subsequent bytes represent a Person Name (PN), a Date string (DA), an unsigned short integer (US), or a sequence of items (SQ), preventing misinterpretation of binary data.

VRs are critical for interoperability between SCU and SCP systems during Association Negotiation. The VR determines whether a value field uses Explicit VR encoding (where the VR is present in the data stream) or Implicit VR encoding (where the VR is omitted and must be derived from the tag's dictionary entry). Common VRs include LO for Long String, UI for DICOM UID, and OB for Other Byte, which handles raw pixel data.

DATA TYPE ENCODING

Key Characteristics of Value Representation

Value Representation (VR) is a two-character code that defines the data type and encoding format of a DICOM element's value field, ensuring deterministic parsing across heterogeneous systems.

01

Explicit vs. Implicit VR

DICOM supports two encoding paradigms that dictate whether the VR is present in the data stream:

  • Explicit VR: The two-character VR code (e.g., 'PN', 'DA') is physically written into the element header, making the data set self-describing and easier to parse without prior knowledge of the IOD.
  • Implicit VR: The VR is omitted from the data stream entirely. The parser must know the VR for every tag from the IOD definition or data dictionary to correctly interpret the length and value fields.

Explicit VR is mandatory for all DICOM file formats (Part 10) and is the dominant mode in modern network communication.

27
Standard VR Types
Explicit
Default Encoding
02

String VR Types

String VRs represent human-readable or coded text with specific character constraints:

  • AE (Application Entity): Up to 16 characters identifying a DICOM node, with no leading/trailing spaces.
  • CS (Code String): Uppercase alphanumeric with no spaces, used for controlled terminology values.
  • LO (Long String): Up to 64 characters, often used for institution names or device identifiers.
  • PN (Person Name): A complex type with caret-delimited components (Family^Given^Middle^Prefix^Suffix) supporting ideographic and phonetic representations.
  • SH (Short String): Up to 16 characters.
  • UI (Unique Identifier): A UID string with period-delimited numeric components, max 64 bytes.
PN
Most Complex String VR
03

Numeric & Date VR Types

Numeric VRs encode quantitative measurements and temporal data with strict formatting rules:

  • DS (Decimal String): A string representing a fixed-point or floating-point number, used for measurements like slice thickness.
  • IS (Integer String): A string of digits representing an integer value.
  • DA (Date): Fixed 8-byte format YYYYMMDD, enabling direct string comparison for date range queries.
  • TM (Time): Format HHMMSS.FFFFFF with variable fractional seconds precision.
  • DT (Date Time): Concatenated date and time, e.g., 20240101120000.000000.

These VRs are critical for temporal query/retrieve operations where date range matching is performed lexicographically.

DA
Lexicographically Sortable
04

Binary & Container VR Types

Binary VRs handle opaque data blobs and structured pixel information:

  • OB (Other Byte): An unstructured byte stream with undefined content, used for pixel data in 8-bit images.
  • OW (Other Word): A stream of 16-bit words, used for pixel data where each word must be byte-swapped according to the Transfer Syntax endianness.
  • OF (Other Float): 32-bit IEEE floating-point words.
  • OD (Other Double): 64-bit IEEE floating-point words.
  • SQ (Sequence of Items): A container VR that nests zero or more data sets (Items) within a sequence, enabling hierarchical data structures like repeating acquisition parameters.
  • UN (Unknown): Used when the VR is not known at encoding time; treated as a byte stream.
SQ
Enables Nesting
05

VR Mismatch Handling

Robust DICOM parsers must handle VR discrepancies gracefully, as real-world data often contains non-conformant encodings:

  • Private Tags (Odd Group Numbers): May have a VR of UN or be encoded with a VR that contradicts the private element's actual content.
  • Retired VRs: Older VRs like 'SL' (Signed Long) or 'UL' (Unsigned Long) may appear in legacy data sets.
  • Length Mismatches: The value length field may not match the VR's expected byte count, requiring parsers to rely on the explicit length rather than the VR-defined size.
  • Zero-Length Values: Valid for all VRs, indicating a null or absent value, distinct from a zero-length string.
UN
Fallback VR
06

VR in DICOMweb JSON

When DICOM data is serialized to JSON via DICOMweb (Part 18), VRs are represented as a vr property alongside the Value array:

  • Each element becomes a JSON object with keys vr and Value (and optionally BulkDataURI for large binary payloads).
  • PN values are expanded into an Alphabetic object with Given, Family, Middle, Prefix, and Suffix fields.
  • SQ sequences become nested JSON arrays of data set objects.
  • DA/TM/DT values remain as their string representations.

This JSON model eliminates the need for binary parsing but requires VR-aware serialization to preserve type fidelity.

vr
JSON Key
VALUE REPRESENTATION

Frequently Asked Questions

A Value Representation (VR) is a two-character code in the DICOM standard that defines the data type and encoding format of a specific data element's value field. Understanding VRs is critical for ensuring correct parsing, validation, and interoperability of medical imaging data.

A Value Representation (VR) is a two-character code defined in DICOM Part 5 that specifies the data type and encoding rules for the Value field of a DICOM data element. When a parser encounters a tag like Patient Name (0010,0010), it reads the VR—in this case, PN for Person Name—to determine how to interpret the subsequent bytes. The VR dictates the byte length, character set, and structural format. For example, a DA (Date) VR tells the parser to expect exactly 8 bytes formatted as YYYYMMDD, while a UI (Unique Identifier) VR expects a string of digits and periods with a maximum length of 64 bytes. VRs are the fundamental mechanism that allows a DICOM parser to correctly deserialize a binary stream into a structured, semantic data set without prior knowledge of the specific tag's meaning.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.