scallops.visualize.registration.plot_registration
- scallops.visualize.registration.plot_registration(stacks, dpi=250, titles=None, plot_cols=None, **kwargs)
Plot raw images from a list of DataArray with registered images to be visualized.
- Parameters:
stacks (Sequence[DataArray]) – List of DataArray with registered images to be visualized.
dpi (int) – Requested DPI (only relevant if saving to file or visualizing in Jupyter notebooks).
titles (None | Sequence[str]) – Optional list of titles. Must be the same length as the number of stacks to plot.
plot_cols (None | int) – Number of columns to plot.
kwargs – Key word arguments to be passed to plt.subplots
- Returns:
List of matplotlib Axes representing the plotted images.
- Example:
import numpy as np import xarray as xr from scallops.visualize.registration import plot_registration # Create synthetic DataArrays image_shape = (3, 4, 100, 100) # (t, c, y, x) stacks = [ xr.DataArray(np.random.rand(*image_shape), dims=("t", "c", "y", "x")), xr.DataArray(np.random.rand(*image_shape), dims=("t", "c", "y", "x")), xr.DataArray(np.random.rand(*image_shape), dims=("t", "c", "y", "x")), ] # Plot the registration results axes = plot_registration( stacks, dpi=150, titles=["Stack 1", "Stack 2", "Stack 3"] ) plt.show()
- Return type:
Sequence[Axes]