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

WIP: Add ZarrTIFFWSIReader class. #897

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

aacic
Copy link

@aacic aacic commented Dec 9, 2024

The ZarrTIFFWSIReader reads fsspec json file which represents SVS wsi.
The methods: read_rect, read_bounds, _canonical_shape are copied from TIFFWSIReader, and it needs to be improved by introducing delegates or some other way.

The method infor reads SVS metadata which is stored in the root group metadata like:

{
  ".zattrs": {
    "multiscales": [
      {
        "metadata": {
          "objective_power": 40,
          "vendor": "Aperio",
          "mpp": [0.2525, 0.2525]	
        }
      }
    ]
  }
}

To test, execute from the root dir:

pip install -r requirements/requirements_dev.txt
mkdir -p samples/slides
mkdir -p samples/fsspec
cd samples/slides
curl -C - -o TCGA-22-1017-01Z-00-DX1.9562FE79-A261-42D3-B394-F3E0E2FF7DDA.svs   https://api.gdc.cancer.gov/data/73c69d24-6f9e-44e2-bfe5-a608d4cf5c27
cd ../../tests/zarrtiff/
python tiff_fsspec.py "../../samples/slides/TCGA-22-1017-01Z-00-DX1.9562FE79-A261-42D3-B394-F3E0E2FF7DDA.svs"  "../../samples/fsspec/73c69d24-6f9e-44e2-bfe5-a608d4cf5c27_fsspec.json" "https://api.gdc.cancer.gov/data/73c69d24-6f9e-44e2-bfe5-a608d4cf5c27"

Change the svs variable inside of tileserver.py to:

svs = "../../samples/fsspec/73c69d24-6f9e-44e2-bfe5-a608d4cf5c27_fsspec.json"

python tileserver.py

Open http://127.0.0.1:5000/ and verify how it works.

@aacic aacic changed the title Add ZarrTIFFWSIReader class. WIP: Add ZarrTIFFWSIReader class. Dec 9, 2024
@aacic aacic force-pushed the zarr-tiff-wsi-reader branch from 3805565 to cbd657f Compare December 12, 2024 13:59
@aacic aacic force-pushed the zarr-tiff-wsi-reader branch from bfa8b4b to 1bc2356 Compare December 16, 2024 16:51
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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.

1 participant