large-image-source-tiff 1.21.1.dev9__tar.gz → 1.21.1.dev26__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (15) hide show
  1. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/PKG-INFO +1 -1
  2. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/large_image_source_tiff/__init__.py +12 -0
  3. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/large_image_source_tiff.egg-info/PKG-INFO +1 -1
  4. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/large_image_source_tiff.egg-info/requires.txt +2 -2
  5. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/LICENSE +0 -0
  6. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/README.rst +0 -0
  7. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/large_image_source_tiff/exceptions.py +0 -0
  8. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/large_image_source_tiff/girder_source.py +0 -0
  9. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/large_image_source_tiff/tiff_reader.py +0 -0
  10. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/large_image_source_tiff.egg-info/SOURCES.txt +0 -0
  11. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/large_image_source_tiff.egg-info/dependency_links.txt +0 -0
  12. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/large_image_source_tiff.egg-info/entry_points.txt +0 -0
  13. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/large_image_source_tiff.egg-info/top_level.txt +0 -0
  14. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/setup.cfg +0 -0
  15. {large-image-source-tiff-1.21.1.dev9 → large-image-source-tiff-1.21.1.dev26}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: large-image-source-tiff
3
- Version: 1.21.1.dev9
3
+ Version: 1.21.1.dev26
4
4
  Summary: A TIFF tilesource for large_image.
5
5
  Home-page: https://github.com/girder/large_image
6
6
  Author: Kitware, Inc.
@@ -159,6 +159,12 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
159
159
  raise TileSourceError(
160
160
  'Tiff image must have at least two levels.')
161
161
 
162
+ sampleformat = highest._tiffInfo.get('sampleformat')
163
+ bitspersample = highest._tiffInfo.get('bitspersample')
164
+ self._dtype = numpy.dtype('%s%d' % (
165
+ tifftools.constants.SampleFormat[sampleformat or 1].name,
166
+ bitspersample
167
+ ))
162
168
  # Sort the directories so that the highest resolution is the last one;
163
169
  # if a level is missing, put a None value in its place.
164
170
  self._tiffDirectories = [directories.get(key) for key in
@@ -286,6 +292,12 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
286
292
  self.levels = max(1, int(math.ceil(math.log(max(
287
293
  dir0.imageWidth / dir0.tileWidth,
288
294
  dir0.imageHeight / dir0.tileHeight)) / math.log(2))) + 1)
295
+ sampleformat = dir0._tiffInfo.get('sampleformat')
296
+ bitspersample = dir0._tiffInfo.get('bitspersample')
297
+ self._dtype = numpy.dtype('%s%d' % (
298
+ tifftools.constants.SampleFormat[sampleformat or 1].name,
299
+ bitspersample
300
+ ))
289
301
  info = _cached_read_tiff(self._largeImagePath)
290
302
  frames = []
291
303
  associated = [] # for now, a list of directories
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: large-image-source-tiff
3
- Version: 1.21.1.dev9
3
+ Version: 1.21.1.dev26
4
4
  Summary: A TIFF tilesource for large_image.
5
5
  Home-page: https://github.com/girder/large_image
6
6
  Author: Kitware, Inc.
@@ -1,4 +1,4 @@
1
- large-image>=1.21.1.dev9
1
+ large-image>=1.21.1.dev26
2
2
  pylibtiff
3
3
  tifftools>=1.2.0
4
4
 
@@ -6,4 +6,4 @@ tifftools>=1.2.0
6
6
  importlib-metadata<5
7
7
 
8
8
  [girder]
9
- girder-large-image>=1.21.1.dev9
9
+ girder-large-image>=1.21.1.dev26