-
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
WSI image reader #1504
Comments
@Nic-Ma, @wyli Regular images:
WSI images:
Thus, an option is to separate it from |
Hi @behxyz , As the class WSIReader(ImageReader):
def read(self, data: str):
return cuClaraImage.load(data) ...
def get_data(self, img, location, size, level):
return extract_patch(img, location, size, level)... Overloading of functions to support different arg list in the sub-class. Thanks. |
Hi @Nic-Ma, |
I think get_data should allow for more arguments, perhaps it's time to revisit this thread of discussion: #893 (comment) |
Hi @behxyz and @wyli , Thanks for the discussion. Thanks. |
We could have
The programmer is permitted to check for existence of the |
The class returned by Additionally, there is a way to read OpenSlide images via the Zarr interface, provided via from napari_lazy_openslide.lazy_openslide import OpenSlideStore
# and a subsequent call to zarr.open(...). It is not as efficient as OpenSlide directly nor as efficient as a normal Zarr directory store, but it could be part of an Option 2 implementation. The more I think about it, Option 2 would be a lot of work. :-( |
@Leengit Thanks for your suggestions. I agree that option 2 requires a lot of work. For option 1, we should also consider that in practice no one reads the whole slide, which is tens of gigabytes in memory. Thus to be consistent with ImageReader API, I am leaning towards expanding the scope of |
Is there functionality of I probably would use a name other than |
I wonder if we should expand this discussion to include Curtis Lisle (clisle@knowledgevis.com) who has been working with the NIH/NCI on whole slide processing (patches and pyramids) using OpenSlide and other formats / libraries. He has been leading multiple efforts for large image (whole slide / pathology / microscopy) AI. He already approached several folks on the MONAI team with suggestions. He might have additional API/use-case considerations to include. |
There is a new version of |
@aylward @Leengit @wyli @Nic-Ma |
@behxyz in #1548 the tests are skipped, and cuimage is not available, we couldn't verify the code changes at the moment. please let me know if that's not the case. |
@wyli |
thanks, if we could test the implementation with an EA docker that's also good @behxyz. we should be able to review the PR now cc@Nic-Ma |
Thanks for the discussion to clarify. Thanks. |
@Nic-Ma, |
Is your feature request related to a problem? Please describe.
Whole slide imaging (WSI) in pathology generates huge images which makes is inefficient to load the whole image into memory and extract a small patch for training.
Describe the solution you'd like
There are libraries that are able to more efficiently extract and load small patches into memory from very large images. OpenSlide is the most popular and CuClaraImage is another under-development library. We should have a WSIreader that uses either of them under the hood.
The text was updated successfully, but these errors were encountered: