napari_prism.pl.segment_tma#
- napari_prism.pl.segment_tma(sdata, segmentation_name, image_name=None, channel_label=None, channel_cmap='gray', fill_alpha=0.0, outline_alpha=1.0, contour_px=3, figsize=None, dpi=None, coordinate_system='global', show=True, **kwargs)#
Displays a labels element from the SpatialData object, such as the cell segmentation results.
- Parameters:
sdata (
SpatialData) – The SpatialData object containing the image.segmentation_name (
str) – The name of the segmentation to display.image_name (
Optional[str] (default:None)) – The name of the image to display.channel_label (
Optional[str] (default:None)) – The label of the channel to display.channel_cmap (
str|None(default:'gray')) – The colormap to use for the channel.fill_alpha (
float(default:0.0)) – Alpha value for filling shapes.outline_alpha (
float(default:1.0)) – Alpha value for shape outlines.contour_px (
int(default:3)) – Pixel width of contours.figsize (
Optional[tuple[int,int]] (default:None)) – The size of the figure.dpi (
Optional[int] (default:None)) – The DPI of the figure.coordinate_system (
str(default:'global')) – The coordinate system to use for rendering.show (
bool(default:True)) – Whether to show the plot or return it.**kwargs – Passed to spatialdata.pl.render_labels.
- Returns:
None if show is True, otherwise returns the rendered SpatialData object.