slideflow / slideflow

Powerful, open-source AI tools for digital pathology.
https://slideflow.dev
Apache License 2.0
253 stars 42 forks source link

Extracting tiles from specific WSI locations #415

Open pacocp opened 1 week ago

pacocp commented 1 week ago

Hi!

First of all, thank you very much for your work on the library. I think it is great!

I was looking into ways of extracting patches at specific locations (X,Y) in the slide. I have checked that, one you have a cell-segmentation, you can apply it to use cells as centroids. However, I was wondering if there is a way to call the extract_tiles function (or a workaround), to use (X,Y) locations to extract the tiles and save them as TFrecords.

Thank you very much for your help!

jamesdolezal commented 1 week ago

Yes, it is possible to extract patches at specific (X, Y) coordinates in the slide. It is straightforward to do this one patch at a time, but may require a small workaround to leverage the efficient multiprocessing built into the .extract_tiles() function.

Either myself, or someone from our team, will circle back in the next day or so with a code example. We'll also expand the documentation to note this functionality.