Expand description
Medical volume helpers (pure Rust).
HU window/level display, max-intensity projection, isotropic nearest-neighbour resample, and non-negative spectral unmixing for multi-channel fluorescence.
Modules§
- hu_
window - Apply CT Hounsfield Unit window/level → 8-bit display.
- isotropic_
resample_ nn - Nearest-neighbour resample of anisotropic 2D/3D grids to isotropic spacing.
- mip_
project - Max Intensity Projection (MIP) along a volume axis.
- spectral_
unmix_ nnls - Non-negative least-squares lite for multi-channel spectral unmixing.
Structs§
- Unmix
Result - Result of a single spectrum unmix.
Enums§
- Medical
Error - Medical imaging helper errors.
- MipAxis
- Projection axis for a 3D volume stored as stacked 2D slices.
Functions§
- apply_
hu_ window_ f32 - Window/level on
f32intensity (HU or similar) →u8display. - apply_
hu_ window_ i16 - Window/level on
i16HU values →u8display. - hu_
window_ i16 - Window/level on
i16HU values →u8display. - isotropic_
resample_ 2d_ nn - Resample a 2D image from anisotropic pixel spacing to isotropic.
- isotropic_
resample_ 3d_ nn - Resample a 3D volume (stacked slices) to isotropic voxel spacing.
- isotropic_
resample_ nn_ 2d - Resample a 2D image from anisotropic pixel spacing to isotropic.
- mip_
project_ axis - Max-intensity project a 3D volume of
f32voxels. - mip_
project_ z - MIP along Z (classic axial max-intensity projection).
- spectral_
unmix_ nnls - Unmix one observed spectrum
y(lengthn_channels) against endmember matrixendmemberslaid out as column-major: componentkoccupiesendmembers[k * n_channels .. (k+1) * n_channels]. - spectral_
unmix_ per_ pixel - Per-pixel unmix: writes abundances into
out_abundanceslaid out aspixel-major×n_components. Returns number of pixels written. - spectral_
unmix_ roi_ mean - Mean the ROI spectra then unmix once (cheap path for bulk regions).