separate-stains

separate_stains

skimage.color.separate_stains(rgb, conv_matrix) [source]

RGB to stain color space conversion.

Parameters:

rgb : array_like

The image in RGB format, in a 3-D array of shape (.., .., 3).

conv_matrix: ndarray

The stain separation matrix as described by G. Landini [R55].

Returns:

out : ndarray

The image in stain color space, in a 3-D array of shape (.., .., 3).

Raises:

ValueError

If rgb is not a 3-D array of shape (.., .., 3).

Notes

Stain separation matrices available in the color module and their respective colorspace:

  • hed_from_rgb: Hematoxylin + Eosin + DAB
  • hdx_from_rgb: Hematoxylin + DAB
  • fgx_from_rgb: Feulgen + Light Green
  • bex_from_rgb: Giemsa stain : Methyl Blue + Eosin
  • rbd_from_rgb: FastRed + FastBlue + DAB
  • gdx_from_rgb: Methyl Green + DAB
  • hax_from_rgb: Hematoxylin + AEC
  • bro_from_rgb: Blue matrix Anilline Blue + Red matrix Azocarmine + Orange matrix Orange-G
  • bpx_from_rgb: Methyl Blue + Ponceau Fuchsin
  • ahx_from_rgb: Alcian Blue + Hematoxylin
  • hpx_from_rgb: Hematoxylin + PAS

References

[R55] (1, 2) http://www.dentistry.bham.ac.uk/landinig/software/cdeconv/cdeconv.html

Examples

>>> from skimage import data
>>> from skimage.color import separate_stains, hdx_from_rgb
>>> ihc = data.immunohistochemistry()
>>> ihc_hdx = separate_stains(ihc, hdx_from_rgb)
doc_scikit_image
2017-01-12 17:23:27
Comments
Leave a Comment

Please login to continue.