Skip to main content
Version: v0.0.3

Interface: UidRemapper

A UID remapper: a stable map(src) plus the backing cache it fills.

Example

import { makeUidRemapper, type UidRemapper } from "@cosyte/dicom";
const remap: UidRemapper = makeUidRemapper();
const replaced = remap.map("1.2.840.10008.5.1.4.1.1.2");
remap.cache.get("1.2.840.10008.5.1.4.1.1.2") === replaced; // true

Properties

cache

readonly cache: Map<string, string>

The source→replacement cache, exposed for reporting / reuse.


map

readonly map: (sourceUid) => string

Map one source UID to its deterministic replacement (cached).

Parameters

sourceUid

string

Returns

string