-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redesign of WSIReader #4071
Comments
I think this is a good change though |
Hi @Nic-Ma, thanks for your feedback. I agree with this naming too. |
You are right! Here we are implementing a specific use of tifffile library, so we should be more clear. I'll think of a better name for that. |
It looks good, given that |
Sure, that's fine with me. Follow the same format as |
Right now
WSIReader
is based onImageReader
class withread
andget_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 likeCuCIMReader
(for cuCIM) inherited fromWSIReader
.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)
The text was updated successfully, but these errors were encountered: