Image array layer grouping


I’ve been using napari to visualize some highly multimodal datasets, each modality containing multiple image layers. One issue I encounter is navigation. For instance, one of my multichannel images has 4 individual planes, they are each rendered on the sidebar as a layer with no association. What I think could be nice is if an ‘layer group’ could be made where the layer could be a top-level modality, Modality 1, that could be turned on and off for all layers (Modality 1 - Layer 1, Layer 2, etc.), then there could be an indented sub-menu for the modality where individual layers can be toggled on and off. This could very handily clean up the navigation working with large multimodal datasets.

This image is out of context but is a visual on what I maybe didn’t put well into words.

I am posting this here on the chance this exists and I just haven’t found it.

Thanks for the great work…

1 Like

Hi Heath! Indeed the idea of layer groups has popped up a few times in discussion before, so I think it’s a good one! Could you create an issue in to track it. (There may even be one already but I don’t see one, so the idea probably came up in discussions in other issues and during meetings.)

Computationally, I don’t think it’s too hard to implement — e.g. allow nesting in the layer list — but in the UI it’ll be interesting. I guess you could slightly indent layers belonging to a group, add a “layer” handle for the group as a whole, and allow expanding/collapsing groups.

… Which I just saw is what you suggested, but it didn’t quite register the first time around. :man_facepalming::joy:

Anyway, yes, great idea, I’m pretty sure we should support this!


Yup agreed, thanks for making the issue - cross posting here for reference, I’ll weigh in more on the discussion over there

1 Like