Project-MONAI / MONAI

AI Toolkit for Healthcare Imaging
https://monai.io/
Apache License 2.0
5.68k stars 1.04k forks source link

Whole slide dataset to extract random patches #4099

Open drbeh opened 2 years ago

drbeh commented 2 years ago

Currently, PatchWSIDataset generates patches based on pre-defined locations. In digital pathology use cases, there is a need for generating such patches randomly from all over the whole slide image. This requirement is different than using TileOnGrid to generate such patches since this transform is operating on the image in the memory while RandPatchWSIDataset directly deal with whole slide images on the file system.

vikashg commented 2 years ago

Can we also build in the capability to extract patches at different zoom levels. That will be ideal.

drbeh commented 2 years ago

@vikashg thanks for your input. We have recently addressed that in PR #4036, and now you should be able to pass level argument to extract patches at that level.