large-image-source-tifffile 1.30.3__py3-none-any.whl → 1.30.3.dev3__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.

Potentially problematic release.


This version of large-image-source-tifffile might be problematic. Click here for more details.

@@ -292,79 +292,6 @@ class TifffileFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
292
292
  except Exception:
293
293
  pass
294
294
 
295
- def _handle_indica(self):
296
- import xml.etree.ElementTree
297
-
298
- import large_image.tilesource.utilities
299
-
300
- try:
301
- root = xml.etree.ElementTree.fromstring(self._tf.pages[0].description)
302
- self._xml = large_image.tilesource.utilities.etreeToDict(root)
303
- self._channels = [c['name'] for c in
304
- self._xml['indica']['image']['channels']['channel']]
305
- if len(self._basis) == 1 and 'I' in self._basis:
306
- self._basis['C'] = self._basis.pop('I')
307
- self._associatedImages.clear()
308
- except Exception:
309
- pass
310
-
311
- def _handle_ome(self):
312
- """
313
- For OME Tiff, if we didn't parse the mangification elsewhere, try to
314
- parse it here.
315
- """
316
- import xml.etree.ElementTree
317
-
318
- import large_image.tilesource.utilities
319
-
320
- _omeUnitsToMeters = {
321
- 'Ym': 1e24,
322
- 'Zm': 1e21,
323
- 'Em': 1e18,
324
- 'Pm': 1e15,
325
- 'Tm': 1e12,
326
- 'Gm': 1e9,
327
- 'Mm': 1e6,
328
- 'km': 1e3,
329
- 'hm': 1e2,
330
- 'dam': 1e1,
331
- 'm': 1,
332
- 'dm': 1e-1,
333
- 'cm': 1e-2,
334
- 'mm': 1e-3,
335
- '\u00b5m': 1e-6,
336
- 'nm': 1e-9,
337
- 'pm': 1e-12,
338
- 'fm': 1e-15,
339
- 'am': 1e-18,
340
- 'zm': 1e-21,
341
- 'ym': 1e-24,
342
- '\u00c5': 1e-10,
343
- }
344
-
345
- try:
346
- root = xml.etree.ElementTree.fromstring(self._tf.pages[0].description)
347
- self._xml = large_image.tilesource.utilities.etreeToDict(root)
348
- except Exception:
349
- return
350
- try:
351
- try:
352
- base = self._xml['OME']['Image'][0]['Pixels']
353
- except Exception:
354
- base = self._xml['OME']['Image']['Pixels']
355
- if self._mm_x is None and 'PhysicalSizeX' in base:
356
- self._mm_x = (
357
- float(base['PhysicalSizeX']) * 1e3 *
358
- _omeUnitsToMeters[base.get('PhysicalSizeXUnit', '\u00b5m')])
359
- if self._mm_y is None and 'PhysicalSizeY' in base:
360
- self._mm_y = (
361
- float(base['PhysicalSizeY']) * 1e3 *
362
- _omeUnitsToMeters[base.get('PhysicalSizeYUnit', '\u00b5m')])
363
- self._mm_x = self._mm_x or self._mm_y
364
- self._mm_y = self._mm_y or self._mm_x
365
- except Exception:
366
- pass
367
-
368
295
  def _handle_scn(self): # noqa
369
296
  """
370
297
  For SCN files, parse the xml and possibly adjust how associated images
@@ -430,6 +357,63 @@ class TifffileFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
430
357
  except Exception:
431
358
  pass
432
359
 
360
+ def _handle_ome(self):
361
+ """
362
+ For OME Tiff, if we didn't parse the mangification elsewhere, try to
363
+ parse it here.
364
+ """
365
+ import xml.etree.ElementTree
366
+
367
+ import large_image.tilesource.utilities
368
+
369
+ _omeUnitsToMeters = {
370
+ 'Ym': 1e24,
371
+ 'Zm': 1e21,
372
+ 'Em': 1e18,
373
+ 'Pm': 1e15,
374
+ 'Tm': 1e12,
375
+ 'Gm': 1e9,
376
+ 'Mm': 1e6,
377
+ 'km': 1e3,
378
+ 'hm': 1e2,
379
+ 'dam': 1e1,
380
+ 'm': 1,
381
+ 'dm': 1e-1,
382
+ 'cm': 1e-2,
383
+ 'mm': 1e-3,
384
+ '\u00b5m': 1e-6,
385
+ 'nm': 1e-9,
386
+ 'pm': 1e-12,
387
+ 'fm': 1e-15,
388
+ 'am': 1e-18,
389
+ 'zm': 1e-21,
390
+ 'ym': 1e-24,
391
+ '\u00c5': 1e-10,
392
+ }
393
+
394
+ try:
395
+ root = xml.etree.ElementTree.fromstring(self._tf.pages[0].description)
396
+ self._xml = large_image.tilesource.utilities.etreeToDict(root)
397
+ except Exception:
398
+ return
399
+ try:
400
+ try:
401
+ base = self._xml['OME']['Image'][0]['Pixels']
402
+ except Exception:
403
+ base = self._xml['OME']['Image']['Pixels']
404
+ if self._mm_x is None and 'PhysicalSizeX' in base:
405
+ self._mm_x = (
406
+ float(base['PhysicalSizeX']) * 1e3 *
407
+ _omeUnitsToMeters[base.get('PhysicalSizeXUnit', '\u00b5m')])
408
+ if self._mm_y is None and 'PhysicalSizeY' in base:
409
+ self._mm_y = (
410
+ float(base['PhysicalSizeY']) * 1e3 *
411
+ _omeUnitsToMeters[base.get('PhysicalSizeYUnit', '\u00b5m')])
412
+ self._mm_x = self._mm_x or self._mm_y
413
+ self._mm_y = self._mm_y or self._mm_x
414
+ except Exception:
415
+ pass
416
+
433
417
  def getNativeMagnification(self):
434
418
  """
435
419
  Get the magnification at a particular level.
@@ -639,8 +623,6 @@ class TifffileFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
639
623
  sel.append(slice(series.shape[aidx]))
640
624
  baxis += 'S'
641
625
  else:
642
- if axis not in self._basis and axis == 'I':
643
- axis = 'C'
644
626
  sel.append((frame // self._basis[axis][0]) % self._basis[axis][2])
645
627
  tile = bza[tuple(sel)]
646
628
  # rotate
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: large-image-source-tifffile
3
- Version: 1.30.3
3
+ Version: 1.30.3.dev3
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.30.3
22
+ Requires-Dist: large-image >=1.30.3.dev3
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.30.3; extra == "girder"
27
+ Requires-Dist: girder-large-image >=1.30.3.dev3 ; extra == 'girder'
28
28
 
29
29
  A tifffile tilesource for large_image.
30
30
 
@@ -0,0 +1,8 @@
1
+ large_image_source_tifffile/__init__.py,sha256=4j4Ovb1V1xvbAKBFdm1Tbj5RvvgjRGmo_ABv4kjG2hc,27413
2
+ large_image_source_tifffile/girder_source.py,sha256=8YsxpSK_UzbAcpjn6fIMlgKye2FchkB8_HTSQV0FpRA,1064
3
+ large_image_source_tifffile-1.30.3.dev3.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
4
+ large_image_source_tifffile-1.30.3.dev3.dist-info/METADATA,sha256=nnofjz9ZvnNmT7jJOXkEBhJyDyw3WlTjW5mvCRLY-_w,1149
5
+ large_image_source_tifffile-1.30.3.dev3.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
6
+ large_image_source_tifffile-1.30.3.dev3.dist-info/entry_points.txt,sha256=aILCN5f7-Zj8-WRXcABxCQvqJv9VLTvqRhZ_7HEyokc,190
7
+ large_image_source_tifffile-1.30.3.dev3.dist-info/top_level.txt,sha256=feOAsix2Rzy6mjy2Ua-N0-L6tlKsgvLdRhO6Hd8_ZFs,28
8
+ large_image_source_tifffile-1.30.3.dev3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.2.0)
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=DKDo0CHba44iLEi9B_Rr59iodoRaPFOdyYC8yfKFMx8,28136
2
- large_image_source_tifffile/girder_source.py,sha256=8YsxpSK_UzbAcpjn6fIMlgKye2FchkB8_HTSQV0FpRA,1064
3
- large_image_source_tifffile-1.30.3.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
4
- large_image_source_tifffile-1.30.3.dist-info/METADATA,sha256=O1qT-jo5t1g0wkTZNrNMfZiC-BhI2C63OMeMxwXeQxs,1131
5
- large_image_source_tifffile-1.30.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
6
- large_image_source_tifffile-1.30.3.dist-info/entry_points.txt,sha256=aILCN5f7-Zj8-WRXcABxCQvqJv9VLTvqRhZ_7HEyokc,190
7
- large_image_source_tifffile-1.30.3.dist-info/top_level.txt,sha256=feOAsix2Rzy6mjy2Ua-N0-L6tlKsgvLdRhO6Hd8_ZFs,28
8
- large_image_source_tifffile-1.30.3.dist-info/RECORD,,