large-image-source-tiff 1.26.2.dev34__py3-none-any.whl → 1.26.3__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,7 +28,6 @@ import numpy as np
28
28
  import PIL.Image
29
29
  import tifftools
30
30
 
31
- from large_image import config
32
31
  from large_image.cache_util import LruCacheMetaclass, methodcache
33
32
  from large_image.constants import TILE_FORMAT_NUMPY, TILE_FORMAT_PIL, SourcePriority
34
33
  from large_image.exceptions import TileSourceError, TileSourceFileNotFoundError
@@ -89,7 +88,7 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
89
88
  self._initWithTiffTools()
90
89
  return
91
90
  except Exception as exc:
92
- config.getConfig('logger').debug('Cannot read with tifftools route; %r', exc)
91
+ self.logger.debug('Cannot read with tifftools route; %r', exc)
93
92
 
94
93
  alldir = []
95
94
  try:
@@ -109,7 +108,7 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
109
108
  raise TileSourceFileNotFoundError(self._largeImagePath) from None
110
109
  msg = "File %s didn't meet requirements for tile source: %s" % (
111
110
  self._largeImagePath, lastException)
112
- config.getConfig('logger').debug(msg)
111
+ self.logger.debug(msg)
113
112
  raise TileSourceError(msg)
114
113
  # Sort the known directories by image area (width * height). Given
115
114
  # equal area, sort by the level.
@@ -393,7 +392,7 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
393
392
  self._skippedLevels = maxMissing
394
393
  if maxMissing >= self._maxSkippedLevels:
395
394
  if warn:
396
- config.getConfig('logger').warning(
395
+ self.logger.warning(
397
396
  'Tiff image is missing many lower resolution levels (%d). '
398
397
  'It will be inefficient to read lower resolution tiles.', maxMissing)
399
398
  self._inefficientWarning = True
@@ -501,7 +500,7 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
501
500
  except Exception:
502
501
  # If we fail for other reasons, don't raise an exception, but log
503
502
  # what happened.
504
- config.getConfig('logger').exception(
503
+ self.logger.exception(
505
504
  'Could not use non-tiled TIFF image as an associated image.')
506
505
 
507
506
  def _parseImageXml(self, xml, topImage):
@@ -43,7 +43,7 @@ except ValueError as exc:
43
43
  # ImportError. We convert this to an ImportError, so that we will print a
44
44
  # more lucid error message and just fail to load this one tile source
45
45
  # instead of failing to load the whole plugin.
46
- config.getConfig('logger').warning(
46
+ config.getLogger().warning(
47
47
  'Failed to import libtiff; try upgrading the python module (%s)' % exc)
48
48
  raise ImportError(str(exc))
49
49
 
@@ -97,7 +97,7 @@ class TiledTiffDirectory:
97
97
  :raises: InvalidOperationTiffError or IOTiffError or
98
98
  ValidationTiffError
99
99
  """
100
- self.logger = config.getConfig('logger')
100
+ self.logger = config.getLogger()
101
101
  # create local cache to store Jpeg tables and getTileByteCountsType
102
102
  self.cache = cachetools.LRUCache(10)
103
103
  self._mustBeTiled = mustBeTiled
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: large-image-source-tiff
3
- Version: 1.26.2.dev34
3
+ Version: 1.26.3
4
4
  Summary: A TIFF tilesource for large_image.
5
5
  Home-page: https://github.com/girder/large_image
6
6
  Author: Kitware, Inc.
@@ -17,11 +17,11 @@ Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Requires-Python: >=3.8
19
19
  License-File: LICENSE
20
- Requires-Dist: large-image >=1.26.2.dev34
20
+ Requires-Dist: large-image >=1.26.3
21
21
  Requires-Dist: pylibtiff
22
22
  Requires-Dist: tifftools >=1.2.0
23
23
  Provides-Extra: girder
24
- Requires-Dist: girder-large-image >=1.26.2.dev34 ; extra == 'girder'
24
+ Requires-Dist: girder-large-image >=1.26.3 ; extra == 'girder'
25
25
 
26
26
  A TIFF tilesource for large_image.
27
27
 
@@ -0,0 +1,10 @@
1
+ large_image_source_tiff/__init__.py,sha256=mCcJqAbDqdaaCPqD5Zfu8saj-j8KZZoTqdMyy9RAlWw,33952
2
+ large_image_source_tiff/exceptions.py,sha256=NgdwloaDCtbtUMe2BU2lXEU8IwQSYtaokIwGIFypCps,617
3
+ large_image_source_tiff/girder_source.py,sha256=Dp2e3O4VTANYXZI_eybgzs5BcyuMcw2-MAzCUJ8zzPg,1031
4
+ large_image_source_tiff/tiff_reader.py,sha256=i6HztBXfPWEIncUo_y3rWuhUNrv3CG8oAVKOUWCkn2A,38094
5
+ large_image_source_tiff-1.26.3.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
6
+ large_image_source_tiff-1.26.3.dist-info/METADATA,sha256=i8sI_vKZnhJfMWKQ80UCYA2pPX4Ji3VhXf_3fHMccGs,1016
7
+ large_image_source_tiff-1.26.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
8
+ large_image_source_tiff-1.26.3.dist-info/entry_points.txt,sha256=iZ43sIcj98SND7nDUC-_4qroBL6apyXN4iSbPXZ8LE4,166
9
+ large_image_source_tiff-1.26.3.dist-info/top_level.txt,sha256=QRx_D2oeiOOz_5FlBOAoDPF-E4Q-aFmerUWlaeP14B8,24
10
+ large_image_source_tiff-1.26.3.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- large_image_source_tiff/__init__.py,sha256=40kACkpiNCPxIaqIilveB7eacsdr39UpsvPG23zfnGg,34043
2
- large_image_source_tiff/exceptions.py,sha256=NgdwloaDCtbtUMe2BU2lXEU8IwQSYtaokIwGIFypCps,617
3
- large_image_source_tiff/girder_source.py,sha256=Dp2e3O4VTANYXZI_eybgzs5BcyuMcw2-MAzCUJ8zzPg,1031
4
- large_image_source_tiff/tiff_reader.py,sha256=2dUHzjCtk43k3eigqUteISKKFPVDX420gV0qVvU_KHU,38110
5
- large_image_source_tiff-1.26.2.dev34.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
6
- large_image_source_tiff-1.26.2.dev34.dist-info/METADATA,sha256=h5Qi_GSIaNSiYpHfI7RnpjKmEtTYJ-3v0SvQZHm-ub0,1034
7
- large_image_source_tiff-1.26.2.dev34.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
8
- large_image_source_tiff-1.26.2.dev34.dist-info/entry_points.txt,sha256=iZ43sIcj98SND7nDUC-_4qroBL6apyXN4iSbPXZ8LE4,166
9
- large_image_source_tiff-1.26.2.dev34.dist-info/top_level.txt,sha256=QRx_D2oeiOOz_5FlBOAoDPF-E4Q-aFmerUWlaeP14B8,24
10
- large_image_source_tiff-1.26.2.dev34.dist-info/RECORD,,