CustomExtractor¶
- class CustomExtractor(stain_matrix)[source]¶
Get the user-defined stain matrix.
This class contains code inspired by StainTools [https://github.com/Peter554/StainTools] written by Peter Byfield.
Examples
>>> from tiatoolbox.tools.stainextract import CustomExtractor >>> from tiatoolbox.utils import imread >>> extractor = CustomExtractor(stain_matrix) >>> img = imread('path/to/image') >>> stain_matrix = extractor.get_stain_matrix(img)
Initialize
CustomExtractor
.Methods
Get the user defined stain matrix.
- Parameters:
stain_matrix (np.ndarray)
- get_stain_matrix(_)[source]¶
Get the user defined stain matrix.
- Returns:
User defined stain matrix.
- Return type:
- Parameters:
self (CustomExtractor)
_ (ndarray)