large-image-source-tiff 1.32.1.dev2__tar.gz → 1.33.5.dev6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (16) hide show
  1. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/PKG-INFO +19 -8
  2. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/README.rst +7 -5
  3. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/large_image_source_tiff/__init__.py +8 -3
  4. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/large_image_source_tiff/tiff_reader.py +6 -1
  5. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/large_image_source_tiff.egg-info/PKG-INFO +19 -8
  6. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/large_image_source_tiff.egg-info/requires.txt +2 -2
  7. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/pyproject.toml +4 -0
  8. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/setup.py +2 -6
  9. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/LICENSE +0 -0
  10. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/large_image_source_tiff/exceptions.py +0 -0
  11. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/large_image_source_tiff/girder_source.py +0 -0
  12. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/large_image_source_tiff.egg-info/SOURCES.txt +0 -0
  13. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/large_image_source_tiff.egg-info/dependency_links.txt +0 -0
  14. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/large_image_source_tiff.egg-info/entry_points.txt +0 -0
  15. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/large_image_source_tiff.egg-info/top_level.txt +0 -0
  16. {large_image_source_tiff-1.32.1.dev2 → large_image_source_tiff-1.33.5.dev6}/setup.cfg +0 -0
@@ -1,31 +1,42 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: large-image-source-tiff
3
- Version: 1.32.1.dev2
3
+ Version: 1.33.5.dev6
4
4
  Summary: A TIFF tilesource for large_image.
5
5
  Home-page: https://github.com/girder/large_image
6
6
  Author: Kitware, Inc.
7
7
  Author-email: kitware@kitware.com
8
- License: Apache Software License 2.0
8
+ License: Apache-2.0
9
9
  Keywords: large_image,tile source
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
- Classifier: License :: OSI Approved :: Apache Software License
12
11
  Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.8
14
12
  Classifier: Programming Language :: Python :: 3.9
15
13
  Classifier: Programming Language :: Python :: 3.10
16
14
  Classifier: Programming Language :: Python :: 3.11
17
15
  Classifier: Programming Language :: Python :: 3.12
18
16
  Classifier: Programming Language :: Python :: 3.13
19
- Requires-Python: >=3.8
17
+ Requires-Python: >=3.9
20
18
  Description-Content-Type: text/x-rst
21
19
  License-File: LICENSE
22
- Requires-Dist: large-image>=1.32.1.dev2
20
+ Requires-Dist: large-image>=1.33.5.dev6
23
21
  Requires-Dist: pylibtiff
24
22
  Requires-Dist: tifftools>=1.2.0
25
23
  Provides-Extra: all
26
24
  Requires-Dist: pylibjpeg-openjpeg; extra == "all"
27
25
  Provides-Extra: girder
28
- Requires-Dist: girder-large-image>=1.32.1.dev2; extra == "girder"
26
+ Requires-Dist: girder-large-image>=1.33.5.dev6; extra == "girder"
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: description-content-type
32
+ Dynamic: home-page
33
+ Dynamic: keywords
34
+ Dynamic: license
35
+ Dynamic: license-file
36
+ Dynamic: provides-extra
37
+ Dynamic: requires-dist
38
+ Dynamic: requires-python
39
+ Dynamic: summary
29
40
 
30
41
  A TIFF tilesource for large_image.
31
42
 
@@ -154,13 +154,15 @@ There is also cache management to balance memory use and speed of response in Gi
154
154
 
155
155
  Most tile sources can be used with Girder Large Image. You can specify an extras_require of ``girder`` to install the following packages:
156
156
 
157
- - ``girder-large-image``: Large Image as a Girder 3.x plugin.
158
- You can install ``large-image[tasks]`` to install a Girder Worker task that can convert otherwise unreadable images to pyramidal tiff files.
157
+ - ``girder-large-image``: Large Image as a Girder 3.x plugin.
159
158
 
160
- - ``girder-large-image-annotation``: Adds models to the Girder database for supporting annotating large images. These annotations can be rendered on images. Annotations can include polygons, points, image overlays, and other types. Each annotation can have a label and metadata.
159
+ You can install ``large-image[tasks]`` to install a Girder Worker task that can convert otherwise unreadable images to pyramidal tiff files.
161
160
 
162
- - ``large-image-tasks``: A utility for running the converter via Girder Worker.
163
- You can specify an extras_require of ``girder`` to include modules needed to work with the Girder remote worker or ``worker`` to include modules needed on the remote side of the Girder remote worker. If neither is specified, some conversion tasks can be run using Girder local jobs.
161
+ - ``girder-large-image-annotation``: Adds models to the Girder database for supporting annotating large images. These annotations can be rendered on images. Annotations can include polygons, points, image overlays, and other types. Each annotation can have a label and metadata.
162
+
163
+ - ``large-image-tasks``: A utility for running the converter via Girder Worker.
164
+
165
+ You can specify an extras_require of ``girder`` to include modules needed to work with the Girder remote worker or ``worker`` to include modules needed on the remote side of the Girder remote worker. If neither is specified, some conversion tasks can be run using Girder local jobs.
164
166
 
165
167
 
166
168
 
@@ -59,9 +59,9 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
59
59
  cacheName = 'tilesource'
60
60
  name = 'tiff'
61
61
  extensions = {
62
- None: SourcePriority.MEDIUM,
63
- 'tif': SourcePriority.HIGH,
64
- 'tiff': SourcePriority.HIGH,
62
+ None: SourcePriority.HIGH,
63
+ 'tif': SourcePriority.PREFERRED,
64
+ 'tiff': SourcePriority.PREFERRED,
65
65
  'ptif': SourcePriority.PREFERRED,
66
66
  'ptiff': SourcePriority.PREFERRED,
67
67
  'qptiff': SourcePriority.PREFERRED,
@@ -514,6 +514,9 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
514
514
  image.
515
515
  :param imageId: if specified, use this as the image name.
516
516
  """
517
+ if not hasattr(self, '_associatedImagesDir'):
518
+ self._associatedImagesDir = {'images': {}, 'dirs': {}}
519
+ self._associatedImagesDir['dirs'][directoryNum] = None
517
520
  try:
518
521
  associated = self.getTiffDir(directoryNum, mustBeTiled)
519
522
  id = ''
@@ -548,6 +551,8 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
548
551
  return
549
552
  image = self._reorient_numpy_image(image, associated._tiffInfo.get('orientation'))
550
553
  self._associatedImages[id] = image
554
+ self._associatedImagesDir['images'][id] = directoryNum
555
+ self._associatedImagesDir['dirs'][directoryNum] = id
551
556
  except (TiffError, AttributeError):
552
557
  # If we can't validate or read an associated image or it has no
553
558
  # useful imagedescription, fail quietly without adding an
@@ -80,6 +80,8 @@ def patchLibtiff():
80
80
  libtiff_ctypes.TIFFDataType.TIFF_SLONG8 = 17
81
81
  # BigTIFF 64-bit unsigned integer (offset)
82
82
  libtiff_ctypes.TIFFDataType.TIFF_IFD8 = 18
83
+ # Some versions of pylibtiff specify an argtypes where they shouldn't
84
+ libtiff_ctypes.libtiff.TIFFGetField.argtypes = None
83
85
 
84
86
 
85
87
  patchLibtiff()
@@ -796,7 +798,10 @@ class TiledTiffDirectory:
796
798
  } and (
797
799
  self._tiffInfo.get('compression') != libtiff_ctypes.COMPRESSION_JPEG or
798
800
  self._tiffInfo.get('photometric') != libtiff_ctypes.PHOTOMETRIC_YCBCR))):
799
- return self._getUncompressedTile(tileNum)
801
+ try:
802
+ return self._getUncompressedTile(tileNum)
803
+ except Exception:
804
+ pass
800
805
 
801
806
  imageBuffer = io.BytesIO()
802
807
 
@@ -1,31 +1,42 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: large-image-source-tiff
3
- Version: 1.32.1.dev2
3
+ Version: 1.33.5.dev6
4
4
  Summary: A TIFF tilesource for large_image.
5
5
  Home-page: https://github.com/girder/large_image
6
6
  Author: Kitware, Inc.
7
7
  Author-email: kitware@kitware.com
8
- License: Apache Software License 2.0
8
+ License: Apache-2.0
9
9
  Keywords: large_image,tile source
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
- Classifier: License :: OSI Approved :: Apache Software License
12
11
  Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.8
14
12
  Classifier: Programming Language :: Python :: 3.9
15
13
  Classifier: Programming Language :: Python :: 3.10
16
14
  Classifier: Programming Language :: Python :: 3.11
17
15
  Classifier: Programming Language :: Python :: 3.12
18
16
  Classifier: Programming Language :: Python :: 3.13
19
- Requires-Python: >=3.8
17
+ Requires-Python: >=3.9
20
18
  Description-Content-Type: text/x-rst
21
19
  License-File: LICENSE
22
- Requires-Dist: large-image>=1.32.1.dev2
20
+ Requires-Dist: large-image>=1.33.5.dev6
23
21
  Requires-Dist: pylibtiff
24
22
  Requires-Dist: tifftools>=1.2.0
25
23
  Provides-Extra: all
26
24
  Requires-Dist: pylibjpeg-openjpeg; extra == "all"
27
25
  Provides-Extra: girder
28
- Requires-Dist: girder-large-image>=1.32.1.dev2; extra == "girder"
26
+ Requires-Dist: girder-large-image>=1.33.5.dev6; extra == "girder"
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: description-content-type
32
+ Dynamic: home-page
33
+ Dynamic: keywords
34
+ Dynamic: license
35
+ Dynamic: license-file
36
+ Dynamic: provides-extra
37
+ Dynamic: requires-dist
38
+ Dynamic: requires-python
39
+ Dynamic: summary
29
40
 
30
41
  A TIFF tilesource for large_image.
31
42
 
@@ -1,4 +1,4 @@
1
- large-image>=1.32.1.dev2
1
+ large-image>=1.33.5.dev6
2
2
  pylibtiff
3
3
  tifftools>=1.2.0
4
4
 
@@ -6,4 +6,4 @@ tifftools>=1.2.0
6
6
  pylibjpeg-openjpeg
7
7
 
8
8
  [girder]
9
- girder-large-image>=1.32.1.dev2
9
+ girder-large-image>=1.33.5.dev6
@@ -1,3 +1,7 @@
1
1
  [build-system]
2
2
  requires = ["setuptools", "setuptools-scm"]
3
3
  build-backend = "setuptools.build_meta"
4
+
5
+ [tool.setuptools_scm]
6
+ fallback_version = "0.0.0"
7
+ root = "../.."
@@ -16,25 +16,22 @@ except (ImportError, LookupError):
16
16
 
17
17
  setup(
18
18
  name='large-image-source-tiff',
19
- use_scm_version={'root': '../..',
20
- 'fallback_version': '0.0.0'},
21
19
  description=description,
22
20
  long_description=long_description,
23
21
  long_description_content_type='text/x-rst',
24
- license='Apache Software License 2.0',
22
+ license='Apache-2.0',
25
23
  author='Kitware, Inc.',
26
24
  author_email='kitware@kitware.com',
27
25
  classifiers=[
28
26
  'Development Status :: 5 - Production/Stable',
29
- 'License :: OSI Approved :: Apache Software License',
30
27
  'Programming Language :: Python :: 3',
31
- 'Programming Language :: Python :: 3.8',
32
28
  'Programming Language :: Python :: 3.9',
33
29
  'Programming Language :: Python :: 3.10',
34
30
  'Programming Language :: Python :: 3.11',
35
31
  'Programming Language :: Python :: 3.12',
36
32
  'Programming Language :: Python :: 3.13',
37
33
  ],
34
+ python_requires='>=3.9',
38
35
  install_requires=[
39
36
  f'large-image{limit_version}',
40
37
  'pylibtiff',
@@ -49,7 +46,6 @@ setup(
49
46
  keywords='large_image, tile source',
50
47
  packages=find_packages(exclude=['test', 'test.*']),
51
48
  url='https://github.com/girder/large_image',
52
- python_requires='>=3.8',
53
49
  entry_points={
54
50
  'large_image.source': [
55
51
  'tiff = large_image_source_tiff:TiffFileTileSource',