Skip to content
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

Tell image server to consider 3 channel uint8 data as RGB #7

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

melissalinkert
Copy link
Member

...even if the microservice is used. This affects the image types that are available, see https://qupath.readthedocs.io/en/stable/docs/starting/first_steps.html#setting-the-image-type.

If rgb(false) was passed, brightfield image types are never available, so workflows that rely on a brightfield image can break.

The issue and fix can be tested with any uint8 3-channel image on any server we've previously used for testing this extension. Standard CMU-1.svs or similar would be a suitable file to have imported.

Without this change, opening the test image via the 0.4.3-gs extension should prompt for an image type, but only allow non-brightfield types. So as in this screenshot, but with the first row of options missing:

https://qupath.readthedocs.io/en/stable/docs/starting/first_steps.html#setting-the-image-type

This is because the prompt for an image type specifically does not allow brightfield types to be selected if the image server does not identify the image as RGB:

https://github.com/qupath/qupath/blob/main/qupath-gui-fx/src/main/java/qupath/lib/gui/panes/ImageDetailsPane.java#L388

The change here tells the image server to report an image as RGB if the microservice was not used (as before) or if there are exactly 3 uint8 channels and the microservice is used. With this change, the prompt for an image type should allow all of the brightfield options to be selected (as in the linked screenshot above). I would expect no other change in behavior, as this is intended not to affect how image data is actually retrieved from OMERO.

...even if the microservice is used. This affects the image types that are available,
see https://qupath.readthedocs.io/en/stable/docs/starting/first_steps.html#setting-the-image-type.
If `rgb(false)` was passed, brightfield image types are never available, so
workflows that rely on a brightfield image can break.
Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the current release of the extension (0.4.3-gs) confirm that the Brightfield options are not displayed e.g. using one of the TCGA SVS files

Screenshot 2024-09-11 at 09 42 46

With this PR included, the brightfield options are now available at opening time as expected

Screenshot 2024-09-11 at 09 46 04

Copy link
Member

@muhanadz muhanadz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on multiple images with and without the PR on https://qupath-testing.dev.omero-plus.io/
PR does as descried. Same results and outputs as @sbesson
LGTM!

@sbesson sbesson merged commit abe1e96 into glencoesoftware:main Sep 18, 2024
1 check passed
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.

3 participants