OpenSlide read_region

Priv.-Doz. Dr. M. Weihrauch martin.weihrauch at uni-koeln.de
Sat Oct 10 08:55:34 EDT 2015


Dear community:

I have a C#-wrapper for OpenSlide, which I am using right now. However,
concerning  the OpenSlide read_region method, I am somewhat confused.
There is a x, y, width, height and level.

If I see it correctly (using my current software that I wrote), the
parameters width and height are in relation to the level. E. g., when I
grab a region with a width of 500 and height of 1000 from level 2, which
may be total width x height 1000 x 2000, then I am actually grabbing a
quarter of the whole image of that level.

However, my experiments show that the x and y, so the  offset from where
I grab, are counting in relation to the full-size level (0). So, when I
try to go to the middle of the image at level 2, I would use 500/1000 as
coordinates, but with that strategy, I land somewhere at the upper left
of the image (so I have to take e. g. 2000/4000, if that would be the
middle of level 0).
 
Is that really the case for OpenSlide or does my C# wrapper "translate"
something wrong?

Thanks

Martin


More information about the openslide-users mailing list