Visualization¶
Functions to visualize and plot datasets.
- registration_tools.visualization.add_image(viewer, dataset, split_channel=None, scale=None, padding=None, affine=None, **kwargs)[source]¶
Plots the images in the dataset in the viewer.
- Parameters:
viewer (napari.Viewer) – The napari viewer instance.
dataset (Dataset) – The dataset object.
channels (list, optional) – List of channels to plot. If None, all channels are plotted.
numbers (list, optional) – List of numbers to plot. If None, all numbers are plotted.
scale (tuple, optional) – Scale for the images. Default is (1, 1, 1).
downsample (tuple, optional) – downsample factor for the images. Default is (1, 1, 1).
verbosity (int, optional) – Verbosity level. Default is 1.
- registration_tools.visualization.add_image_difference(viewer, dataset, dt=1, cmap1='red', cmap2='green', opacity1=1, opacity2=0.5, scale=None, **kwargs)[source]¶
- registration_tools.visualization.make_video(viewer, save_file, time_channel=0, fps=10, zooms=None, angles=None, canvas_only=True)[source]¶
Creates a video from the napari viewer by taking screenshots of all time points.
- Parameters:
viewer (napari.Viewer) – The napari viewer instance.
save_file (str) – The path to save the video. Must have a .gif extension.
time_channel (int, optional) – The dimension index for time. Default is 0.
fps (int, optional) – Frames per second for the video. Default is 10.
zooms (list, optional) – List of zoom levels for each time point. If None, keep fixed.
angles (list, optional) – List of camera angles for each time point. If None, keep fixed.
canvas_only (bool, optional) – Whether to capture only the canvas or the entire viewer. Default is True.
- Returns:
None