napari / napari

napari: a fast, interactive, multi-dimensional image viewer for python
https://napari.org
BSD 3-Clause "New" or "Revised" License
2.18k stars 420 forks source link

Use Overlays to be able to provide layer names on the canvas (including grid mode) #7321

Open psobolewskiPhD opened 1 week ago

psobolewskiPhD commented 1 week ago

🚀 Feature

it can be useful, e.g. for screenshots, to be able to put the layer name on the canvas -- like the scale bar (+/- box, font size control). As overlay for this would be perfect, but it would need to be translated in grid mode to stay with the layer.

Motivation

See https://github.com/napari/napari/pull/7319#issuecomment-2394915226 There are 5 layers shown in grid mode, but it's not possible to label them easily as to which represents what.

Pitch

An overlay implementation for a text box with font and color control and with a box background with color control. The box would be able to be positioned in the 4 corners of the canvas. In grid mode, the overlay would stick with the layer.

Alternatives

?

Additional context

Czaki commented 1 week ago

Maybe just allow to put "Info box" with all the important information required by the user, defaulting to layer name?

TimMonko commented 1 week ago

Thanks for making this PR! A feature I've been wanting for a while. I've noticed lots of microscopy software has this feature, so users (including me) have wondered where it is -- just figured I didn't know where to find it.

It would be interesting what sorts of other things could conveniently be added to the info box, but I think this is dependent on napari handling file metadata better. e.g. exposure time, fluorescence parameters, objective, sample ID, etc. All useful in both grid and non-grid mode.