Skip to content

Commit

Permalink
Fix parsing metadata error
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Milk committed Dec 1, 2023
1 parent 3da27be commit f212794
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lazyslide/readers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _get_best_level_to_downsample(self, factor):


def parse_metadata(filename, metadata: Dict):
fields = set(metadata.values())
fields = set(metadata.keys())

mpp_keys = []
# openslide specific mpp keys
Expand Down Expand Up @@ -168,7 +168,7 @@ def parse_metadata(filename, metadata: Dict):
if N_LEVEL_KEY in fields:
n_level_tmp = metadata.get(N_LEVEL_KEY)
if n_level_tmp is not None:
n_level = n_level_tmp
n_level = int(n_level_tmp)

for level in range(n_level):
height = metadata.get(LEVEL_HEIGHT_KEY(level))
Expand Down

0 comments on commit f212794

Please sign in to comment.