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

Problem of reading dbit-seq image #267

Open
KaiLi-2324 opened this issue Jan 26, 2025 · 1 comment
Open

Problem of reading dbit-seq image #267

KaiLi-2324 opened this issue Jan 26, 2025 · 1 comment

Comments

@KaiLi-2324
Copy link

Hi @LucaMarconato . Thanks for developing spatialdata-io, it is super helpful in processing spatial data. I wanted to use this package to process my dbit-seq data, but I had trouble reading the dbit-seq image with sd.models.Image2DModel.parse function. It said "ValueError: Wrong dims: ('y', 'x'). Expected ('c', 'y', 'x').". My image is (2000, 2000), and it seems that the Image2DModel doesn't work well with my data. Do you have any suggestions on this? Thanks very much!

Image

@LucaMarconato
Copy link
Member

Hi @KaiLi-2324, thanks for your interest in the package. Adding a dummy dimension by reshaping the array will be enough to solve your problem. If you have images with single channels, Image2DModel.parse() will expect the shape (1, y, x). For instance if you use numpy you can do np.expand_dims(x, 0).

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

No branches or pull requests

2 participants