sparrow.pl.plot_labels#
- sparrow.pl.plot_labels(sdata, labels_layer='segmentation_mask', z_slice=None, crd=None, to_coordinate_system='global', output=None, **kwargs)#
Plot a labels layer (masks) based on given parameters.
- Parameters:
sdata (
SpatialData
) – Data containing spatial information for plotting.labels_layer (
str
(default:'segmentation_mask'
)) – Labels layer to be plotted. Default is “segmentation_mask”.z_slice (
Optional
[float
] (default:None
)) – The z_slice to visualize in case of 3D (c,z,y,x) labels.crd (
Optional
[tuple
[int
,int
,int
,int
]] (default:None
)) – The coordinates for the region of interest in the format (xmin, xmax, ymin, ymax). If None, the entire image is considered, by default None.to_coordinate_system (
str
(default:'global'
)) – Coordinate system to plot.output (
Union
[str
,Path
,None
] (default:None
)) – Path to save the plot. If not provided, plot will be displayed.**kwargs (
dict
[str
,Any
]) – Additional arguments to be passed to thesp.pl.plot_shapes
function.
- Return type:
None
See also