SliceWidget#

class napari_matplotlib.SliceWidget(napari_viewer: napari.Viewer, parent: QWidget | None = None)#

Bases: SingleAxesWidget

Plot a 1D slice along a given dimension.

Attributes Summary

current_dim_index

Currently selected slice dimension index.

current_dim_name

Currently selected slice dimension.

input_layer_types

Type of layer taken as input

n_layers_input

Number of layers taken as input

Methods Summary

draw()

Clear axes and draw a 1D plot.

on_update_layers()

Called when layer selection is updated.

Attributes Documentation

current_dim_index#

Currently selected slice dimension index.

current_dim_name#

Currently selected slice dimension.

input_layer_types: tuple[Layer, ...] = (<class 'napari.layers.image.image.Image'>,)#

Type of layer taken as input

n_layers_input = Interval(1, 1)#

Number of layers taken as input

Methods Documentation

draw() None#

Clear axes and draw a 1D plot.

on_update_layers() None#

Called when layer selection is updated.