-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Right now WSIReader is based on ImageReader class with read and get_data methods. However, reading whole slide images regardless of the library to use have its own additional complexities that are not captured in the base class.
Also, currently, we have implemented different backends cuCIM, OpenSlide, and TiffFile` through if statements!
My suggestion would be to have a WSIReader base class that implements those additional functionalities such as evaluating the level based on ppm/resolution, validating the pyramidal levels, etc. along with abstract methods that each of the libraries has to implement. In this way, we can implement each backend in different classes like CuCIMReader (for cuCIM) inherited from WSIReader.
This not only makes the code cleaner and more readable but also decouples MONAI integration of third-party WSI reader libraries and makes the future contribution easier and safer.
The overall structure would look like this: (will update #4005)

Metadata
Metadata
Assignees
Labels
Type
Projects
Status