Field of view plot

Functions to visualize 2D and 3D images:

Plot images

Plot 2D images or slices of 3D images:

bigfish.plot.plot_yx(image, r=0, c=0, z=0, rescale=False, contrast=False, title=None, framesize=(10, 10), remove_frame=True, path_output=None, ext='png', show=True)

Plot the selected yx plan of the selected dimensions of an image.

Parameters:
imagenp.ndarray

A 2-d, 3-d, 4-d or 5-d image with shape (y, x), (z, y, x), (c, z, y, x) or (r, c, z, y, x) respectively.

rint, default=0

Index of the round to keep.

cint, default=0

Index of the channel to keep.

zint, default=0

Index of the z slice to keep.

rescalebool, default=False

Rescale pixel values of the image (made by default in matplotlib).

contrastbool, default=False

Contrast image.

titlestr, optional

Title of the image.

framesizetuple=(10, 10)

Size of the frame used to plot with plt.figure(figsize=framesize).

remove_framebool, default=True

Remove axes and frame.

path_outputstr, optional

Path to save the image (without extension).

extstr or list, default=’png’

Extension used to save the plot. If it is a list of strings, the plot will be saved several times.

showbool, default=True

Show the figure or not.

bigfish.plot.plot_images(images, rescale=False, contrast=False, titles=None, framesize=(15, 10), remove_frame=True, path_output=None, ext='png', show=True)

Plot or subplot of 2-d images.

Parameters:
imagesnp.ndarray or list

Image or list of images with shape (y, x).

rescalebool, default=False

Rescale pixel values of the image (made by default in matplotlib).

contrastbool, default=False

Contrast image.

titlesstr or list, optional

Titles of the subplots.

framesizetuple, default=(15, 10)

Size of the frame used to plot with plt.figure(figsize=framesize).

remove_framebool, default=True

Remove axes and frame.

path_outputstr, optional

Path to save the image (without extension).

extstr or list, default=’png’

Extension used to save the plot. If it is a list of strings, the plot will be saved several times.

showbool, default=True

Show the figure or not.


Plot quality measure of an image

Plot focus measures for a 3D image:

bigfish.plot.plot_sharpness(focus_measures, labels=None, title=None, framesize=(5, 5), size_title=20, size_axes=15, size_legend=15, path_output=None, ext='png', show=True)

Plot focus measures of a 3-d image, at the z-slice level.

A measure of focus for each z-slice can be computed by averaging the pixel-wise focus measure returned from bigfish.stack.compute_focus().

Parameters:
focus_measuresnp.ndarray or list

A list of 1-d arrays with the sharpness measure for each z-slices.

labelsstr or list, optional

List of labels for the different measures to compare.

titlestr, optional

Title of the plot.

framesizetuple, default=(5, 5)

Size of the frame used to plot with plt.figure(figsize=framesize).

size_titleint, default=20

Size of the title.

size_axesint, default=15

Size of the axes label.

size_legendint, default=15

Size of the legend.

path_outputstr, optional

Path to save the image (without extension).

extstr or list, default=’png’

Extension used to save the plot. If it is a list of strings, the plot will be saved several times.

showbool, default=True

Show the figure or not.