0

The property "openslide.mmp-x" shows the property containing the number of microns per pixel in the X dimension of level 0. As I am showing the level_count-1 I don't want the property for level 0 but for level_count-1. How do I get that property of that level?

slide = openslide.OpenSlide(SVSFileName)

# get width, height of image at low-res reading magnification
lrHeight = slide.level_dimensions[slide.level_count - 1][1]
lrWidth = slide.level_dimensions[slide.level_count - 1][0]

mmx = slide.properties['openslide.mpp-x']
jadem
  • 27
  • 4

1 Answers1

0
slide.level_downsamples

-> (1.0, 2.0, 4.0, 8.0)

gives you how the levels do the downsampling, and I think we may calculate the mpp-x/mpp-y by the downsample rates for each level.

Another option is using lib called large-image:

it's getNativeMagnification method will give you mpp_x for each level.

Menglong Li
  • 2,177
  • 14
  • 19