Skip to content

[BUG] Wrong Spacing for Aperio SVS #529

Open
@bhashemian

Description

@bhashemian

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

Preview Give feedback
No tasks being tracked yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MONAIMONAI-specific requestsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions