Skip to content

Comments

Enh: Add parsing of scale/units from SVS files#65

Open
psobolewskiPhD wants to merge 2 commits intonapari:mainfrom
psobolewskiPhD:add_svs_scale
Open

Enh: Add parsing of scale/units from SVS files#65
psobolewskiPhD wants to merge 2 commits intonapari:mainfrom
psobolewskiPhD:add_svs_scale

Conversation

@psobolewskiPhD
Copy link
Member

This PR just uses the tifffile API to check if something is SVS and then get the SVS metadata to parse out scale (which is micron per pixel), set the units, and also put the rest of the metadata in layer.metadata.
I tested locally with a file from https://openslide.org/formats/aperio/
I also add a test that writes a TIFF with SVS-like metadata.

@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.74%. Comparing base (dd417b3) to head (bff3740).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   81.87%   82.74%   +0.87%     
==========================================
  Files           8        8              
  Lines         513      539      +26     
==========================================
+ Hits          420      446      +26     
  Misses         93       93              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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