Skip to main content

Module pixel

Module pixel 

Source
Expand description

Pixel-data decode + CPU windowing.

load_raw decodes a DICOM file once into rescaled f32 values plus metadata about default window and photometric inversion. render_rgba then turns those values into RGBA8 with a window/level applied — fast enough to call on every drag delta for interactive W/L.

Structs§

DecodedFrame
RGBA8 buffer returned by decode_to_rgba.
RawImage
Rescaled monochrome pixel values, ready for interactive windowing.

Enums§

WindowSetting
Which VOI window to apply when calling decode_to_rgba.

Functions§

auto_window
Pick a sensible default window for raw.
decode_to_rgba
Convenience: load + render in one shot. Used by tests.
load_raw
Decode the pixel data of a DICOM file into a RawImage.
render_rgba
Apply a window/level and convert a RawImage to RGBA8.