COSIE.downstream_analysis.plot_histology_clusters

plot_histology_clusters(he_clusters_image, num_he_clusters, section_title=None, colormap=None, save_path=None, figscale=35, remove_title=False, remove_legend=False, remove_spine=False, dpi=300)[source]

Visualize cluster maps from 2D cluster masks.

Parameters

he_clusters_imagenp.ndarray

2D array of shape (H, W) where each pixel holds an integer cluster ID.

num_he_clustersint

Total number of clusters (used for color assignment).

section_titlestr or None, optional

Title shown on the figure.

colormapstr, list, or None, optional

Colormap for cluster coloring. If None, a default color list is used.

save_pathstr or None, optional

Path to save the resulting image. If None, no image is saved.

figscaleint, default 35

Controls image figure size.

remove_titlebool, default False

Whether to remove the title.

remove_legendbool, default False

Whether to remove the cluster legend.

remove_spinebool, default False

Whether to remove the axis frame/spines.

dpiint, default 300

DPI of saved image.

Returns

None