Skip to main content
Version: v0.0.3

Interface: DicomPosition

Positional context for a DicomParseWarning or DicomParseError.

Byte offsets are relative to the source buffer for non-deflated transfer syntaxes; for the Deflated Explicit VR LE transfer syntax (D-27), deflated: true indicates the offset is into the inflated dataset buffer rather than the on-disk source.

With exactOptionalPropertyTypes: true, callers should omit unset keys rather than passing undefined (mirrors @cosyte/hl7 sibling discipline).

Example

import type { DicomPosition } from "@cosyte/dicom";
const p: DicomPosition = { byteOffset: 132, fileMeta: true };

Properties

byteOffset

readonly byteOffset: number


contextPath?

readonly optional contextPath?: readonly string[]

Tag chain for nested SQ items, e.g. ["0040A730", "0", "00080100"]. Omit when at root.


deflated?

readonly optional deflated?: boolean

True when offset is into the inflated dataset buffer (Deflated TS only). Omit when not applicable.


fileMeta?

readonly optional fileMeta?: boolean

True when offset is inside the File Meta group. Omit (do not pass undefined) when not applicable.