Skip to content

Commit

Permalink
Merge pull request #1004 from girder/nd2-comments
Browse files Browse the repository at this point in the history
Clean up some comments regarding the nd2 library used.
  • Loading branch information
manthey authored Nov 29, 2022
2 parents c64d8dd + 4f1f8da commit af5839c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 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 @@ -100,7 +100,7 @@ def diffObj(obj1, obj2):

class ND2FileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
"""
Provides tile access to nd2 files the nd2 or nd2reader library can read.
Provides tile access to nd2 files the nd2 library can read.
"""

cacheName = 'tilesource'
Expand Down Expand Up @@ -138,7 +138,7 @@ def __init__(self, path, **kwargs):
except Exception:
if not os.path.isfile(self._largeImagePath):
raise TileSourceFileNotFoundError(self._largeImagePath) from None
raise TileSourceError('File cannot be opened via nd2reader.')
raise TileSourceError('File cannot be opened via the nd2 source.')
# We use dask to allow lazy reading of large images
self._nd2array = self._nd2.to_dask(copy=False, wrapper=False) # ##DWM::
arrayOrder = list(self._nd2.sizes)
Expand Down
7 changes: 2 additions & 5 deletions sources/nd2/large_image_source_nd2/girder_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@
class ND2GirderTileSource(ND2FileTileSource, GirderTileSource):
"""
Provides tile access to Girder items with an ND2 file or other files that
the nd2reader library can read.
the nd2 library can read.
"""

cacheName = 'tilesource'
name = 'nd2'

def mayHaveAdjacentFiles(self, largeImageFile):
# As of nd2reader 3.3.0, the extension is required to be nd2. Set this
# to true to ensure the extension appears as expected.
return True
_mayHaveAdjacentFiles = True

0 comments on commit af5839c

Please sign in to comment.