Function: decodeElementValue()
decodeElementValue(
element):DicomValue
Decode an Element's value to a typed DicomValue. Pure +
fail-safe: it never throws and never coerces a malformed value to a
plausible-but-wrong one. Called lazily (and memoized) by Element.value.
Parameters
element
Returns
Example
import { parseDicom } from "@cosyte/dicom";
const ds = parseDicom(buf);
const v = ds.get("00280010")?.value; // Rows (US)
if (v?.kind === "numbers") console.log(v.values[0]);