bebi103.image.imshow
- bebi103.image.imshow(im, cmap=None, length_units='pixels', interpixel_distance=1.0, colorbar=False, no_ticks=False, flip=True, return_im=False, saturate_channels=True, min_intensity=None, max_intensity=None, display_clicks=False, record_clicks=False, **kwargs)
Display an image in a Bokeh figure.
- Parameters
im (Numpy array) – If 2D, intensity image to be displayed. If 3D, first two dimensions are pixel values. Last dimension can be of length 1, 2, or 3, which specify colors.
cmap (str or list of hex colors, default None) – If im is an intensity image, cmap is a mapping of intensity to color. If None, default is 256-level Viridis. If im is a color image, then cmap can either be ‘rgb’ or ‘cmy’ (default), for RGB or CMY merge of channels.
length_units (str, default 'pixels') – The units of length in the image.
interpixel_distance (float, default 1.0) – Interpixel distance in units of length_units.
colorbar (bool, default False) – If True, include a colorbar.
no_ticks (bool, default False) – If True, no ticks are displayed. See note below.
flip (bool, default True) – If True, flip image so it displays right-side up. This is necessary because traditionally images have their 0,0 pixel index in the top left corner, and not the bottom left corner.
return_im (bool, default False) – If True, return the GlyphRenderer instance of the image being displayed.
saturate_channels (bool, default True) – If True, each of the channels have their displayed pixel values extended to range from 0 to 255 to show the full dynamic range.
min_intensity (int or float, default None) – Minimum possible intensity of a pixel in the image. If None, the image is scaled based on the dynamic range in the image.
max_intensity (int or float, default None) – Maximum possible intensity of a pixel in the image. If None, the image is scaled based on the dynamic range in the image.
display_clicks (bool, default False) – If True, display clicks to the right of the plot using JavaScript. The clicks are not recorded nor stored, just printed. If you want to store the clicks, use the record_clicks() or draw_rois() functions.
record_clicks (bool, default False) – Deprecated. Use display_clicks.
kwargs (dict) – All other kwargs passed to bokeh.plotting.figure().
- Returns
p (bokeh.plotting.figure instance) – Bokeh plot with image displayed.
im (bokeh.models.renderers.GlyphRenderer instance (optional)) – The GlyphRenderer instance of the image being displayed. This is only returned if return_im is True.