ImageContainer.show

ImageContainer.show#

ImageContainer.show(layer=None, library_id=None, channel=None, channelwise=False, segmentation_layer=None, segmentation_alpha=0.75, transpose=None, ax=None, figsize=None, dpi=None, save=None, **kwargs)[source]#

Show an image within this container.

Parameters:
layer str | None (default: None)

Image layer in img that should be processed. If None and only 1 layer is present, it will be selected.

library_id str | Sequence[str] | None (default: None)

Name of Z-dimension to plot. In None, plot all Z-dimensions as separate images.

channel int | Sequence[int] | None (default: None)

Channels to plot. If None, use all channels.

channelwise bool (default: False)

Whether to plot each channel separately or not.

segmentation_layer str | None (default: None)

Segmentation layer to plot over each ax.

segmentation_alpha float (default: 0.75)

Alpha value for segmentation_layer.

transpose bool | None (default: None)

Whether to plot Z-dimensions in columns or in rows. If None, it will be set to not channelwise.

ax Axes | None (default: None)

Optional matplotlib axes where to plot the image. If not None, save, figsize and dpi have no effect.

figsize tuple[float, float] | None (default: None)

Size of the figure in inches.

dpi int | None (default: None)

Dots per inch.

save str | Path | None (default: None)

Whether to save the plot.

kwargs Any

Keyword arguments for matplotlib.axes.Axes.imshow().

Returns:

None – Nothing, just plots the figure and optionally saves the plot.

Raises:

ValueError – If number of supplied axes is different than the number of requested Z-dimensions or channels.