RuifrokExtractor

class RuifrokExtractor[source]

Reuifrok stain extractor.

Get the stain matrix as defined in:

Ruifrok, Arnout C., and Dennis A. Johnston. “Quantification of histochemical staining by color deconvolution.” Analytical and quantitative cytology and histology 23.4 (2001): 291-299.

This class contains code inspired by StainTools [https://github.com/Peter554/StainTools] written by Peter Byfield.

Examples

>>> from tiatoolbox.tools.stainextract import RuifrokExtractor
>>> from tiatoolbox.utils import imread
>>> extractor = RuifrokExtractor()
>>> img = imread('path/to/image')
>>> stain_matrix = extractor.get_stain_matrix(img)

Initialize RuifrokExtractor.

Methods

get_stain_matrix

Get the pre-defined stain matrix.

get_stain_matrix(_)[source]

Get the pre-defined stain matrix.

Returns:

Pre-defined stain matrix.

Return type:

numpy.ndarray

Parameters: