Skip to content

hgsc_cancer_type_mask

An semantic raster mask (1500x1500px) of segmented nuclei of a HGSC tumor nest.

Note

Pairs with:

  • hgsc_cancer_nuclei()
  • hgsc_cancer_he()
  • hgsc_cancer_inst_mask()

Examples:

>>> import matplotlib.pyplot as plt
>>> from histolytics.data import hgsc_cancer_type_mask
>>> from skimage.color import label2rgb
>>> fig, ax = plt.subplots(figsize=(4, 4))
>>> im = hgsc_cancer_type_mask()
>>> ax.imshow(label2rgb(im, bg_label=0))
>>> ax.set_axis_off()

out

Source code in src/histolytics/data/fetch.py
def hgsc_cancer_type_mask():
    """An semantic raster mask (1500x1500px) of segmented nuclei of a HGSC tumor nest.

    Note:
        Pairs with:

        - `hgsc_cancer_nuclei()`
        - `hgsc_cancer_he()`
        - `hgsc_cancer_inst_mask()`

    Examples:
        >>> import matplotlib.pyplot as plt
        >>> from histolytics.data import hgsc_cancer_type_mask
        >>> from skimage.color import label2rgb
        >>> fig, ax = plt.subplots(figsize=(4, 4))
        >>> im = hgsc_cancer_type_mask()
        >>> ax.imshow(label2rgb(im, bg_label=0))
        >>> ax.set_axis_off()
    ![out](../../img/hgsc_cancer_type.png)
    """
    data = np.load(BASE_PATH / "hgsc_nest_type_mask.npz")
    return data["nuc_raster"]