From ad646e3ed084cc347b56d028b6b98e5088e2dfa3 Mon Sep 17 00:00:00 2001 From: Quentin Blampey Date: Mon, 24 Mar 2025 17:10:25 +0100 Subject: [PATCH 1/4] don't use the image_kwargs for dask imread --- src/spatialdata_io/readers/visium_hd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spatialdata_io/readers/visium_hd.py b/src/spatialdata_io/readers/visium_hd.py index 33037239..b37218a5 100644 --- a/src/spatialdata_io/readers/visium_hd.py +++ b/src/spatialdata_io/readers/visium_hd.py @@ -464,7 +464,7 @@ def _load_image( ) -> None: if path.exists(): if path.suffix != ".btf": - data = imread(path, **imread_kwargs) + data = imread(path) if len(data.shape) == 4: # this happens for the cytassist, hires and lowres images; the umi image doesn't need processing data = data.squeeze() From a8ab221fa481b6afadc8f8b760f436364f36fd83 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 16:28:53 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 02213221..f598404d 100644 --- a/README.md +++ b/README.md @@ -111,8 +111,7 @@ Marconato, L., Palla, G., Yamauchi, K.A. et al. SpatialData: an open and univers [link-docs]: https://spatialdata.scverse.org/projects/io/en/latest/ [link-api]: https://spatialdata.scverse.org/projects/io/en/latest/api.html [link-cli]: https://spatialdata.scverse.org/projects/io/en/latest/cli.html - -[//]: # (numfocus-fiscal-sponsor-attribution) +[//]: # "numfocus-fiscal-sponsor-attribution" spatialdata-io is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/). If you like scverse® and want to support our mission, please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs. From 5ced320060ebb6510aa2f1aa17fc0ed197205cde Mon Sep 17 00:00:00 2001 From: Quentin Blampey Date: Tue, 25 Mar 2025 09:01:58 +0100 Subject: [PATCH 3/4] move fullres image in right coordinate system --- src/spatialdata_io/readers/visium_hd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/spatialdata_io/readers/visium_hd.py b/src/spatialdata_io/readers/visium_hd.py index b37218a5..c547db3a 100644 --- a/src/spatialdata_io/readers/visium_hd.py +++ b/src/spatialdata_io/readers/visium_hd.py @@ -307,6 +307,7 @@ def _get_bins(path_bins: Path) -> list[str]: suffix="_full_image", scale_factors=[2, 2, 2, 2], ) + set_transformation(images[f"{dataset_id}_full_image"], {dataset_id: Identity()}, set_all=True) # hires image hires_image_path = [path for path in all_files if VisiumHDKeys.IMAGE_HIRES_FILE in str(path)] From fe474c664142cc86f2e00e3e6dffeb5c16fd1c9b Mon Sep 17 00:00:00 2001 From: Quentin Blampey <33903498+quentinblampey@users.noreply.github.com> Date: Thu, 17 Apr 2025 15:34:14 +0200 Subject: [PATCH 4/4] revert fix coordinate system --- src/spatialdata_io/readers/visium_hd.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/spatialdata_io/readers/visium_hd.py b/src/spatialdata_io/readers/visium_hd.py index c547db3a..b37218a5 100644 --- a/src/spatialdata_io/readers/visium_hd.py +++ b/src/spatialdata_io/readers/visium_hd.py @@ -307,7 +307,6 @@ def _get_bins(path_bins: Path) -> list[str]: suffix="_full_image", scale_factors=[2, 2, 2, 2], ) - set_transformation(images[f"{dataset_id}_full_image"], {dataset_id: Identity()}, set_all=True) # hires image hires_image_path = [path for path in all_files if VisiumHDKeys.IMAGE_HIRES_FILE in str(path)]