From jmather at mathworks.com Fri Dec 6 12:19:55 2019 From: jmather at mathworks.com (Jeff Mather) Date: Fri, 6 Dec 2019 17:19:55 +0000 Subject: Leanest OpenSlide possible Message-ID: <38EE2F04-BCD2-4EDC-95B6-A88C76EF4FDC@mathworks.com> Hi all, I?ve just started looking into what might be involved to build something that links against OpenSlide. When I used homebrew to install OpenSlide on my Mac, I saw a lot of other libraries being fetched as well. Some made sense: libtiff, libjpeg, etc. Others puzzled me: cairo, freetype, little-cms, etc. If my goal is simply to read raster data and file metadata, what?s the leanest set of additional libraries that I need? Eventually I?ll be building OpenSlide from source, and I?d like to link and redistribute as few libraries as possible. (I haven?t dug deeply enough yet to know if it?s possible to reduce the footprint by only supporting a subset of the formats via build/config flags.) Thanks! Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From skycrazer at gmail.com Tue Dec 10 13:21:25 2019 From: skycrazer at gmail.com (Sied Kebir) Date: Tue, 10 Dec 2019 19:21:25 +0100 Subject: SVS File Whole Slide Image Tiling Message-ID: Hello there, I am a completely new user of Openslide and hope to receive a response nonetheless. I am using openslide for python. I am working with whole slide histology images, that are usually huge in size. I would like to automatically subdivide this whole slide image into many smaller chunks of a fixed size, say 512*512 pixels. I have tried several approaches, any idea on how to get there? Many thanks Sayed -------------- next part -------------- An HTML attachment was scrubbed... URL: From angelos at smartcode.gr Wed Dec 11 01:55:53 2019 From: angelos at smartcode.gr (Angelos Pappas) Date: Wed, 11 Dec 2019 06:55:53 +0000 Subject: SVS File Whole Slide Image Tiling In-Reply-To: References: Message-ID: You want to save them as separate images? You can use vips to create Deep Zoom images using the following command: vips dzsave yourslide.svs yourdzdirectory https://jcupitt.github.io/libvips/API/current/Making-image-pyramids.md.html ________________________________ From: openslide-users on behalf of Sied Kebir Sent: Tuesday, December 10, 2019 8:21 PM To: openslide-users at lists.andrew.cmu.edu Subject: SVS File Whole Slide Image Tiling Hello there, I am a completely new user of Openslide and hope to receive a response nonetheless. I am using openslide for python. I am working with whole slide histology images, that are usually huge in size. I would like to automatically subdivide this whole slide image into many smaller chunks of a fixed size, say 512*512 pixels. I have tried several approaches, any idea on how to get there? Many thanks Sayed -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcupitt at gmail.com Wed Dec 11 03:48:34 2019 From: jcupitt at gmail.com (jcupitt at gmail.com) Date: Wed, 11 Dec 2019 08:48:34 +0000 Subject: SVS File Whole Slide Image Tiling In-Reply-To: References: Message-ID: Hello Sied, On Wed, 11 Dec 2019 at 06:56, Angelos Pappas wrote: > You can use vips to create Deep Zoom images using the following command: > > vips dzsave yourslide.svs yourdzdirectory dzsave will make a deepzoom pyramid by default, so a series of levels, with overlapping tiles at each one. It has quite a few options -- try: vips dzsave yourslide.svs yourdzdirectory --overlap 0 --tile-size 512 --depth one And it'll only write the top layer (highest res) of the pyramid, tiles will be 512 x 512, and there will be no overlap. Use --suffix .png if you want PNG tiles. You can run it from Python with: import pyvips image = pyvips.Image.new_from_file("yourslide.svs") image.dzsave("yourdzdirectory", overlap=0, tile_size=512, depth="one") There's a chapter in the libvips manual introducing dzsave: https://libvips.github.io/libvips/API/current/Making-image-pyramids.md.html You can also simply crop out tiles in Python: import pyvips image = pyvips.Image.new_from_file("yourslide.svs") tile = image.crop(124878, 232445, 512, 512) John From bgilbert at cs.cmu.edu Wed Dec 11 15:20:52 2019 From: bgilbert at cs.cmu.edu (Benjamin Gilbert) Date: Wed, 11 Dec 2019 15:20:52 -0500 Subject: Leanest OpenSlide possible In-Reply-To: <38EE2F04-BCD2-4EDC-95B6-A88C76EF4FDC@mathworks.com> References: <38EE2F04-BCD2-4EDC-95B6-A88C76EF4FDC@mathworks.com> Message-ID: On Fri, Dec 6, 2019 at 12:20 PM Jeff Mather wrote: > I?ve just started looking into what might be involved to build something > that links against OpenSlide. When I used homebrew to install OpenSlide on > my Mac, I saw a lot of other libraries being fetched as well. Some made > sense: libtiff, libjpeg, etc. Others puzzled me: cairo, freetype, > little-cms, etc. > > > > If my goal is simply to read raster data and file metadata, what?s the > leanest set of additional libraries that I need? Eventually I?ll be > building OpenSlide from source, and I?d like to link and redistribute as > few libraries as possible. > OpenSlide uses Cairo to render pixel data. I'd guess FreeType and Little CMS are being pulled in as indirect dependencies of Cairo. OpenSlide itself doesn't have any optional dependencies, but some of _its_ dependencies do. To get a rough sense of the minimal set (on Windows, at least), see https://github.com/openslide/openslide-winbuild/. --Benjamin Gilbert -------------- next part -------------- An HTML attachment was scrubbed... URL: From bgilbert at cs.cmu.edu Thu Dec 12 00:30:28 2019 From: bgilbert at cs.cmu.edu (Benjamin Gilbert) Date: Thu, 12 Dec 2019 00:30:28 -0500 Subject: FYI: OpenSlide Buildbot shut down Message-ID: Hi all, FYI, I've shut down the OpenSlide Buildbot that was running at buildbot.openslide.org. It's been essentially unmaintained for a while now, including the worker nodes, and there's not a lot of commit traffic to exercise it. If there's any future interest in resurrecting it with a newer version of the Buildbot software (or perhaps a different CI system), the code is still available at https://github.com/openslide/openslide-automation. --Benjamin Gilbert -------------- next part -------------- An HTML attachment was scrubbed... URL: From skycrazer at gmail.com Tue Dec 17 13:08:00 2019 From: skycrazer at gmail.com (Sied Kebir) Date: Tue, 17 Dec 2019 19:08:00 +0100 Subject: SVS File Whole Slide Image Tiling In-Reply-To: References: Message-ID: Dear John, thank you so much! I have managed to get tiles from my .svs file. I have two questions now: A) Of the image tiles I got, many do not have any informative data, e.g. showing the background for example. How can I remove those? B) Some tiles are out of focus, is there a way to remove them as well? Thanks again! Best Sied Am Mi., 11. Dez. 2019 um 09:49 Uhr schrieb : > Hello Sied, > > On Wed, 11 Dec 2019 at 06:56, Angelos Pappas wrote: > > You can use vips to create Deep Zoom images using the following command: > > > > vips dzsave yourslide.svs yourdzdirectory > > dzsave will make a deepzoom pyramid by default, so a series of levels, > with overlapping tiles at each one. > > It has quite a few options -- try: > > vips dzsave yourslide.svs yourdzdirectory --overlap 0 --tile-size > 512 --depth one > > And it'll only write the top layer (highest res) of the pyramid, tiles > will be 512 x 512, and there will be no overlap. Use --suffix .png if > you want PNG tiles. > > You can run it from Python with: > > import pyvips > image = pyvips.Image.new_from_file("yourslide.svs") > image.dzsave("yourdzdirectory", overlap=0, tile_size=512, depth="one") > > There's a chapter in the libvips manual introducing dzsave: > > https://libvips.github.io/libvips/API/current/Making-image-pyramids.md.html > > You can also simply crop out tiles in Python: > > import pyvips > image = pyvips.Image.new_from_file("yourslide.svs") > tile = image.crop(124878, 232445, 512, 512) > > John > _______________________________________________ > openslide-users mailing list > openslide-users at lists.andrew.cmu.edu > https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.d.zarella at gmail.com Tue Dec 17 14:00:37 2019 From: mark.d.zarella at gmail.com (Mark Zarella) Date: Tue, 17 Dec 2019 14:00:37 -0500 Subject: SVS File Whole Slide Image Tiling In-Reply-To: References: Message-ID: <7DCB5AF3-A046-4837-896B-B44DFA80D5DB@gmail.com> There are algorithms available online (I don?t know specifically where, maybe others can point to a direction) that can do both tissue-finding (request A) and focus detection (request B).? My suggestion is to perform the tissue-finding step at the level of the lowest-res image in the pyramid to speed up the I/O ? there?s no sense in reading a set of tiles that are ultimately blank and will be discarded anyway.? Focus detection has been done for a long time in various ways, although I believe Stumpe?s group at google published a preprint on this earlier this year that might be useful.? Not sure if they?ve shared the code or created an end-user function however. From: openslide-users on behalf of Sied Kebir Date: Tuesday, December 17, 2019 at 1:08 PM To: Cc: "openslide-users at lists.andrew.cmu.edu" Subject: Re: SVS File Whole Slide Image Tiling Dear John, thank you so much! I have managed to get tiles from my .svs file. I have two questions now: A) Of the image tiles I got, many do not have any informative data, e.g. showing the background for example. How can I remove those? B) Some tiles are out of focus, is there a way to remove them as well? Thanks again! Best Sied Am Mi., 11. Dez. 2019 um 09:49 Uhr schrieb : Hello Sied, On Wed, 11 Dec 2019 at 06:56, Angelos Pappas wrote: > You can use vips to create Deep Zoom images using the following command: > > vips dzsave yourslide.svs yourdzdirectory dzsave will make a deepzoom pyramid by default, so a series of levels, with overlapping tiles at each one. It has quite a few options -- try: vips dzsave yourslide.svs yourdzdirectory --overlap 0 --tile-size 512 --depth one And it'll only write the top layer (highest res) of the pyramid, tiles will be 512 x 512, and there will be no overlap. Use --suffix .png if you want PNG tiles. You can run it from Python with: import pyvips image = pyvips.Image.new_from_file("yourslide.svs") image.dzsave("yourdzdirectory", overlap=0, tile_size=512, depth="one") There's a chapter in the libvips manual introducing dzsave: https://libvips.github.io/libvips/API/current/Making-image-pyramids.md.html You can also simply crop out tiles in Python: import pyvips image = pyvips.Image.new_from_file("yourslide.svs") tile = image.crop(124878, 232445, 512, 512) John _______________________________________________ openslide-users mailing list openslide-users at lists.andrew.cmu.edu https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users _______________________________________________ openslide-users mailing list openslide-users at lists.andrew.cmu.edu https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcupitt at gmail.com Tue Dec 17 15:14:09 2019 From: jcupitt at gmail.com (jcupitt at gmail.com) Date: Tue, 17 Dec 2019 20:14:09 +0000 Subject: SVS File Whole Slide Image Tiling In-Reply-To: References: Message-ID: On Tue, 17 Dec 2019 at 18:08, Sied Kebir wrote: > A) Of the image tiles I got, many do not have any informative data, e.g. showing the background for example. How can I remove those? You don't need a fancy tissue detector for slides. I would just take the histogram of each area and see if you have more than a few % of non-white pixels. As Mark says, start with the low-res levels and refine. > B) Some tiles are out of focus, is there a way to remove them as well? I've always just found the histogram and calculated the entropy. It's easy to make a nice, normalized 0 - 100 number, and its very robust. Again, you don't need anything fancy for slides. John