Skip to content

Improve handling of RGB dataset dimensions#1840

Merged
axelboc merged 2 commits into
mainfrom
rgb-stack
Aug 14, 2025
Merged

Improve handling of RGB dataset dimensions#1840
axelboc merged 2 commits into
mainfrom
rgb-stack

Conversation

@axelboc

@axelboc axelboc commented Aug 14, 2025

Copy link
Copy Markdown
Contributor

Fix #1838

This PR fixes the issue above by now sending a complete selection string for RGB stacks with all providers, therefore moving past the fetching error in HSDS.

This is done by making a more general improvement to how dimensions of RGB datasets are handled: when the RGB vis is selected, the last dimension (the one with the channels) is now visible in the dimension mapper but locked so it cannot be mapped to an axis:

image
Screencast.from.2025-08-14.09-29-05.webm

I've done this by introducing the concept of "locked dimensions" to the dimension mapper. When a dimension is locked, it is marked as null in the dim mapping state.

@axelboc axelboc left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The screenshot and recording were actually taken with h5grove because I have another issue with HSDS: the RGB images are now properly fetched with full selection strings, but they're all black because I'm only getting zeros... I'm not sure if it's specific to the file I'm testing with (cf. #1838) or something in HSDS. We're not on the latest version, so I'm hoping @Flydroid won't get the issue. Otherwise, I'll open a dedicated issue.

Note that the mandrill image still works fine with HSDS and that you can now see the last dimension:

image

Comment thread packages/app/src/dim-mapping-store.tsx
Comment thread packages/lib/src/dimension-mapper/utils.ts
@axelboc

axelboc commented Aug 14, 2025

Copy link
Copy Markdown
Contributor Author

/approve

@axelboc axelboc requested a review from loichuder August 14, 2025 07:59
@loichuder

Copy link
Copy Markdown
Member

the RGB images are now properly fetched with full selection strings, but they're all black because I'm only getting zeros...

Probably due to some mismatch in the expected format. If you expect RGB integers (0-255), but get RGB floats (0-1), the numbers will all be zeros.

Comment thread packages/lib/src/dimension-mapper/utils.ts
@loichuder loichuder self-requested a review August 14, 2025 11:21
@axelboc axelboc merged commit bf30acf into main Aug 14, 2025
9 checks passed
@axelboc axelboc deleted the rgb-stack branch August 14, 2025 11:44
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.

Truncated selection prevents fetching RGB stack with HSDS

2 participants