Pixel size at various layers

ajwood at mta.ca ajwood at mta.ca
Wed Mar 13 15:27:21 EDT 2013


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



More information about the openslide-users mailing list