How to display many images in a grid?
With napari 0.6.2, the grid mode now links the images in every grid tile under the assumptions that every tile is a different view of the same data. However, that conflicts a bit with how cross-layer functionality is currently done in the napari-clusters-plotter. The previous way of unlinked grid tiles was actually quite nice for this.
I guess one way of solving this would be to partially undo https://github.com/BiAPoL/napari-clusters-plotter/pull/422, which used the grid stride first to make the layer ordering a bit more natural and easy to use. Another way would be to do it as before and arrange tiles using the translate property of the layers.
CC @brisvag - do you maybe have a suggestion for us on how to do this?
For reference see doc pages - it was a cool feature to zoom in/out into individual tiles as if they were samples in a plate :)
I'm not familiar with the specific use of the grid here, however at a glance I would say that yes, if you want you layers to be physically non-overlapping in world space, you should use translate.
We discussed that we might want to provide a utility function that applies translations like the old behaviour if enough people want it :)
We discussed that we might want to provide a utility function that applies translations like the old behaviour if enough people want it :)
I would totally make use of such a function :) I guess I'll tinker around with that a bit here - maybe it could be astarting point for a feature in napari later.
@jo-mueller I'm having a hard time visualizing why the new grid mode is not appropriate for you. Could you not still use stride to overlap appropriate layers and still have them be separate samples? Indeed, that's what I use the new grid view for already, "as if they were samples in a plate", I just see it as zooming into all samples at the same time. In the future, multiple-views mode (rather than linked cameras) would make this better.
Is it something specific to cluster-plotter that makes this not an ideal implementation? BTW I use this plugin, so it's really just not obvious to me
Hi @TimMonko , thanks for chiming in (and glad to hear that you are a clusters-plotter user :))
To be honest, I don't think there's a hard reason that would make the current grid less favorable to a translate grid. The only thing I've noticed so far, is that it's a bit slower (see bbbc07 example data set, for instance).
One troublesome scenario I could imagine down the road would be working with many samples in the viewer as dask-backed labels, for instance. Zooming into all at once would trigger quite a few io-operations which could be avoided by zooming into one sample specifically.
Don't get me wrong, I love the new grid mode. I could imagine that it looks super-cool with a trsnalte-grid and linked layers. Zooming into a large panel of (possibly multichannel) samples would then have exactly the desired effect of seeing different layers of information side-by-side.