Skip to main content

Module dicom

Module dicom 

Source
Expand description

DICOM Part 10 metadata parsing and anatomy overlay spec generation.

File ingest path — heap allocation is permitted here (not a hot-path evaluator).

Structs§

DicomMetadata
DicomOrganMapFile
DicomOverlaySpec
DicomPixelSlice
Pixel payload location inside a Part 10 file (not copied — Core 3 streams to blob store).
DicomPlacement
DicomSplitPayload
Result of split-ingestion parse: semantic metadata + raw pixel slice bounds.
DicomTagMatcher

Enums§

DicomError

Constants§

DEFAULT_LOCAL_DICOM_DIR
Default relative path for gitignored private DICOM slices (local dev only).
INLINE_TAG_BLOB_POINTER
Inline datatype tag for mmap blob byte-offset pointers (resolver bits 60–62 = 0b100).
TS_EXPLICIT_VR_LITTLE_ENDIAN
TS_IMPLICIT_VR_LITTLE_ENDIAN
TS_JPEG2000
TS_JPEG2000_LOSSLESS
TS_JPEG_BASELINE
TS_RLE_LOSSLESS

Functions§

build_overlay_spec
chat_mentions_imaging
collect_dicom_image_paths_under
Image slices only (Pixel Data present), preferring IM* filenames typical of PACS export.
collect_dicom_paths_under
Collect up to max_files DICOM Part-10 paths under root (cold-path helper; may allocate).
decode_blob_pointer
Decode a blob pointer from an Object field; returns None if tag mismatch.
default_organ_matchers
default_placement_for_organ
dicom_has_pixel_data
True when the buffer contains extractable Pixel Data for split-ingest.
encode_blob_pointer
Encode a Core-3 blob-store byte offset into an inline Object field pointer.
infer_organ_from_haystack
infer_organ_from_metadata
infer_overlay_spec_from_text
is_dicom_part10
Returns true when the byte slice looks like DICOM Part 10 (preamble + DICM).
metadata_json_from_file
normalize_dicom_token
overlay_spec_from_file
overlay_spec_json_from_file
pack_volume_metadata
Pack rows/cols/pixel-byte-length into the metadata lane for volume queries.
parse_dicom_file
Parse DICOM metadata from a file path.
parse_dicom_metadata_bytes
Parse DICOM Part 10 metadata from an on-disk byte buffer (pixel data optional).
resolve_local_dicom_dir
Resolve private local DICOM root: QUALIA_DICOM_FIXTURE_DIR env, then workspace-relative default.
split_dicom_payload
Split-ingestion entry: metadata tags + pixel slice bounds (no heap copy of pixels).
unpack_volume_metadata