Skip to main content

dcmnorm_object/
lib.rs

1//! dcmnorm's own DICOM in-memory object model and Part 10 file I/O, replacing `dicom-object`
2//! (+ `dicom-parser`'s tree-building layer). See README.md for the design rationale.
3
4mod error;
5mod file;
6mod mem;
7mod meta;
8mod pixel;
9
10pub use dcmnorm_parser::dataset::{DataSetWriter, DataToken};
11pub use error::{ReadError, WithMetaError, WriteError};
12pub use file::{
13    read_dataset_trial_parse, with_meta_from_bare_dataset, DefaultDicomObject, FileDicomObject,
14    OpenFileOptions, PixelDataValueLocation, ReadPreamble,
15};
16pub use mem::{
17    ApplyOpError, DeferredPixelData, DeferredValueLocation, DeferredValues, FragmentLocation,
18    InMemDicomObject, InMemElement, InMemFragment, MissingElementError, PixelDataStreamStop,
19};
20pub use meta::{FileMetaTable, FileMetaTableBuilder};
21
22/// Fallback implementation class UID used when a [`FileMetaTableBuilder`] doesn't specify one -
23/// matches dicom-object's own convention of stamping an implementation identity into files this
24/// process writes. UUID-derived (PS3.5 Annex B: `2.25.<uuid-as-decimal>`), generated once and
25/// fixed forever - a UID may contain only digits and `.` (PS3.5 6.2), so this can't be a
26/// readable "dcmnorm" path the way a private enterprise OID root would allow.
27pub const IMPLEMENTATION_CLASS_UID: &str = "2.25.118267540888616781180626367073156920815";
28pub const IMPLEMENTATION_VERSION_NAME: &str = concat!("DCMNORM_", env!("CARGO_PKG_VERSION"));