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

[BUG] Wrong Spacing for Aperio SVS #529

Open
drbeh opened this issue Mar 29, 2023 · 2 comments
Open

[BUG] Wrong Spacing for Aperio SVS #529

drbeh opened this issue Mar 29, 2023 · 2 comments
Labels
bug Something isn't working MONAI MONAI-specific requests

Comments

@drbeh
Copy link
Member

drbeh commented Mar 29, 2023

Describe the bug
CuImage does not infer the correct spacing for Aperio SVS image.

Steps/Code to reproduce bug
Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.

-Step 1

wget https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/Aperio-CMU-1.svs

-Step 2

wsi = CuImage("Aperio-CMU-1.svs")
wsi.metadat

-Results

{'aperio': {'AppMag': '20', 'Date': '12/29/09', 'Filename': 'CMU-1', 'Filtered': '5', 'Focus Offset': '0.000000', 'Header': 'Aperio Image Library v10.0.51\r\n46920x33014 [0,100 46000x32914] (256x256) JPEG/RGB Q=30', 'ICC Profile': 'ScanScope v1', 'ImageID': '1004486', 'Left': '25.691574', 'LineAreaXOffset': '0.019265', 'LineAreaYOffset': '-0.000313', 'LineCameraSkew': '-0.000424', 'MPP': '0.4990', 'OriginalWidth': '46920', 'Originalheight': '33014', 'Parmset': 'USM Filter', 'ScanScope ID': 'CPAPERIOCS', 'StripeWidth': '2040', 'Time': '09:59:15', 'Top': '23.449873', 'User': 'b414003d-95c6-48b0-9369-8010ed517ba7'}, 'cucim': {'associated_images': ['label', 'macro', 'thumbnail'], 'channel_names': ['R', 'G', 'B'], 'coord_sys': 'LPS', 'dims': 'YXC', 'direction': [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], 'dtype': {'bits': 8, 'code': 1, 'lanes': 1}, 'ndim': 3, 'origin': [0.0, 0.0, 0.0], 'path': 'Aperio-CMU-1.svs', 'resolutions': {'level_count': 3, 'level_dimensions': [[46000, 32914], [11500, 8228], [2875, 2057]], 'level_downsamples': [1.0, 4.000121593475342, 16.000486373901367], 'level_tile_sizes': [[256, 256], [256, 256], [256, 256]]}, 'shape': [32914, 46000, 3], 'spacing': [1.0, 1.0, 1.0], 'spacing_units': ['', '', 'color'], 'typestr': '|u1'}, 'tiff': {'model': '', 'resolution_unit': '', 'software': '', 'x_resolution': 1.0, 'y_resolution': 1.0}}

Expected behavior
The micron-per-pixel resolution is clearly defined in Aperio metadata "MPP", and here it is wsi.metadata["aperio"]["MPP"] = 0.4990. However, cucim spacing metadata is wrongly set as wsi.metadata["cucim"]["spacing"] [1.0, 1.0, 1.0], which seems to be inferred from tiff metadata instead (x_resolution and 'y_resolution')

Tasks

No tasks being tracked yet.
@drbeh drbeh added bug Something isn't working MONAI MONAI-specific requests labels Mar 29, 2023
@drbeh
Copy link
Member Author

drbeh commented Mar 29, 2023

CC: @gigony @grlee77

@464hee
Copy link

464hee commented Jul 4, 2023

What do you think about this? @benfred @teju85 @harrism @madsbk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MONAI MONAI-specific requests
Projects
None yet
Development

No branches or pull requests

2 participants