OpenSlide read_region

zhaoy at motic.com zhaoy at motic.com
Sat Oct 10 09:12:50 EDT 2015


Hi Martin,

Please refer the API document, it says:

x       The top left x-coordinate, in the level 0 reference frame.
y       The top left y-coordinate, in the level 0 reference frame.
level   The desired level.
w       The width of the region. Must be non-negative.
h       The height of the region. Must be non-negative.

The x,y are based on level 0. The w,h is just pixels you want.

Cheers,

Ray

On Oct 10, 2015, at 8:58 PM, Priv.-Doz. Dr. M. Weihrauch <martin.weihrauch at uni-koeln.de<mailto:martin.weihrauch at uni-koeln.de>> wrote:

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
_______________________________________________
openslide-users mailing list
openslide-users at lists.andrew.cmu.edu<mailto:openslide-users at lists.andrew.cmu.edu>
https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users

________________________________
重要声明:
只有有权接收电子邮件中可能包含的机密信息的用户才能接收此电子邮件。从 @motic.com 传递的电子邮件可能包含机密信息和法律特许的信息。如果您不是此邮件的预期收件人,请勿阅读、复制、转发或存储此邮件。如果已误收此邮件,请将其转发到发件人,并从您的计算机系统彻底删除此邮件。
Important Notice:
This message from @motic.com's email system is for the designated recipient only and may contain privileged, propritary, or otherwise private information. If you received it error, please notify the sender immediately and delete the original. Any other use of this email by you is prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20151010/dff1c3f0/attachment.html 


More information about the openslide-users mailing list