Skip to content
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

Upgrade file reader to tifffile #118

Open
pcicales opened this issue Apr 7, 2022 · 7 comments
Open

Upgrade file reader to tifffile #118

pcicales opened this issue Apr 7, 2022 · 7 comments

Comments

@pcicales
Copy link

pcicales commented Apr 7, 2022

Hi there,

Ive found openslide to be quite problematic when dealing with high mag WSIs. Your code can be upgraded to use tifffile, which would eliminate the image size limitations of your system. I have used it in your code successfully.

@fedshyvana
Copy link
Collaborator

I am not familiar with tifffile - does that handle all common wsi formats such as .svs, .ndpi, etc.?

@pcicales
Copy link
Author

pcicales commented Apr 7, 2022

Yes - it is quite robust to source scanners. I have not tested it with all scanner data structures, but it appears to be much more reliable than openslide.

Additionally, you can then work with custom levels by just using cv2 in your pipeline and resizing your arrays. Or you can load metadata if you wish with tifffile so that it mimics what you are doing with openslide (although I think that could make your code sensitive to different scanners, I dont encourage it).

You can see my fork here. Keep in mind I have not yet tested it for anything other than patch, segmask, and stitch generation. It is also not optimized.

@kaczmarj
Copy link

kaczmarj commented Jul 5, 2022

i haven't used tifffile, but i've had an excellent experience with large_image. see https://digitalslidearchive.github.io/HistomicsTK/examples/using_large_image.html for an overview of what it can do.

@vcantter
Copy link

Hi there,

Ive found openslide to be quite problematic when dealing with high mag WSIs. Your code can be upgraded to use tifffile, which would eliminate the image size limitations of your system. I have used it in your code successfully.

Hi pcicales,
I try to use your upgraded code to process my datasets. But for a big wsi, such as 106067Pixel×86371Pixel, the system memory (32G) can not support to read such a big image. Did you encounter this problem?

@pcicales
Copy link
Author

pcicales commented Oct 18, 2022 via email

@vcantter
Copy link

Yes I did. You can load it in parts or use ROIs to load a section only. I can share a piece of code I used to do that later today.
On Tue, Oct 18, 2022 at 1:03 AM vcantter @.> wrote: Hi there, Ive found openslide to be quite problematic when dealing with high mag WSIs. Your code can be upgraded to use tifffile, which would eliminate the image size limitations of your system. I have used it in your code successfully. Hi pcicales, I try to use your upgraded code to process my datasets. But for a big wsi, such as 106067Pixel×86371Pixel, the system memory (32G) can not support to read such a big image. Did you encounter this problem? — Reply to this email directly, view it on GitHub <#118 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACLFIMNE25XESVRIHX4FHN3WDY4U7ANCNFSM5S2RUXDQ . You are receiving this because you authored the thread.Message ID: @.>
-- Kind Regards, Pietro Antonio Cicalese *Personal Cell: *(713)-689-4852 Joint BIOE/EE PhD Candidate Dr. Chandra Mohan http://mohanlab.bme.uh.edu/ (BIOE), Dr. Hien Nguyen https://www.hvnguyen.com/ (EE) BS, Biomedical Engineering, University of Houston Former President and Co-Founder - The Global Humanitarian Student Initiative (GHSI) https://www.egr.uh.edu/news/201705/cullen-college-student-spreads-international-compassion-and-kindness-needy Former Vice-President - Friends of Haiti (FOH) https://uhhonorsabroad.wordpress.com/2016/04/20/becoming-a-global-humanitarian-a-student-perspective/ *Former Webmaster *- Tau Beta Pi, Texas Epsilon http://www2.egr.uh.edu/~tbp/ Connect with me on LinkedIn https://www.linkedin.com/in/pacicalese/

Hi pcicale,
would you be so kind to share the piece of code to load a wsi in parts or use ROIs?

@BenPashley
Copy link

Hi, likewise would you mind sharing the code you used to load it in parts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants