Skip to content

Separate dask_image and imageio kwargs in VisiumHD #293

@quentinblampey

Description

@quentinblampey

Hi @LucaMarconato,

I have some Visium HD data with a .btf fullres image, and it seems that I need to provide page=0 to imageio.imread. Else, I have an out-of-range error (I don't know why imageio doesn't detect that my image has one series and one page).

So I simply tried to use imread_kwargs={"page": 0}, but the problem is that now the reader also provides page=0 to dask_image.imread when reading the hires/lowres images, so dask_image.imread complains because imread() got an unexpected keyword argument 'page'.

This should be a simple fix, but I wanted to discuss it with you before making a PR. Have you already experience the need to provide page=0 to imageio.imread? Maybe my image has something wrong.

I see two possible solutions:

  1. We always provide page=0 to imageio.imread, but this might create other issues for others users.
  2. We add an argument imageio_imread_kwargs to separate it from the other imread_kwargs, but this is quite ugly.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions