OpenSlide: The Whole-Slide image processing library that stands behind most of Digital Pathology Projects

OpenSlide: The Whole-Slide image processing library that stands behind most of Digital Pathology Projects

OpenSlide is a C library for processing, reading whole-slide images (virtual slides). It's the engine behind many digital pathology projects open source and closed source.  It provides a simple performance-focused interface for parsing and processing virtual slides images format (WSI).

OpenSlide has Python, Java, and Julia language bindings. Developers who use those languages can easily integrate it into their applications, like WSI image viewers, processing software, cloud applications, and lab-ware.

The Whole-slide images or virtual slides are not conventional files so as their file formats, OpenSlide provides support for the most popular WSI formats, with standard and non-standard metadata.

In short, OpenSlide is the core library/ engine that makes many open-source WSI projects tick. It has been used in several open source and commercial projects, including desktop applications, cloud, and web-based applications, online histology and pathology galleries.

OpenSlide Demo with OpenSeaDragon

What are virtual slides?

Whole-slide images, also known as virtual slides, are large, high-resolution images used in digital pathology. Reading these images using standard image tools or libraries is a challenge because these tools are typically designed for images that can comfortably be uncompressed into RAM or a swap file. Whole-slide images routinely exceed RAM sizes, often occupying tens of gigabytes when uncompressed. Additionally, whole-slide images are typically multi-resolution, and only a small amount of image data might be needed at a particular resolution. [src:OpenSlide]

There is no universal data format for whole-slide images, so each vendor implements its formats, libraries, and viewers. Vendors typically do not document their formats. Even when there is documentation, important details are omitted. Because a vendor’s library or viewer is the only way to view a particular whole-slide image, doctors and researchers can be unnecessarily tied to a particular vendor. Finally, few (if any) vendors provide libraries and viewers for non-Windows platforms. Some have gone with a server approach, pushing tiles through a web server, or using Java applets, but these approaches have shortcomings in high-latency or non-networked environments.
[src:OpenSlide]


Supported file formats


OpenSlide supports virtual slide file formats and metadata

  • Philips (.tiff): single-file pyramidal tiled TIFF or BigTIFF with non-standard metadata
  • Aperio (.svs, .tif): single-file pyramidal tiled TIFF, with non-standard metadata and compression
  • Hamamatsu (.vms, .vmu, .ndpi): multi-file JPEG/NGR with proprietary metadata and index file formats, and single-file TIFF-like format with proprietary metadata
  • Leica (.scn): single-file pyramidal tiled BigTIFF with non-standard metadata
  • Sakura (.svslide): SQLite database containing pyramid tiles and metadata
  • MIRAX (.mrxs): multi-file with very complicated proprietary metadata and indexes
  • Trestle (.tif): single-file pyramidal tiled TIFF, with non-standard metadata and overlaps; additional files contain more metadata and detailed overlap info
  • Ventana (.bif, .tif) single-file pyramidal tiled BigTIFF with non-standard metadata and overlaps
  • Generic tiled TIFF (.tif): single-file pyramidal tiled TIFF

Highlights

  • C library
  • Python API
  • Java API
  • Used in enterprise-grade applications
  • Used in several open-source projects
  • Smooth performance
  • Lightweight
  • GPLv2.0
  • WebDemo powered by OpenSeadragon library
  • Good support
  • Detailed documentation
  • Providing Test Data

Languages bindings:


Projects using OpenSlide


There are many projects used OpenSlide, open-source and closed source commercial projects, OpenSlide is used by many researchers in machine learning, deep learning projects, we will list those projects here to make it easy for developers to review those projects:

1- QuPath

 QuPath is an open-source free lightweight virtual slide viewer/ Whole-slide image viewer, it's built with Java so it works on Windows, Linux, & macOS.

For more information review our article about QuPath here.

2- Cytomine

Cytomine is an open-source free Whole-slide image analysis platform that comes with machine learning support.

Read more about Cytomine in our article here.

3- OpenSlideBrowser

A Java-based Whole Slide Image Browser using OpenSlide (link)

4- Slidewalk

Desktop open-source Qt-based whole-slide image viewer to test openSlide. (link)

5- OpenSlide with OpenSeadragon

DigitalSlideArchive: using OpenSeadragon & OpenSlide 

OpenSeadragon is an open-source JavaScript library to display high-resolution large-scale zoomable images.

6- libvips

libvips is a demand-driven, horizontally threaded image processing library. Compared to similar libraries, libvips runs quickly and uses little memory. libvips is licensed under the LGPL 2.1+.

7- SlideSlicer

a toolbox for manipulation of digital pathology slides and annotations

8- Deep-learning with OpenSlide

A library for training deep neural networks using pathology data by accessing patches on-the-fly

9- Deep learning-digital-pathology (IMG)

Full package for applying deep learning to virtual slides.

10- pysliderois

A library for training deep neural networks using pathology data by accessing patches on-the-fly

11- openslider-tfpy

 TensorFlow custom runner to read microimages from whole slide images.

12- Deep learning with virtual slides

Full package for applying deep learning to virtual slides.

13- OpenSlideGenerator for Keras

 Keras is an open-source neural network library written in Python. It is capable of running on top of TensorFlow, Microsoft Cognitive Toolkit, Theano, or PlaidML.

14- Orthanc WSI viewer

Orthanc is an enterprise-class PACS server, that comes with developer-friendly tools to extend and build PACS/ DICOM station apps. Orthanc's team used OpenSlide to build their WSI (Whole-slide image) viewer. It also uses OpenLayers library to manage displaying and zooming of high quality images.


Extensions


Resources


Whole-slide Image Analysis

Open source Free Whole-slide Image Viewers and Analysis Software








Open-source Apps

9,500+

Medical Apps

500+

Lists

450+

Dev. Resources

900+