Skip to content

label type is set to string/integer - #3

Open
Artur-man wants to merge 3 commits into
Huber-group-EMBL:mainfrom
Artur-man:label
Open

label type is set to string/integer#3
Artur-man wants to merge 3 commits into
Huber-group-EMBL:mainfrom
Artur-man:label

Conversation

@Artur-man

@Artur-man Artur-man commented May 1, 2026

Copy link
Copy Markdown

This is not too common for SpatialData objects but some RGB images come with channel names 0,1,2. Setting label type to string/integer is an easy fix.

> path <- system.file("extdata", "blobs_v3.zarr", package="SpatialData")
> SpatialData.validate::spdata_validate(file.path(path, "images/blobs_multiscale_image/"))
[1] TRUE

Here is a related issue: Huber-group-EMBL/romeo#7

@Bisaloo

Bisaloo commented May 1, 2026

Copy link
Copy Markdown
Member

I'm okay with merging it as a temporary workaround but let's pair it with a bug report in SpatialData. I talked with Luca in Padova and it's a bug that strings containing integers get silently converted to integers here. This is not complying with the OME schema.

It's a different situation than the transformations not complying with the OME schema because the transformation situation is done consciously.

@Artur-man

Artur-man commented May 1, 2026

Copy link
Copy Markdown
Author

Agree, will open an issue ...

Progress: checking now 0.1 schema .... do we have 0.2 no ?

@Artur-man Artur-man changed the title label type of 0.3 is set to string/integer label type is set to string/integer May 1, 2026
@Bisaloo

Bisaloo commented May 1, 2026

Copy link
Copy Markdown
Member

No, I didn't have an example v0.2 dataset

@Artur-man

Artur-man commented May 1, 2026

Copy link
Copy Markdown
Author

We might be able to generate. spatialdata.write has an argument for that i think:
https://spatialdata.scverse.org/en/stable/api/SpatialData.html#spatialdata.SpatialData.write

I will try

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