OpenSlide is a C library that provides a simple way to read whole-slide images, also known as virtual slides. OpenSlide 4.0.0, the first new OpenSlide release in 8 years, is a major release that adds support for DICOM WSI slides, ICC color profiles, tile cache customization, adds the slidetool command-line utility, removes deprecated APIs, and improves format compatibility.
OpenSlide can now read slide images in DICOM format using (see ). It supports uncompressed, JPEG, and JPEG 2000 images, full and sparse tiling, associated images, and DICOM metadata properties.
OpenSlide aims to support most popular DICOM WSI variants. If you have a sample file which does not work well, please open an issue.
ICC color profile support
Several scanner vendors now include ICC color profiles in their slide formats. These profiles can be used to improve the color rendering of slide images. OpenSlide now has APIs to read these profiles:
openslide-write-png and slidetool now attach ICC profiles to PNG images they write. ICC profiles are currently supported by the Aperio, DICOM, Ventana, and generic TIFF vendor drivers.
Tile cache customization
OpenSlide has new APIs to share tile caches between OpenSlide objects and to configure their capacity:
By default, OpenSlide objects continue to use non-shared 32 MiB caches.
New slidetool utility
OpenSlide 4.0 introduces the slidetool command-line program, with subcommands providing access to all OpenSlide functionality. The openslide-quickhash1sum, openslide-show-properties, and openslide-write-png commands are still provided but will not receive additional functionality in the future.
Breaking API changes
OpenSlide 4.0 introduces several API changes, all of which are unlikely to affect applications:
Removed nine API functions which have been deprecated since 2014
The GLib log domain changed from Openslide to OpenSlide
The soname has been changed, which renames the library file to libopenslide.so.1 on Linux, libopenslide.1.dylib on macOS, and libopenslide-1.dll on Windows. Dependent packages will need to be rebuilt, and any code that dynamically loads OpenSlide at runtime will need to use the new filenames.
Building from source
The Autotools-based build system has been replaced with Meson. OpenSlide 4.0 can be built with these commands:
OpenSlide Windows build 20231011 now provides a single DLL containing OpenSlide and all its dependencies. In addition, the DLL now uses the Universal C Runtime (UCRT) rather than MSVCRT.
OpenSlide now provides a Fedora Copr and an Ubuntu PPA, enabling users of Fedora, Ubuntu, and RHEL-compatible enterprise Linux to easily install the latest OpenSlide and OpenSlide Python releases before they reach the official repositories. See the download page for instructions on enabling these repos.
How to help
If you have a slide scanner that can produce files we don't have, or ones OpenSlide can't read, please consider contributing a sample. If you grant us permission to redistribute your sample under the Creative Commons Zero license, we can use it in automated tests and share it with other developers working on open source WSI support!
Acknowledgements
Development of DICOM and ICC functionality was supported by NCI Imaging Data Commons and has been funded in whole or in part with Federal funds from the National Cancer Institute, National Institutes of Health, under Task Order No. HHSN26110071 under Contract No. HHSN261201500003l.
Full changelog
Breaking changes
Update soname to libopenslide.so.1
Remove all deprecated functions
Clear openslide_read_associated_image() output buffer on error
Remove undocumented NULL dest support in openslide_read_associated_image()
Change GLib log domain to OpenSlide
Convert build system to Meson (thanks, Jan Harkes)
New features
New format: DICOM WSI (thanks, John Cupitt and Jim O'Donnell)
Add APIs to read ICC color profiles (thanks, John)
Add APIs to configure tile cache size and share caches between slides
Add properties for associated image metadata
generic-tiff: Set MPP properties if available
philips: Set objective power property if available
Add slidetool command-line tool which supports all OpenSlide features
Combine all command-line tools into the same binary
Add ICC profile to PNG images written by command-line tools
Add self-test that doesn't require sample data (run with meson test)