Skip to content

Commit

Permalink
Merge pull request #867 from girder/nd2-0.2.3
Browse files Browse the repository at this point in the history
Adapt to using nd2 0.2.3.
  • Loading branch information
manthey authored May 26, 2022
2 parents 8b99521 + dd9f8a3 commit c589412
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sources/nd2/large_image_source_nd2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ def __init__(self, path, **kwargs):

_lazyImport()
try:
# We use dask to allow lazy reading of large images
self._nd2 = nd2.ND2File(self._largeImagePath)
self._nd2 = nd2.ND2File(self._largeImagePath, validate_frames=True)
except Exception:
if not os.path.isfile(self._largeImagePath):
raise TileSourceFileNotFoundError(self._largeImagePath) from None
raise TileSourceError('File cannot be opened via nd2reader.')
# We use dask to allow lazy reading of large images
self._nd2array = self._nd2.to_dask(copy=False)
arrayOrder = list(self._nd2.sizes)
# Reorder this so that it is XY (P), T, Z, C, Y, X, S (or at least end
Expand Down
2 changes: 1 addition & 1 deletion sources/nd2/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def prerelease_local_scheme(version):
install_requires=[
f'large-image{limit_version}',
'dask[array]',
'nd2[legacy]<0.2.3 ; python_version >= "3.7"',
'nd2[legacy]>=0.2.3 ; python_version >= "3.7"',
'importlib-metadata ; python_version < "3.8"',
],
extras_require={
Expand Down

0 comments on commit c589412

Please sign in to comment.