microsoft / hi-ml

HI-ML toolbox for deep learning for medical imaging and Azure integration
https://aka.ms/hi-ml
MIT License
269 stars 60 forks source link

BUG: Fix KeyError when converting svs to tiff #891

Closed kenza-bouzid closed 1 year ago

kenza-bouzid commented 1 year ago

svs has different metadata properties than Tiff and NDPI. This fix handles the case when get_mpp from monai fails with a KeyError exception missing "Tiff.XResolution" and "Tiff.YResolution"

codecov[bot] commented 1 year ago

Codecov Report

Merging #891 (ad557a1) into main (e8f6b44) will decrease coverage by 0.02%. The diff coverage is 50.00%.

Impacted file tree graph

Flag Coverage Δ
hi-ml-cpath 76.04% <50.00%> (-0.03%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../src/health_cpath/preprocessing/tiff_conversion.py 87.50% <50.00%> (-1.50%) :arrow_down: