napari_bigfish.napari_util module

class napari_bigfish.napari_util.NapariUtil(viewer)[source]

Bases: object

Utility methods for the napari image viewer.

getDataOfLayerWithName(name)[source]

Return the data of the layer with the given name.

Parameters:

name (str) – The name of the layer

Returns:

The layer with the given name if it exists and None otherwise

getLabelLayers()[source]

Return all label layers

Returns:

A list of the label layers in the viewer

Return type:

[napari.layers.labels.labels.Labels]

getLayersOfType(layerType)[source]

Return all layers of type layerType in the viewer

Parameters:

layerType – A napari layer type like Labels or Points.

Returns:

A list of the layers with the given type

getPointsLayers()[source]

Return all point layers

Returns:

A list of the point layers in the viewer

Return type:

[napari.layers.points.points.Points]