visualizations#
Source code: armscan_env/util/visualizations.py
- show_clusters(tissue_clusters: TissueClusters, slice: ndarray, ax: Axes | None = None, extent: tuple[int, int, int, int] | None = None, **imshow_kwargs: Any) AxesImage | Axes [source]#
Plot the clusters of all tissues in a slice.
- Parameters:
tissue_clusters -- dictionary of tissues and their clusters
slice -- image slice to cluster
ax -- axis to plot on
extent -- extent of the image, can be set to change the reference frame
- Returns:
None.
- show_slices(data: ndarray, start: int, end: int, lap: int, col: int = 5, extent: tuple[int, int, int, int] | None = None, cmap: str | None = None, axis: bool = False, **imshow_kwargs: Any) ndarray[Any, Any] [source]#
Function to display row of image slices.
- Parameters:
data -- 3D image data
start -- starting slice number
end -- ending slice number
lap -- number of slices to skip
col -- number of columns to display
extent -- extent of the image, can be set to change the reference frame
cmap -- color map to use
axis -- whether to display axis
imshow_kwargs -- additional keyword arguments to pass to imshow
- Returns:
None.