Mirax slides png tiles

Benjamin Gilbert bgilbert at cs.cmu.edu
Fri Nov 11 14:50:56 EST 2011


On Fri, November 11, 2011 4:18 am, Konstantin Kozlov wrote:
> But if I try to get the region
>
> openslide-write-png 256 256 <layer> 100 100 file.png
>
> I get a 100 by 100 pixels file but its origin is not at the point
> (256,256). For one file and one of the layers I've determined
> experimentally that I have to multiply the coordinates of the desired
> origin on 204.8, of course approximately.
>
> So do I need to find some correct factor for each layer and each file
> or it is a bug?

Hello Konstantin,

The parameters to openslide-write-png have the same semantics as those to
openslide_read_region(): x and y are always coordinates in layer 0.  In
the C API, you can use openslide_get_layer_downsample() to get the
downsampling factor for each layer.  Unfortunately, these values are not
included in the output of openslide-show-properties.

However, for Mirax, each layer should be exactly a factor of 2 downsample
from the previous layer, so I can't explain your 204.8 value.

--Benjamin Gilbert




More information about the openslide-users mailing list