Pixel size at various layers

ajwood at mta.ca ajwood at mta.ca
Wed Mar 13 16:38:08 EDT 2013


Fair enough. I'm still convinced that there is some funny stuff  
happening around the downsampling.

At lever 0, we have square pixels:
[LAYER_0_LEVEL_0_SECTION]
...
MICROMETER_PER_PIXEL_X = 0.369047619047619
MICROMETER_PER_PIXEL_Y = 0.369047619047619


At hight layers, we don't:
[LAYER_0_LEVEL_3_SECTION]
...
MICROMETER_PER_PIXEL_X = 2.95018096657441
MICROMETER_PER_PIXEL_Y = 2.94944618006248

This seems wrong, no?

Thanks,
Andrew


Quoting "Villalon, Elena" <villalel at umdnj.edu>:

> I do not think it always work as downsampling by a factor of 2. It  
> is just true (if I recall well) only for TIFF, you need to use  
> methods openslide_get_layer_downsample. Elena
>
>
> -----Original Message-----
> From:  
> openslide-users-bounces+villalel=umdnj.edu at lists.andrew.cmu.edu  
> [mailto:openslide-users-bounces+villalel=umdnj.edu at lists.andrew.cmu.edu] On  
> Behalf Of ajwood at mta.ca
> Sent: Wednesday, March 13, 2013 3:27 PM
> To: openslide-users at lists.andrew.cmu.edu
> Subject: Pixel size at various layers
>
>
> Hi All,
>
> I'm writing a Mirax to Minc conversion utility. One feature that it
> (almost) supports is converting data from level N using a bounding box
> specified at level M. I'm running into something I don't understand
> regarding the different slide levels.
>
>  From what I understand, level 0 is the full-resolution data, and each
> successive level downsamples by a factor or 2. Therefore, I would
> expect the width of a pixel at level 0 to by eight times narrower than
> a pixel at level 3.
>
>
>  From the Slidedat:
>
> [LAYER_0_LEVEL_0_SECTION]
> ..
> MICROMETER_PER_PIXEL_X = 0.369047619047619
> ..
>
> [LAYER_0_LEVEL_3_SECTION]
> ..
> MICROMETER_PER_PIXEL_X = 2.95018096657441
> ..
>
>
> The trouble I'm having is that eight times the level 0 pixel does not
> equal the level 3 pixel.
> Eight time level_0 pixel: 0.369047619047619 * 8 = 2.9523809523809521
> The level_3 pixel:                                2.95018096657441
>
>
> Am I being bitten by floating point arithmetic, or is there something
> else going on here?
>
>
> Thanks,
> Andrew
>
> _______________________________________________
> openslide-users mailing list
> openslide-users at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users




More information about the openslide-users mailing list