large-image-source-bioformats 1.30.5.dev6__tar.gz → 1.30.6__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.

Potentially problematic release.


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

Files changed (15) hide show
  1. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/PKG-INFO +3 -3
  2. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/large_image_source_bioformats/__init__.py +20 -5
  3. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/large_image_source_bioformats.egg-info/PKG-INFO +3 -3
  4. large_image_source_bioformats-1.30.6/large_image_source_bioformats.egg-info/requires.txt +5 -0
  5. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/setup.py +1 -2
  6. large_image_source_bioformats-1.30.5.dev6/large_image_source_bioformats.egg-info/requires.txt +0 -5
  7. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/LICENSE +0 -0
  8. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/README.rst +0 -0
  9. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/large_image_source_bioformats/girder_source.py +0 -0
  10. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/large_image_source_bioformats.egg-info/SOURCES.txt +0 -0
  11. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/large_image_source_bioformats.egg-info/dependency_links.txt +0 -0
  12. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/large_image_source_bioformats.egg-info/entry_points.txt +0 -0
  13. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/large_image_source_bioformats.egg-info/top_level.txt +0 -0
  14. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/pyproject.toml +0 -0
  15. {large_image_source_bioformats-1.30.5.dev6 → large_image_source_bioformats-1.30.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: large-image-source-bioformats
3
- Version: 1.30.5.dev6
3
+ Version: 1.30.6
4
4
  Summary: An bioformats tilesource for large_image.
5
5
  Home-page: https://github.com/girder/large_image
6
6
  Author: Kitware, Inc.
@@ -19,10 +19,10 @@ 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.5.dev6
22
+ Requires-Dist: large-image>=1.30.6
23
23
  Requires-Dist: python-bioformats>=1.5.2
24
24
  Provides-Extra: girder
25
- Requires-Dist: girder-large-image>=1.30.5.dev6; extra == "girder"
25
+ Requires-Dist: girder-large-image>=1.30.6; extra == "girder"
26
26
 
27
27
  An bioformats tilesource for large_image.
28
28
 
@@ -62,7 +62,7 @@ _openImages = []
62
62
 
63
63
 
64
64
  # Default to ignoring files with no extension and some specific extensions.
65
- config.ConfigValues['source_bioformats_ignored_names'] = r'(^[^.]*|\.(jpg|jpeg|jpe|png|tif|tiff|ndpi|nd2|ome|nc|json|isyntax|mrxs|zip|zarr(\.db|\.zip)))$' # noqa
65
+ config.ConfigValues['source_bioformats_ignored_names'] = r'(^[^.]*|\.(jpg|jpeg|jpe|png|tif|tiff|ndpi|nd2|ome|nc|json|geojson|fits|isyntax|mrxs|zip|zarr(\.db|\.zip)))$' # noqa
66
66
 
67
67
 
68
68
  def _monitor_thread():
@@ -509,13 +509,15 @@ class BioformatsFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
509
509
 
510
510
  def _computeMagnification(self):
511
511
  self._magnification = {}
512
- metadata = self._metadata['metadata']
512
+ metadata = self._metadata.get('seriesMetadata', {}).copy()
513
+ metadata.update(self._metadata['metadata'])
513
514
  valuekeys = {
514
515
  'x': [('Scaling|Distance|Value #1', 1e3)],
515
516
  'y': [('Scaling|Distance|Value #2', 1e3)],
516
517
  }
517
518
  tuplekeys = [
518
519
  ('Physical pixel size', 1e-3),
520
+ ('0028,0030 Pixel Spacing', 1),
519
521
  ]
520
522
  magkeys = [
521
523
  'Information|Instrument|Objective|NominalMagnification #1',
@@ -528,11 +530,11 @@ class BioformatsFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
528
530
  if 'mm_x' not in self._magnification and 'mm_y' not in self._magnification:
529
531
  for key, units in tuplekeys:
530
532
  if metadata.get(key):
531
- found = re.match(r'^\D*(\d+(|\.\d+))\D+(\d+(|\.\d+))\D*$', metadata[key])
533
+ found = re.match(r'^[^0-9.]*(\d*\.?\d+)[^0-9.]+(\d*\.?\d+)\D*$', metadata[key])
532
534
  if found:
533
535
  try:
534
536
  self._magnification['mm_x'], self._magnification['mm_y'] = (
535
- float(found.groups()[0]) * units, float(found.groups()[2]) * units)
537
+ float(found.groups()[0]) * units, float(found.groups()[1]) * units)
536
538
  except Exception:
537
539
  pass
538
540
  for key in magkeys:
@@ -710,7 +712,7 @@ class BioformatsFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
710
712
  """
711
713
  info = self._metadata['seriesAssociatedImages'].get(imageKey)
712
714
  if info is None:
713
- return
715
+ return None
714
716
  series = info['seriesNum']
715
717
  with self._tileLock:
716
718
  try:
@@ -739,6 +741,19 @@ class BioformatsFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
739
741
  ext = dotext.strip('.')
740
742
  if ext not in cls.extensions:
741
743
  cls.extensions[ext] = SourcePriority.IMPLICIT
744
+ # The python modules doesn't list all the extensions that can be
745
+ # read, so supplement from the jar
746
+ readerlist = zipfile.ZipFile(
747
+ pathlib.Path(bioformats.__file__).parent /
748
+ 'jars/bioformats_package.jar',
749
+ ).open('loci/formats/readers.txt').read(100000).decode().split('\n')
750
+ pattern = re.compile(r'^loci\.formats\.in\..* # (?:.*?\b(\w{2,})\b(?:,|\s|$))')
751
+ for line in readerlist:
752
+ for ext in set(pattern.findall(line)) - {
753
+ 'pattern', 'urlreader', 'screen', 'zip', 'zarr', 'db',
754
+ 'fake', 'no'}:
755
+ if ext not in cls.extensions:
756
+ cls.extensions[ext] = SourcePriority.IMPLICIT
742
757
 
743
758
 
744
759
  def open(*args, **kwargs):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: large-image-source-bioformats
3
- Version: 1.30.5.dev6
3
+ Version: 1.30.6
4
4
  Summary: An bioformats tilesource for large_image.
5
5
  Home-page: https://github.com/girder/large_image
6
6
  Author: Kitware, Inc.
@@ -19,10 +19,10 @@ 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.5.dev6
22
+ Requires-Dist: large-image>=1.30.6
23
23
  Requires-Dist: python-bioformats>=1.5.2
24
24
  Provides-Extra: girder
25
- Requires-Dist: girder-large-image>=1.30.5.dev6; extra == "girder"
25
+ Requires-Dist: girder-large-image>=1.30.6; extra == "girder"
26
26
 
27
27
  An bioformats tilesource for large_image.
28
28
 
@@ -0,0 +1,5 @@
1
+ large-image>=1.30.6
2
+ python-bioformats>=1.5.2
3
+
4
+ [girder]
5
+ girder-large-image>=1.30.6
@@ -19,8 +19,7 @@ def prerelease_local_scheme(version):
19
19
 
20
20
  if os.getenv('CIRCLE_BRANCH') in ('master', ):
21
21
  return ''
22
- else:
23
- return get_local_node_and_date(version)
22
+ return get_local_node_and_date(version)
24
23
 
25
24
 
26
25
  try:
@@ -1,5 +0,0 @@
1
- large-image>=1.30.5.dev6
2
- python-bioformats>=1.5.2
3
-
4
- [girder]
5
- girder-large-image>=1.30.5.dev6