napari-clusters-plotter icon indicating copy to clipboard operation
napari-clusters-plotter copied to clipboard

Avoid using Labels.color

Open zoccoler opened this issue 11 months ago • 0 comments

With napari 0.4.19, this warnings pops up after manually selecting a cluster

FutureWarning: Labels.color is deprecated since 0.4.19 and will be removed in 0.5.0, please set Labels.colormap directly with an instance of napari.utils.colormaps.DirectLabelColormap instead.!

It may be solved by replacing at least this line, this line and this line with something like:

layer_in_viewer.colormap= self.visualized_layer.colormap

and

"colormap": DirectLabelColormap(color_dict=cmap_dict),

This needs to be tested.

zoccoler avatar Mar 14 '24 10:03 zoccoler