Version 2.11.0 – MRXS, BIF, LIF and ND2 Drivers and Computed Scenes

2026-11-14

We are pleased to announce the release of SlideIO version 2.11.0, an update to our open-source library for pathology image analysis.

This version adds four image drivers — 3DHISTECH MIRAX, Roche Ventana BIF, Leica LIF and Nikon ND2 — a public API for computed scenes, which present pixels an application produces itself as an ordinary Scene, and open options that change how a driver opens a file. It also makes block reads that cross the edge of a scene behave the same in every driver, and tightens the checks on invalid arguments. A few of those checks change behaviour that existing code may rely on; see Breaking changes before upgrading.

Highlights

Four New Drivers

Driver

Format

Extensions

MRXS

3DHISTECH MIRAX

*.mrxs, Slidedat.ini

BIF

Roche Ventana BIF (iScan Coreo/HT, VENTANA DP 200)

*.bif

LIF

Leica LIF

*.lif

ND2

Nikon NIS-Elements ND2

*.nd2

All four are selected automatically by the default AUTO driver, and all four read one scene from several threads concurrently.

  • MRXS — a MIRAX slide is a bundle: the .mrxs file plus a data directory of the same name. The driver places each camera photo at its recorded position and stitches the overlaps, so a region closely matches what OpenSlide shows. Scene metadata and the label, macro and thumbnail images are exposed, and large regions are resampled within a bounded amount of memory. Pass the .mrxs file, or the bundle’s Slidedat.ini when the data directory was copied without it. By default the scene is cropped to the scanned area, as QuPath shows it. Setting the open option mrxs.crop_to_content to false gives the full canvas that OpenSlide reports.

  • BIF — one scene per scanned area of interest (AOI0, AOI1, …), as QuPath shows them. Tiles are stitched with the geometry recorded for each boundary, levels are read with per-tile decoding, and the iScan and EncodeInfo XML metadata is reported. The label, thumbnail and probability-map images are auxiliary images of the slide. Z-stack BIF files are refused with an error for now.

  • LIF — one scene per image of a Leica project, named by its folder path inside the project (TileScan 1/Merged); a tile scan gives one scene per field. Plane timestamps and magnification are reported, and a channel whose lookup table is a single hue gets a Color attribute. An image the driver cannot read is left out of the scene list with a warning rather than failing the whole project.

  • ND2 — one scene per XY position, with Z slices and time frames taken from the experiment loops. Both chunked (Ver2.x and Ver3.x) and legacy JPEG 2000 files are read, including legacy files with 9- to 15-bit codestreams. Plane timestamps are reported, magnification is taken from the objective name, and a file whose chunk-map trailer is missing is recovered by scanning instead of being refused.

LIF and ND2 scenes have a single level. A read far below native size is downscaled in bounded memory by a new shared area filter, which matches OpenCV’s INTER_AREA bit for bit on x86.

See Image drivers for what each driver exposes.

import slideio

slide = slideio.open_slide("experiment.nd2")
for i in range(slide.num_scenes):
    scene = slide.get_scene(i)
    print(scene.name, scene.rect, scene.num_z_slices, scene.num_t_frames)
    if scene.has_plane_timestamps:
        print(scene.get_plane_timestamp(0, 0, 0))

Computed Scenes

Until now every Scene came from a file opened by a driver. Three new C++ declarations make it possible to build one from anything that can produce a raster — a processing pipeline, a synthetic test pattern, a remote tile service — so code written against the scene interface, the converter included, can consume it without knowing where the pixels came from.

  • ISceneSource (slideio/slideio/scenesource.hpp) is the interface you implement. Its one required method, readBlock, fills a buffer with a rectangle of the scene resampled to a requested size. A source that keeps its own pyramid can serve zoom levels directly through readLevelBlock, and supportsConcurrentReads says whether reads may overlap; SlideIO serialises them otherwise.

  • SceneMetadata (slideio/slideio/scenemetadata.hpp) describes the scene: its name, rectangle, channel data types and names, resolution, magnification, Z and T dimensions, zoom levels and colour profile.

  • makeScene(source, metadata) returns a std::shared_ptr<slideio::Scene> backed by the source.

#include "slideio/slideio/scenesource.hpp"
#include "slideio/slideio/scenemetadata.hpp"

class Gradient : public slideio::ISceneSource {
public:
    void readBlock(const slideio::Rect& rect, const slideio::Size& blockSize,
                   const std::vector<int>& channels, int zSlice, int tFrame,
                   void* buffer, size_t bufferSize) override {
        // fill buffer with blockSize.width * blockSize.height * channels.size() bytes
    }
};

slideio::SceneMetadata m;
m.name = "gradient";
m.rect = slideio::Rect(0, 0, 4096, 4096);
m.channelDataTypes.assign(3, slideio::DataType::DT_Byte);
m.levels.emplace_back(0, slideio::Size(4096, 4096), 1.0, 20.0, slideio::Size(256, 256));

std::shared_ptr<slideio::Scene> scene = slideio::makeScene(std::make_shared<Gradient>(), m);

The metadata is validated once, when the scene is made, and malformed metadata raises slideio::RuntimeError from makeScene rather than surfacing later as a failed read. Reads with an out-of-range channel, level, Z slice or time frame are rejected before the source is called. The API is C++ only for now. See the C++ reference for the full contract.

Open Options

open_slide in Python and openSlide in C++ take an optional set of open options, passed to the driver that opens the file. Each key is written <driver-id>.<name>, so one set can carry options for several formats; keys for other drivers are ignored, and a key with an unknown driver prefix is rejected before the file is touched. The two-argument openSlide is unchanged.

slide = slideio.open_slide("slide.mrxs", "AUTO", {"mrxs.crop_to_content": False})
auto slide = slideio::openSlide("slide.mrxs", "", {{"mrxs.crop_to_content", "false"}});

The first option is mrxs.crop_to_content, which decides whether a MIRAX scene is cropped to the scanned area (the default) or covers the full canvas. slideio-converter takes options as -o key=value, repeatable, and converting a scene re-opens it with the options it was opened with. See Open options.

Channel Attributes and Background

  • slideio/core/channelattributes.hpp names the standard channel attributes — ChannelAttribute::Color, Name, EmissionWavelength and ExcitationWavelength — and the drivers and the converter use them instead of literal keys.

  • The value of pixels a scene has no data for is now a per-channel property of the scene. The default keeps the previous rule: 255 for byte channels and 0 otherwise.

Edge Reads

A block read whose rectangle crosses the edge of a scene now fills the overhang with background in every driver. GDAL, single-frame DICOM, striped SVS, QPTIFF and VSI scenes used to fail with an OpenCV assertion, and small scenes stretched the clipped part over the whole block.

Breaking Changes

Each is described in full in software-docs/BREAKING_CHANGES.md of the SlideIO repository.

  • Multi-file VSI scene order. The scenes of a multi-file VSI slide are ordered by stack id, then path, rather than by file-system listing order, so the order is the same on every platform. A scene may sit at a different index than before; select scenes by name where it matters.

  • Mixed channel types. A block read over channels of different data types raises RuntimeError instead of returning a block typed by the first channel. Converting such channels to OME-TIFF raises the same error instead of writing a file that contradicts its own OME-XML.

  • Negative block sizes raise RuntimeError from every read path, before any allocation.

  • Invalid scene indices raise RuntimeError from every driver, and a negative index no longer reads out of bounds.

  • Transformation has a virtual destructor, and a transformation type defined outside SlideIO is rejected instead of being misread. C++ code compiled against an earlier transformation.hpp must be rebuilt.

Bug Fixes and Improvements

  • VSI: volumes whose metadata names no C dimension infer it from their tiles, and ETS files are paired with volumes by stack id.

  • NDPI: all open files share one striped-raster cache budget, and concurrent reads of an NDPI scene no longer serialise on its decode.

  • NDPI, CZI and GDAL: scenes stay readable after their slide is released.

  • JPEG 2000: striped TIFF directories are decoded, not only tiled ones (for example a VSI “FocusMap”), and a strip that decodes larger than the rows it carries is cropped.

  • Converter: a transformed scene is converted with its transformation applied; it used to write the untransformed pixels.

  • Indexed (palette) images decoded through FreeImage are expanded.

  • Rectangle scaling is computed in 64-bit, avoiding overflow on very large slides.

  • slideio-imagetools decodes JPEG, PNG and BMP streams in memory and reads the XMLPacket and ImageDepth TIFF tags.

Python Module

The Python module 2.11.0 is built on this release. All four new drivers are available through open_slide, which now also takes an options dict of open options. LIF and ND2 scenes report per-plane timestamps through Scene.has_plane_timestamps and Scene.get_plane_timestamp. macOS arm64 wheels are now built on the macos-15 runner, with the platform floor unchanged at macOS 12.0.

SlideIO Viewer

SlideIO Viewer 0.3.0, built on this release, opens MIRAX, BIF, LIF and ND2 files, each with its own filter in the Open dialog.

Getting Started

A comprehensive tutorial with step-by-step instructions and code samples is available in our GitHub repository:

https://github.com/Booritas/slideio-tutorial

We welcome your feedback and issue reports on GitHub and appreciate your continued support of the SlideIO project.