当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python skimage.color.combine_stains用法及代码示例


用法:

skimage.color.combine_stains(stains, conv_matrix, *, channel_axis=- 1)

染色到 RGB 颜色空间转换。

参数

stains(..., 3, ...) 数组

染色颜色空间中的图像。默认情况下,最终维度表示通道。

conv_matrix: ndarray

G. Landini [1] 说明的污点分离矩阵。

channel_axisint 可选

该参数指示数组的哪个轴对应于通道。

返回

out(..., 3, ...)

RGB 格式的图像。与输入相同的尺寸。

抛出

ValueError

如果污渍不是至少 2-D 的形状 (..., 3, ...)。

注意

color 模块中可用的染色组合矩阵及其各自的色彩空间:

  • rgb_from_hed:苏木精 + 曙红 + DAB
  • rgb_from_hdx : 苏木精 + DAB
  • rgb_from_fgx : Feulgen + 浅绿色
  • rgb_from_bex:吉姆萨染色剂:甲基蓝 + 曙红
  • rgb_from_rbd : FastRed + FastBlue + DAB
  • rgb_from_gdx:甲基绿 + DAB
  • rgb_from_hax:苏木精 + AEC
  • rgb_from_bro:蓝色矩阵苯胺蓝+红色矩阵偶氮胭脂红+橙色矩阵Orange-G
  • rgb_from_bpx : 甲基蓝 + 丽春红
  • rgb_from_ahx : 阿新蓝 + 苏木精
  • rgb_from_hpx : 苏木精 + PAS

参考

1

https://web.archive.org/web/20160624145052/http://www.mecourse.com/landinig/software/cdeconv/cdeconv.html

2

A. C. Ruifrok and D. A. Johnston, “Quantification of histochemical staining by color deconvolution,” Anal. Quant. Cytol. Histol., vol. 23, no. 4, pp. 291-299, Aug. 2001.

例子

>>> 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)

相关用法


注:本文由纯净天空筛选整理自scikit-image.org大神的英文原创作品 skimage.color.combine_stains。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。