Skip to main content

Crate dcmnorm_object

Crate dcmnorm_object 

Source
Expand description

dcmnorm’s own DICOM in-memory object model and Part 10 file I/O, replacing dicom-object (+ dicom-parser’s tree-building layer). See README.md for the design rationale.

Structs§

DataSetWriter
A stateful device for printing a DICOM data set in sequential order. This is analogous to the DatasetReader type for converting data set tokens to bytes.
DeferredValueLocation
Where a value that was skipped instead of read lives in the source file (absolute byte offset of its first byte, and its length) - see DeferredValues.
DeferredValues
The values a deferring read (OpenFileOptions::open_file_deferring) skipped rather than loaded, mirroring the data set’s shape: one entry per top-level tag that was either deferred itself or is a sequence with deferred values somewhere inside its items.
FileDicomObject
A DICOM object with its accompanying File Meta Information.
FileMetaTable
The File Meta Information (group 0002) of a DICOM Part 10 file.
FileMetaTableBuilder
Builder for FileMetaTable, mirroring dicom-object’s FileMetaTableBuilder fluent API.
FragmentLocation
Absolute file offset and byte length of one encapsulated pixel data fragment.
InMemDicomObject
An in-memory DICOM data set: a flat, tag-ordered list of elements, each of which may itself contain a nested list (for SQ values).
MissingElementError
A required element was not present in the object.
OpenFileOptions
Builder for reading a DICOM file with non-default options (an explicit preamble requirement, or an early-stop tag for partial/fast reads).
PixelDataValueLocation
Where a native PixelData value sits in a file, as found by OpenFileOptions::open_file_until_pixel_data: its declared VR and byte length, and the absolute byte offset of its first value byte.

Enums§

ApplyOpError
An AttributeOp could not be applied.
DataToken
A token of a DICOM data set stream. This is part of the interpretation of a data set as a stream of symbols, which may either represent data headers or actual value data.
DeferredPixelData
Location of top-level (7FE0,0010) PixelData left on disk by crate::OpenFileOptions::open_file_deferring_pixel_data.
PixelDataStreamStop
Where InMemDicomObject::read_dataset_until_pixel_data stopped in a forward-only stream.
ReadError
An error occurring while reading a DICOM data set or file.
ReadPreamble
Whether to require/skip the 128-byte preamble when opening a file.
WithMetaError
An error occurring while attaching/validating a file meta table.
WriteError
An error occurring while writing a DICOM data set or file.

Constants§

IMPLEMENTATION_CLASS_UID
Fallback implementation class UID used when a FileMetaTableBuilder doesn’t specify one - matches dicom-object’s own convention of stamping an implementation identity into files this process writes. UUID-derived (PS3.5 Annex B: 2.25.<uuid-as-decimal>), generated once and fixed forever - a UID may contain only digits and . (PS3.5 6.2), so this can’t be a readable “dcmnorm” path the way a private enterprise OID root would allow.
IMPLEMENTATION_VERSION_NAME

Functions§

read_dataset_trial_parse
Read raw bytes as a bare data set, trying Implicit VR LE, then Explicit VR LE, then Explicit VR BE in that order and taking the first one that parses successfully - the same permissive fallback dcmnorm already relies on for meta-less raw dumps.
with_meta_from_bare_dataset
Read a bare data set (no meta group) and attach the given meta table to it. Used for dcmnorm’s meta-less/preamble-less trial-parse fallback path.

Type Aliases§

DefaultDicomObject
The default, in-memory DICOM file object type - a FileMetaTable plus an InMemDicomObject.
InMemElement
A data element within an InMemDicomObject tree (a primitive value, a nested sequence of further InMemDicomObjects, or an encapsulated pixel data fragment sequence).
InMemFragment
The pixel data fragment type used by InMemDicomObject - a plain owned byte buffer.