sparrow.pl.plot_image#
- sparrow.pl.plot_image(sdata, img_layer='raw_image', channel=None, z_slice=None, crd=None, to_coordinate_system='global', output=None, **kwargs)#
Plot an image based on given parameters.
- Parameters:
sdata (
SpatialData
) – Data containing spatial information for plotting.img_layer (
str
(default:'raw_image'
)) – Image layer to be plotted. Default is “raw_image”.channel (
Union
[int
,str
,Iterable
[int
|str
],None
] (default:None
)) – Channel(s) to be displayed from the image.z_slice (
Optional
[float
] (default:None
)) – The z_slice to visualize in case of 3D (c,z,y,x) image.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