Hi @albe-jj I’m happy to take a closer look, but first I would need a complete Minimal Reproducible Example that I can actually take and run (as-is) to investigate. The above snippet is missing (at least) imports.
I’d also like to point your attention to a recent comment on a PR that another core dev made to add categorical colormapping to 3d image stacks:
My comment was that it seems this could easily be extended to support picking individual slices from s stack to colormap (e.g. that a slider could then be used to scrub through). I don’t think I ever got around to making an issue about it though, so I’d really like to encourage you to make a GitHub Issue for this feature request (it’s always better when feature requests are described by end-users).