當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python cucim.skimage.color.combine_stains用法及代碼示例

用法:

cucim.skimage.color.combine_stains(stains, conv_matrix)

染色到 RGB 顏色空間轉換。

參數

stains(…, 3) 數組

染色顏色空間中的圖像。最終維度表示渠道。

conv_matrix: ndarray

G. Landini [1] 說明的汙點分離矩陣。

返回

out(..., 3) ndarray

RGB 格式的圖像。與輸入相同的尺寸。

拋出

ValueError

如果 stains 不是至少具有形狀 (..., 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.

例子

>>> import cupy as cp
>>> from skimage import data
>>> from cucim.skimage.color import (separate_stains, combine_stains,
...                                    hdx_from_rgb, rgb_from_hdx)
>>> ihc = cp.array(data.immunohistochemistry())
>>> ihc_hdx = separate_stains(ihc, hdx_from_rgb)
>>> ihc_rgb = combine_stains(ihc_hdx, rgb_from_hdx)

相關用法


注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cucim.skimage.color.combine_stains。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。