Skip to content

CosMx Reader Incorrectly Assumes Image Dimension Order #403

Description

@SFD5311

The CosMx reader implements some pretty rigid expectations about image dimension order in input images here:
https://github.com/scverse/spatialdata-io/blob/main/src/spatialdata_io/readers/cosmx.py#L197

In the course of testing a pipeline for processing data for the SenNet and HuBMAP consortia, I've encountered data where dask_image.imread.imread() returns data with dimensions ordered like this:

>>> img = imread.imread('FOV0046.tiff')
>>> img
dask.array<_map_read_frame, shape=(5, 4256, 4256), dtype=uint16, chunksize=(1, 4256, 4256), chunktype=numpy.ndarray>

The transposition of C and Y dimensions relative to the reader's expectations results in some issues visualizing data downstream. I understand that there's a new CosMx reader in development, and am wondering if it will have more flexible expectations about image dimension ordering, and if there's a timeline for the release of the new reader.

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