Skip to content

WSIReader Tile Sizes Issue - SVS Format #722

@TomastpPereira

Description

@TomastpPereira
  • TIA Toolbox version: 1.4.1
  • Python version: 3.11.3
  • Operating System: Win 10 x64

Description

I have been attempting to create WSI tiles using the WSIReader's save_tiles function but have been getting tiles of incorrect shape and content when using WSIs in svs format.

For a set of WSIs in svs format, the output set of tiles does not match the specified output size at certain objective values.
By this I mean that I have passed for example, tile_objective_value=5 and tile_read_size=(1024,1024) and the result is a set of patches at (256,256). These tiles also seem to only contain white space. A requested output of (512,512) also instead created (128,128).
When testing the same issue on sample WSIs provided by Openslide, the issue persists.

This issue also does not seem to persist when using a WSI in ndpi format.
The output when using the CMU-1 sample slide from OpenSlide outputs 132 items when using the ndpi format, and only 9 items of incorrect shape when using the svs format.

I have noted that this seems to occur for all objective values which are below the highest available (20x for the sample).

What I Did

import openslide
import tiatoolbox
from tiatoolbox.wsicore.wsireader import WSIReader

wsi = WSIReader.open(input_img="C:\\...\\Downloads\\CMU-1.svs")
wsi.save_tiles(output_dir="...", tile_objective_value=5, tile_read_size=(1024,1024))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions