dicom_viewer/dcm/mod.rs
1//! DICOM domain layer: study/series/instance model, folder loading, and
2//! pixel-data decoding to RGBA for the viewport.
3//!
4//! The dependency graph inside this layer is roughly linear:
5//!
6//! ```text
7//! loader → study → pixel → roi → annotation
8//! ↘ ↘
9//! thumbnail export
10//! ↘
11//! metadata
12//! ```
13//!
14//! - [`loader`] walks a folder and produces metadata-only [`Study`] trees.
15//! - [`pixel`] decodes a single instance to interactive `f32` values and
16//! re-windows them to RGBA8 on demand.
17//! - [`roi`] computes statistics over windows on [`pixel::RawImage`].
18//! - [`annotation`] persists user measurements to a JSON sidecar.
19//! - [`thumbnail`] decodes a heavily-decimated preview for the sidebar.
20//! - [`metadata`] flattens DICOM tags for the right-hand panel.
21//! - [`export`] writes annotated PNGs and a basic anonymised copy of the
22//! source DICOM.
23
24pub mod annotation;
25pub mod export;
26pub mod loader;
27pub mod metadata;
28pub mod pixel;
29pub mod roi;
30pub mod study;
31pub mod thumbnail;
32
33#[allow(unused_imports)]
34pub use pixel::DecodedFrame;
35pub use pixel::{auto_window, decode_to_rgba, load_raw, render_rgba, RawImage, WindowSetting};
36pub use study::{Instance, Series, Study};