Skip to content

feat: Auto multichannel setup for image layers #770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

seankmartin
Copy link
Contributor

This is to introduce a new behaviour where the new tool palettes are leveraged to create a more automated setup for multi-channel image datasets (and optionally can be also used for single channel image datasets).

Entry points

The first entry point to this is when making a new layer:
image

In this case, the user can pick whether to use the default image layer setup, or the multi-channel setup, even if they only have one channel. The option is given because the setup does some things like setting a different shader, creating a tool palette, setting default contrast limits etc.

The other entry point to this is when making an auto layer. In this case it only does the multi-channel setup if more than one channel is in the data.

Setup behaviour

The following happens:

  1. Each channel is split into a separate layer. Only the first four of these are shown, the rest are archived. If using omero, it can instead flag the active channels for rendering.
  2. These are simply named as LAYERNAME cCHANNELDIM1_CHANNELDIM2... unless the omero label metadata is present, in which case that is used instead.
  3. The color and contrast of these layers is automatically set, unless informed by omero metadata. A check is performed on the omero metadata to see if it is likely to be well setup, and if not, the automatic setting is still used. If the omero metadata is well setup it informs this instead.
  4. A tool palette with all the shader controls is shown on the left-hand side if there is no shader control palette already loaded.

Example

Example auto mode setup (dimensions manually shuffled from t z y x to x y z t after setup). Could consider doing that as part of setup I guess if helpful.

image

@seankmartin seankmartin changed the title feat: auto multichannel setup for image layers feat: Auto multichannel setup for image layers Apr 23, 2025
@fcollman
Copy link
Contributor

fcollman commented Apr 25, 2025

I tried this with the first zarr from the institute and got this error
s3://allen-genetic-tools/epifluorescence/1383646325/ome_zarr_conversion/1383646325.zarr|zarr2:

Error parsing "name" property: Expected string, but received: undefined.

i'm not sure if this is because it's searching for something needs to exist in the spec and this file doesn't have it, or its optional and neuroglancer should handle it, or whether its a full on bug.

what I can say is that neuroglancer handled this zarr before this PR and now does not.

@seankmartin
Copy link
Contributor Author

seankmartin commented Apr 25, 2025

Thanks for catching this one! Misunderstood the omero spec and thought that name was required, fixing that now

@seankmartin
Copy link
Contributor Author

seankmartin commented Apr 25, 2025

Not sure if I've correctly understood the window min/max and start/end. Is this the intended setup for the blue channel?

The metadata has the end outside the range of the max. I guess we need a verification step to clamp the start end within the min/max.

Or perhaps something is going wrong when reading the metadata
image

@fcollman
Copy link
Contributor

fcollman commented May 2, 2025

some feedback... In multichannel setup, opacity of layers should be 1.0 by default, and additive blending mode by default.

@seankmartin seankmartin marked this pull request as ready for review May 5, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants