From 54a34982abe1e505d9c979ffaf6e07c0ead22866 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Thu, 20 Aug 2020 14:50:34 -0400 Subject: [PATCH] Show aperio version in internal metadata. This just separates out a value from another field. --- sources/openslide/large_image_source_openslide/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/openslide/large_image_source_openslide/__init__.py b/sources/openslide/large_image_source_openslide/__init__.py index e9a794d56..186a9273b 100644 --- a/sources/openslide/large_image_source_openslide/__init__.py +++ b/sources/openslide/large_image_source_openslide/__init__.py @@ -255,6 +255,10 @@ def getInternalMetadata(self, **kwargs): results = {'openslide': {}} for key in self._openslide.properties: results['openslide'][key] = self._openslide.properties[key] + if key == 'openslide.comment': + leader = self._openslide.properties[key].split('\n', 1)[0].strip() + if 'aperio' in leader.lower(): + results['aperio_version'] = leader return results @methodcache()