large-image-source-tiff 1.30.6.dev26__py3-none-any.whl → 1.30.6.dev38__py3-none-any.whl

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.
@@ -141,7 +141,7 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
141
141
  continue
142
142
  # If a layer is a multiple of the tile size, the number of tiles
143
143
  # should be a power of two rounded up from the primary.
144
- if (not (td.imageWidth % td.tileWidth) and not (td.imageHeight % td.tileHeight)):
144
+ if not (td.imageWidth % td.tileWidth) and not (td.imageHeight % td.tileHeight):
145
145
  htw = highest.imageWidth // td.tileWidth
146
146
  hth = highest.imageHeight // td.tileHeight
147
147
  ttw = td.imageWidth // td.tileWidth
@@ -695,8 +695,7 @@ class TiffFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
695
695
  except Exception:
696
696
  if sparseFallback:
697
697
  raise IOTiffError('Missing z level %d' % z)
698
- else:
699
- raise
698
+ raise
700
699
  else:
701
700
  tile = dir.getTile(x, y, asarray=numpyAllowed == 'always')
702
701
  format = 'JPEG'
@@ -447,12 +447,11 @@ class TiledTiffDirectory:
447
447
 
448
448
  if tileByteCountsLibtiffType == libtiff_ctypes.TIFFDataType.TIFF_LONG8:
449
449
  return ctypes.c_uint64
450
- elif tileByteCountsLibtiffType == \
450
+ if tileByteCountsLibtiffType == \
451
451
  libtiff_ctypes.TIFFDataType.TIFF_SHORT:
452
452
  return ctypes.c_uint16
453
- else:
454
- raise IOTiffError(
455
- 'Invalid type for TIFFTAG_TILEBYTECOUNTS: %s' % tileByteCountsLibtiffType)
453
+ raise IOTiffError(
454
+ 'Invalid type for TIFFTAG_TILEBYTECOUNTS: %s' % tileByteCountsLibtiffType)
456
455
 
457
456
  def _getJpegFrameSize(self, tileNum):
458
457
  """
@@ -529,10 +528,10 @@ class TiledTiffDirectory:
529
528
  if bytesRead == -1:
530
529
  msg = 'Failed to read raw tile'
531
530
  raise IOTiffError(msg)
532
- elif bytesRead < rawTileSize:
531
+ if bytesRead < rawTileSize:
533
532
  msg = 'Buffer underflow when reading tile'
534
533
  raise IOTiffError(msg)
535
- elif bytesRead > rawTileSize:
534
+ if bytesRead > rawTileSize:
536
535
  # It's unlikely that this will ever occur, but incomplete reads will
537
536
  # be checked for by looking for the JPEG end marker
538
537
  msg = 'Buffer overflow when reading tile'
@@ -838,7 +837,7 @@ class TiledTiffDirectory:
838
837
  self._embeddedImages = {}
839
838
 
840
839
  if not meta:
841
- return
840
+ return None
842
841
  if not isinstance(meta, str):
843
842
  meta = meta.decode(errors='ignore')
844
843
  try:
@@ -860,7 +859,7 @@ class TiledTiffDirectory:
860
859
  meta.split('|MPP = ', 1)[1].split('|')[0].strip()) * 0.001
861
860
  except Exception:
862
861
  pass
863
- return
862
+ return None
864
863
  try:
865
864
  image = xml.find(
866
865
  ".//DataObject[@ObjectType='DPScannedImage']")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: large-image-source-tiff
3
- Version: 1.30.6.dev26
3
+ Version: 1.30.6.dev38
4
4
  Summary: A TIFF tilesource for large_image.
5
5
  Home-page: https://github.com/girder/large_image
6
6
  Author: Kitware, Inc.
@@ -19,13 +19,13 @@ Classifier: Programming Language :: Python :: 3.13
19
19
  Requires-Python: >=3.8
20
20
  Description-Content-Type: text/x-rst
21
21
  License-File: LICENSE
22
- Requires-Dist: large-image>=1.30.6.dev26
22
+ Requires-Dist: large-image>=1.30.6.dev38
23
23
  Requires-Dist: pylibtiff
24
24
  Requires-Dist: tifftools>=1.2.0
25
25
  Provides-Extra: all
26
26
  Requires-Dist: pylibjpeg-openjpeg; extra == "all"
27
27
  Provides-Extra: girder
28
- Requires-Dist: girder-large-image>=1.30.6.dev26; extra == "girder"
28
+ Requires-Dist: girder-large-image>=1.30.6.dev38; extra == "girder"
29
29
 
30
30
  A TIFF tilesource for large_image.
31
31
 
@@ -0,0 +1,10 @@
1
+ large_image_source_tiff/__init__.py,sha256=o-NkH3SI7XLmEdejSREFMw39kfTMu2LiV3GGHsmNrPQ,36588
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=BOa2i22jjlpfweBiQs4U_sgg7c1xdZ10KzLhu6vd0eY,40388
5
+ large_image_source_tiff-1.30.6.dev38.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
6
+ large_image_source_tiff-1.30.6.dev38.dist-info/METADATA,sha256=cIGhlSmrJeYRQOi8wWSEgUE8TsYQdyKyOq_oD47l0Bc,1188
7
+ large_image_source_tiff-1.30.6.dev38.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
8
+ large_image_source_tiff-1.30.6.dev38.dist-info/entry_points.txt,sha256=iZ43sIcj98SND7nDUC-_4qroBL6apyXN4iSbPXZ8LE4,166
9
+ large_image_source_tiff-1.30.6.dev38.dist-info/top_level.txt,sha256=QRx_D2oeiOOz_5FlBOAoDPF-E4Q-aFmerUWlaeP14B8,24
10
+ large_image_source_tiff-1.30.6.dev38.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.7.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- large_image_source_tiff/__init__.py,sha256=fP1mgU1hpDIgPTUgn5dFWPNc_JHNY-1heb26Txnao7Q,36620
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=4_MCUcAslsdiVCyMvNl0dhrxcKV8_UFffR1yNwB0PjU,40406
5
- large_image_source_tiff-1.30.6.dev26.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
6
- large_image_source_tiff-1.30.6.dev26.dist-info/METADATA,sha256=Ppht4rW4vXWfoEOhyN_1LOAQRsc3SflbDQLlHsfASRk,1188
7
- large_image_source_tiff-1.30.6.dev26.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
8
- large_image_source_tiff-1.30.6.dev26.dist-info/entry_points.txt,sha256=iZ43sIcj98SND7nDUC-_4qroBL6apyXN4iSbPXZ8LE4,166
9
- large_image_source_tiff-1.30.6.dev26.dist-info/top_level.txt,sha256=QRx_D2oeiOOz_5FlBOAoDPF-E4Q-aFmerUWlaeP14B8,24
10
- large_image_source_tiff-1.30.6.dev26.dist-info/RECORD,,