Skip to main content

macenko_deconvolution

Function macenko_deconvolution 

Source
pub fn macenko_deconvolution(
    rgb: &[u8],
    od_thresh: f32,
    out_h: &mut [f32],
    out_e: &mut [f32],
) -> Result<MacenkoResult, HistoError>
Expand description

Macenko deconvolution.

  • rgb: packed RGB8, length n*3
  • od_thresh: minimum OD L2 norm to count as tissue (typical 0.15)
  • out_h / out_e: concentration channels, length ≥ n (pixels)
  • returns stain vectors and tissue sample count