large-image-source-tifffile 1.31.2.dev96__py3-none-any.whl → 1.31.2.dev104__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.
@@ -2,6 +2,7 @@ import json
2
2
  import logging
3
3
  import math
4
4
  import os
5
+ import re
5
6
  import threading
6
7
  from importlib.metadata import PackageNotFoundError
7
8
  from importlib.metadata import version as _importlib_version
@@ -325,9 +326,28 @@ class TifffileFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
325
326
  def _handle_imagej(self):
326
327
  try:
327
328
  ijm = self._tf.pages[0].tags['IJMetadata'].value
329
+ info = None
330
+ if 'Info' in ijm:
331
+ info = {l.split('=', 1)[0].strip(): l.split('=', 1)[1].strip()
332
+ for l in ijm['Info'].replace('\r', '\n').split('\n') if '=' in l}
333
+ for k in list(info.keys()):
334
+ mat = re.match(r'^(.+) #(\d+)$', k)
335
+ if mat:
336
+ key = mat.group(1)
337
+ idx = int(mat.group(2))
338
+ if key not in info or (
339
+ isinstance(info[key], list) and len(info[key]) == idx - 1):
340
+ info.setdefault(key, [])
341
+ info[key].append(info[k])
342
+ info.pop(k)
328
343
  if (ijm['Labels'] and len(ijm['Labels']) == self._framecount and
329
344
  not getattr(self, '_channels', None)):
330
345
  self._channels = ijm['Labels']
346
+ if ((not getattr(self, '_channels', None) or
347
+ all(label.startswith('c:') for label in self._channels)) and
348
+ info and isinstance(info.get('Biomarker'), list) and
349
+ len(info['Biomarker']) == self._framecount):
350
+ self._channels = info['Biomarker']
331
351
  except Exception:
332
352
  pass
333
353
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: large-image-source-tifffile
3
- Version: 1.31.2.dev96
3
+ Version: 1.31.2.dev104
4
4
  Summary: A tifffile tilesource for large_image.
5
5
  Home-page: https://github.com/girder/large_image
6
6
  Author: Kitware, Inc.
@@ -19,12 +19,12 @@ 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.31.2.dev96
22
+ Requires-Dist: large-image>=1.31.2.dev104
23
23
  Requires-Dist: dask[array]
24
24
  Requires-Dist: tifffile[all]
25
25
  Requires-Dist: zarr
26
26
  Provides-Extra: girder
27
- Requires-Dist: girder-large-image>=1.31.2.dev96; extra == "girder"
27
+ Requires-Dist: girder-large-image>=1.31.2.dev104; extra == "girder"
28
28
  Dynamic: author
29
29
  Dynamic: author-email
30
30
  Dynamic: classifier
@@ -33,6 +33,7 @@ Dynamic: description-content-type
33
33
  Dynamic: home-page
34
34
  Dynamic: keywords
35
35
  Dynamic: license
36
+ Dynamic: license-file
36
37
  Dynamic: provides-extra
37
38
  Dynamic: requires-dist
38
39
  Dynamic: requires-python
@@ -0,0 +1,8 @@
1
+ large_image_source_tifffile/__init__.py,sha256=VonatC_zK_27_d6bkXu-W5QtYNuZV1wLw8oH_C1kieY,31310
2
+ large_image_source_tifffile/girder_source.py,sha256=8YsxpSK_UzbAcpjn6fIMlgKye2FchkB8_HTSQV0FpRA,1064
3
+ large_image_source_tifffile-1.31.2.dev104.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
4
+ large_image_source_tifffile-1.31.2.dev104.dist-info/METADATA,sha256=_KIlTmCfbjpA90ozNe5KCP8AotEReWOd8eunMFKgVtU,1430
5
+ large_image_source_tifffile-1.31.2.dev104.dist-info/WHEEL,sha256=DK49LOLCYiurdXXOXwGJm6U4DkHkg4lcxjhqwRa0CP4,91
6
+ large_image_source_tifffile-1.31.2.dev104.dist-info/entry_points.txt,sha256=aILCN5f7-Zj8-WRXcABxCQvqJv9VLTvqRhZ_7HEyokc,190
7
+ large_image_source_tifffile-1.31.2.dev104.dist-info/top_level.txt,sha256=feOAsix2Rzy6mjy2Ua-N0-L6tlKsgvLdRhO6Hd8_ZFs,28
8
+ large_image_source_tifffile-1.31.2.dev104.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (78.0.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +0,0 @@
1
- large_image_source_tifffile/__init__.py,sha256=WsyPJKR2Iij1V7maAfv4-m1xEhEUHLlRsO3qOK9IIWc,30244
2
- large_image_source_tifffile/girder_source.py,sha256=8YsxpSK_UzbAcpjn6fIMlgKye2FchkB8_HTSQV0FpRA,1064
3
- large_image_source_tifffile-1.31.2.dev96.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
4
- large_image_source_tifffile-1.31.2.dev96.dist-info/METADATA,sha256=wFRdPgu8qJEOT4W1FZIvQG5jtNua4p9kWcksx8Odieo,1405
5
- large_image_source_tifffile-1.31.2.dev96.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
6
- large_image_source_tifffile-1.31.2.dev96.dist-info/entry_points.txt,sha256=aILCN5f7-Zj8-WRXcABxCQvqJv9VLTvqRhZ_7HEyokc,190
7
- large_image_source_tifffile-1.31.2.dev96.dist-info/top_level.txt,sha256=feOAsix2Rzy6mjy2Ua-N0-L6tlKsgvLdRhO6Hd8_ZFs,28
8
- large_image_source_tifffile-1.31.2.dev96.dist-info/RECORD,,