large-image-source-nd2

raw JSON →
1.34.1 verified Sat May 09 auth: no python

A tilesource for the large-image framework that reads ND2 (NIS Elements) files. Version 1.34.1, released May 2026, follows large-image releases about every 2-4 weeks.

pip install large-image-source-nd2
error ModuleNotFoundError: No module named 'nd2'
cause Missing dependency: nd2 library is not installed.
fix
pip install nd2
error FileNotFoundError: [Errno 2] No such file or directory: 'path/to/file.nd2'
cause File path is incorrect or file does not exist.
fix
Verify the file path and ensure the file exists.
error ValueError: Invalid ND2 file
cause The file is not a valid ND2 format or is corrupted.
fix
Use nd2 library directly to validate the file: from nd2 import ND2File; f = ND2File('file.nd2').
gotcha ND2 files can contain multiple channels and frames; use getMetadata() to inspect dimensions before accessing tiles.
fix Always call ts.getMetadata() to get axes and sizes.
breaking Requires Python >=3.10. Python 3.9 or earlier will fail to install.
fix Upgrade to Python 3.10+.
deprecated Support for Girder <5 is deprecated; future versions may drop compatibility.
fix Upgrade Girder to 5+ or use large_image without Girder.

Open an ND2 file and get a tile at level 0, position (0,0).

from large_image_source_nd2 import open
ts = open('path/to/file.nd2')
print(ts.getMetadata())
tile = ts.getTile(0, 0, 0)
print(tile.shape)