show_segmentation#
- cellpose_omni.plot.show_segmentation(fig, img, maski, flowi, bdi=None, channels=None, file_name=None, omni=False, seg_norm=False, bg_color=None, outline_color=[1, 0, 0], img_colors=None, channel_axis=- 1, display=True, interpolation='bilinear')[source]#
plot segmentation results (like on website)
Can save each panel of figure with file_name option. Use channels option if img input is not an RGB image with 3 channels.
- Parameters
fig (matplotlib.pyplot.figure) -- figure in which to make plot
img (2D or 3D array) -- image input into cellpose
maski (int, 2D array) -- for image k, masks[k] output from cellpose_omni.eval, where 0=NO masks; 1,2,...=mask labels
flowi (int, 2D array) -- for image k, flows[k][0] output from cellpose_omni.eval (RGB of flows)
channels (list of int (optional, default [0,0])) -- channels used to run Cellpose, no need to use if image is RGB
file_name (str (optional, default None)) -- file name of image, if file_name is not None, figure panels are saved
omni (bool (optional, default False)) -- use omni version of normalize99, image_to_rgb
seg_norm (bool (optional, default False)) -- improve cell visibility under labels
bg_color (float (Optional, default none)) -- background color to draw behind flow (visible if flow transparency is on)
img_colors (NDarray, float (Optional, default none)) -- colors to which each image channel will be mapped (multichannel defaults to sinebow)