bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / color / colorconv / combine_stains
function
skimage.color.colorconv:combine_stains
source: /dev/scikit-image/src/skimage/color/colorconv.py:1743
Signature
def combine_stains(stains, conv_matrix, *, channel_axis = -1)Summary
Stain to RGB color space conversion.
Parameters
stains: array_like of shape (..., C=3, ...)The image in stain color space. By default, the final dimension denotes channels.
conv_matrix: ndarrayThe stain separation matrix as described by G. Landini [1].
channel_axis: int, optionalThis parameter indicates which axis of the array corresponds to channels.
Returns
out: ndarray of shape (..., C=3, ...)The image in RGB format. Same dimensions as input.
Raises
: ValueErrorIf
stainsis not at least 2-D with shape (..., C=3, ...).
Notes
Stain combination matrices available in the color module and their respective colorspace:
rgb_from_hed: Hematoxylin + Eosin + DABrgb_from_hdx: Hematoxylin + DABrgb_from_fgx: Feulgen + Light Greenrgb_from_bex: Giemsa stainMethyl Blue + Eosinrgb_from_rbd: FastRed + FastBlue + DABrgb_from_gdx: Methyl Green + DABrgb_from_hax: Hematoxylin + AECrgb_from_bro: Blue matrix Anilline Blue + Red matrix Azocarmine + Orange matrix Orange-Grgb_from_bpx: Methyl Blue + Ponceau Fuchsinrgb_from_ahx: Alcian Blue + Hematoxylinrgb_from_hpx: Hematoxylin + PAS
Examples
from skimage import data from skimage.color import (separate_stains, combine_stains, hdx_from_rgb, rgb_from_hdx) ihc = data.immunohistochemistry() ihc_hdx = separate_stains(ihc, hdx_from_rgb) ihc_rgb = combine_stains(ihc_hdx, rgb_from_hdx)✓
Aliases
skimage.color.combine_stains