CZI: questions about openslide grids

SOUEDET Nicolas 215310 nicolas.souedet at cea.fr
Tue Dec 16 05:23:56 EST 2014


Mathieu,

Many thanks for this relevant information.
Benjamin, is there a way to simply address this issue in openslide.
Is there any other format supported that had to deal with this kind of issue ?
I guess this is not particular to Zeiss, but maybe I am wrong ?

Nicolas Souedet

> -----Message d'origine-----
> De : Mathieu Malaterre [mailto:mathieu.malaterre at gmail.com]
> Envoyé : mardi 16 décembre 2014 10:43
> À : SOUEDET Nicolas 215310
> Cc : openslide-users at lists.andrew.cmu.edu
> Objet : Re: CZI: questions about openslide grids
>
> Nicolas,
>
> Pay attention that `DimensionEntries` (§4.4.6 Directory Entry – Schema DV [Directory Variable length]) may contains arbitrary positions. I've looked at a couple of CZI samples posted previously on the list, and there is a small jitter of 10/15% around the exact (perfect) position.
>
> Just to clarify, I've uploaded the points extracted from a slide from Niels Werner Mortensen here, you'll understand what I mean:
>
> http://cs.stackexchange.com/questions/35314/computing-average-tile-siz
> e-grid
>
> I am not sure there is a structure in openslide which map those points (with jitter) back to a tile index (or vice versa).
>
> Good luck anyway,
>
> On Tue, Dec 16, 2014 at 9:20 AM, SOUEDET Nicolas 215310 <nicolas.souedet at cea.fr> wrote:
>> Hi Benjamin,
>>
>> Many thanks for your reply, I did not know that it was possible to set tile_w and tile_h to 0.
>> I hope this will be sufficient.
>>
>> Nicolas Souedet
>>
>> -----Message d'origine-----
>> De :
>> openslide-users-bounces+nicolas.souedet=cea.fr at lists.andrew.cmu.edu
>> [mailto:openslide-users-bounces+nicolas.souedet=cea.fr at lists.andrew.c
>> m u.edu] De la part de Benjamin Gilbert Envoyé : mardi 16 décembre 
>> 2014
>> 01:31 À : openslide-users at lists.andrew.cmu.edu
>> Objet : Re: CZI: questions about openslide grids
>>
>> On 12/15/2014 11:08 AM, SOUEDET Nicolas 215310 wrote:
>>> In CZI format, it is possible to have different tile dimensions for 
>>> a single pyramid level.
>>>
>>> That allows to manage scanned ROI accurately, but I do not know how 
>>> to manage it using an existing openslide grid.
>>>
>>> Moreover, openslide is built around this prerequisite that tiles of 
>>> a same pyramid level have the same dimensions.
>>
>> Hi Nicolas,
>>
>> The OpenSlide core doesn't require tiles to be a consistent size.  The tile_w and tile_h members of struct _openslide_level are only used to provide performance hints to the application, and can be set to zero if they do not apply.
>>
>> As to grids: the simple grid will not work for you, but the tilemap grid might.  It doesn't require all the tiles to be the same size; you can specify the tile sizes as arguments to _openslide_grid_tilemap_add_tile().  What tilemap does require is that each tile can be approximately placed on a grid, such that:
>>
>> - there is no more than one tile per grid cell, and
>> - the actual pixel coordinates of a tile are "close to" the ideal pixel coordinates of its grid cell.
>>
>> Depending on how CZI lays out tiles, this may or may not be sufficient for you.
>>
>> - If smaller tiles are only used when the corresponding large tile has a single region of interest, the small tile can simply be placed into the grid cell where the large tile would go.
>>
>> - If large tiles are broken into a consistent number of pieces 
>> (perhaps
>> 2 or 4 to a side), which may not all be present, then the tilemap grid should be configured with tile advances matching the size of a small tile.  When large tiles exist, they will span multiple grid cells, but the tilemap grid can handle that.
>>
>> - If it is impossible to overlay any regular grid on the tiles because there is *no* consistent structure, the tilemap grid will not work.  We would need to add a new grid that looks up tiles by performing a range search over the tile coordinates.  I've previously suggested that that could be implemented as a wrapper around the SQLite R*Tree module.
>>
>> --Benjamin Gilbert
>>
>> _______________________________________________
>> openslide-users mailing list
>> openslide-users at lists.andrew.cmu.edu
>> https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users
>> _______________________________________________
>> openslide-users mailing list
>> openslide-users at lists.andrew.cmu.edu
>> https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users
>
>
>
> --
> Mathieu



--
Mathieu


More information about the openslide-users mailing list