large-image-source-bioformats 1.32.3.dev3__tar.gz → 1.32.4__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.
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/PKG-INFO +3 -4
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/large_image_source_bioformats/__init__.py +50 -37
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/large_image_source_bioformats.egg-info/PKG-INFO +3 -4
- large_image_source_bioformats-1.32.4/large_image_source_bioformats.egg-info/requires.txt +5 -0
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/setup.py +0 -1
- large_image_source_bioformats-1.32.3.dev3/large_image_source_bioformats.egg-info/requires.txt +0 -5
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/LICENSE +0 -0
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/README.rst +0 -0
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/large_image_source_bioformats/girder_source.py +0 -0
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/large_image_source_bioformats.egg-info/SOURCES.txt +0 -0
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/large_image_source_bioformats.egg-info/dependency_links.txt +0 -0
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/large_image_source_bioformats.egg-info/entry_points.txt +0 -0
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/large_image_source_bioformats.egg-info/top_level.txt +0 -0
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/pyproject.toml +0 -0
- {large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: large-image-source-bioformats
|
|
3
|
-
Version: 1.32.
|
|
3
|
+
Version: 1.32.4
|
|
4
4
|
Summary: An bioformats tilesource for large_image.
|
|
5
5
|
Home-page: https://github.com/girder/large_image
|
|
6
6
|
Author: Kitware, Inc.
|
|
@@ -8,7 +8,6 @@ Author-email: kitware@kitware.com
|
|
|
8
8
|
License: Apache-2.0
|
|
9
9
|
Keywords: large_image,tile source
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
11
|
Classifier: Programming Language :: Python :: 3
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.8
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -19,10 +18,10 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
19
18
|
Requires-Python: >=3.8
|
|
20
19
|
Description-Content-Type: text/x-rst
|
|
21
20
|
License-File: LICENSE
|
|
22
|
-
Requires-Dist: large-image>=1.32.
|
|
21
|
+
Requires-Dist: large-image>=1.32.4
|
|
23
22
|
Requires-Dist: python-bioformats>=1.5.2
|
|
24
23
|
Provides-Extra: girder
|
|
25
|
-
Requires-Dist: girder-large-image>=1.32.
|
|
24
|
+
Requires-Dist: girder-large-image>=1.32.4; extra == "girder"
|
|
26
25
|
Dynamic: author
|
|
27
26
|
Dynamic: author-email
|
|
28
27
|
Dynamic: classifier
|
|
@@ -57,6 +57,7 @@ javabridge = None
|
|
|
57
57
|
|
|
58
58
|
_javabridgeStarted = None
|
|
59
59
|
_javabridgeStartLock = threading.Lock()
|
|
60
|
+
_javabridgeAttachLock = threading.Lock()
|
|
60
61
|
_bioformatsVersion = None
|
|
61
62
|
_openImages = []
|
|
62
63
|
|
|
@@ -72,7 +73,8 @@ def _monitor_thread():
|
|
|
72
73
|
main_thread.join()
|
|
73
74
|
if len(_openImages):
|
|
74
75
|
try:
|
|
75
|
-
|
|
76
|
+
with _javabridgeAttachLock:
|
|
77
|
+
javabridge.attach()
|
|
76
78
|
while len(_openImages):
|
|
77
79
|
source = _openImages.pop()
|
|
78
80
|
source = source()
|
|
@@ -87,8 +89,9 @@ def _monitor_thread():
|
|
|
87
89
|
except Exception:
|
|
88
90
|
pass
|
|
89
91
|
finally:
|
|
90
|
-
|
|
91
|
-
javabridge.
|
|
92
|
+
with _javabridgeAttachLock:
|
|
93
|
+
if javabridge.get_env():
|
|
94
|
+
javabridge.detach()
|
|
92
95
|
_stopJavabridge()
|
|
93
96
|
|
|
94
97
|
|
|
@@ -234,7 +237,8 @@ class BioformatsFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
|
|
|
234
237
|
self._tileLock = threading.RLock()
|
|
235
238
|
|
|
236
239
|
try:
|
|
237
|
-
|
|
240
|
+
with _javabridgeAttachLock:
|
|
241
|
+
javabridge.attach()
|
|
238
242
|
try:
|
|
239
243
|
self._bioimage = bioformats.ImageReader(largeImagePath, perform_init=False)
|
|
240
244
|
try:
|
|
@@ -313,8 +317,9 @@ class BioformatsFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
|
|
|
313
317
|
msg = 'The bioformats reader threw an unhandled exception.'
|
|
314
318
|
raise TileSourceError(msg)
|
|
315
319
|
finally:
|
|
316
|
-
|
|
317
|
-
javabridge.
|
|
320
|
+
with _javabridgeAttachLock:
|
|
321
|
+
if javabridge.get_env():
|
|
322
|
+
javabridge.detach()
|
|
318
323
|
|
|
319
324
|
if self.levels < 1:
|
|
320
325
|
msg = 'Bioformats image must have at least one level.'
|
|
@@ -340,15 +345,17 @@ class BioformatsFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
|
|
|
340
345
|
def __del__(self):
|
|
341
346
|
if getattr(self, '_bioimage', None) is not None:
|
|
342
347
|
try:
|
|
343
|
-
|
|
348
|
+
with _javabridgeAttachLock:
|
|
349
|
+
javabridge.attach()
|
|
344
350
|
self._bioimage.close()
|
|
345
351
|
del self._bioimage
|
|
346
352
|
_openImages.remove(weakref.ref(self))
|
|
347
353
|
except Exception:
|
|
348
354
|
pass
|
|
349
355
|
finally:
|
|
350
|
-
|
|
351
|
-
javabridge.
|
|
356
|
+
with _javabridgeAttachLock:
|
|
357
|
+
if javabridge.get_env():
|
|
358
|
+
javabridge.detach()
|
|
352
359
|
|
|
353
360
|
def _metadataForCurrentSeries(self, rdr):
|
|
354
361
|
self._metadata = getattr(self, '_metadata', {})
|
|
@@ -664,33 +671,37 @@ class BioformatsFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
|
|
|
664
671
|
tile = large_image.tilesource.base._imageToNumpy(tile)[0]
|
|
665
672
|
format = TILE_FORMAT_NUMPY
|
|
666
673
|
else:
|
|
667
|
-
with
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
674
|
+
with _javabridgeAttachLock:
|
|
675
|
+
javabridge.attach()
|
|
676
|
+
try:
|
|
677
|
+
if width > 0 and height > 0:
|
|
678
|
+
with self._tileLock:
|
|
671
679
|
tile = self._bioimage.read(
|
|
672
|
-
c=fc, z=fz, t=ft,
|
|
680
|
+
c=fc, z=fz, t=ft,
|
|
681
|
+
series=fseries['series'][seriesLevel],
|
|
673
682
|
rescale=False, # return internal data types
|
|
674
683
|
XYWH=(offsetx, offsety, width, height))
|
|
675
|
-
|
|
676
|
-
|
|
684
|
+
else:
|
|
685
|
+
# We need the same dtype, so read 1x1 at 0x0
|
|
686
|
+
with self._tileLock:
|
|
677
687
|
tile = self._bioimage.read(
|
|
678
688
|
c=fc, z=fz, t=ft, series=fseries['series'][seriesLevel],
|
|
679
689
|
rescale=False, # return internal data types
|
|
680
690
|
XYWH=(0, 0, 1, 1))
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
691
|
+
tile = np.zeros(tuple([0, 0] + list(tile.shape[2:])), dtype=tile.dtype)
|
|
692
|
+
format = TILE_FORMAT_NUMPY
|
|
693
|
+
except javabridge.JavaException as exc:
|
|
694
|
+
es = javabridge.to_string(exc.throwable)
|
|
695
|
+
self.logger.exception('Failed to getTile (%r)', es)
|
|
696
|
+
if getattr(self, '_lastGetTileException', None) == 'raise':
|
|
697
|
+
raise TileSourceError('Failed to get Bioformat region (%s, %r).' % (es, (
|
|
698
|
+
fc, fz, ft, fseries, self.sizeX, self.sizeY, offsetx,
|
|
699
|
+
offsety, width, height)))
|
|
700
|
+
self._lastGetTileException = repr(es)
|
|
701
|
+
tile = np.zeros((1, 1))
|
|
702
|
+
format = TILE_FORMAT_NUMPY
|
|
703
|
+
finally:
|
|
704
|
+
with _javabridgeAttachLock:
|
|
694
705
|
if javabridge.get_env():
|
|
695
706
|
javabridge.detach()
|
|
696
707
|
if scale > 1:
|
|
@@ -733,18 +744,20 @@ class BioformatsFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
|
|
|
733
744
|
if info is None:
|
|
734
745
|
return None
|
|
735
746
|
series = info['seriesNum']
|
|
736
|
-
with
|
|
737
|
-
|
|
738
|
-
|
|
747
|
+
with _javabridgeAttachLock:
|
|
748
|
+
javabridge.attach()
|
|
749
|
+
try:
|
|
750
|
+
with self._tileLock:
|
|
739
751
|
image = self._bioimage.read(
|
|
740
752
|
series=series,
|
|
741
753
|
rescale=False, # return internal data types
|
|
742
754
|
XYWH=(0, 0, info['sizeX'], info['sizeY']))
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
755
|
+
except javabridge.JavaException as exc:
|
|
756
|
+
es = javabridge.to_string(exc.throwable)
|
|
757
|
+
raise TileSourceError('Failed to get Bioformat series (%s, %r).' % (es, (
|
|
758
|
+
series, info['sizeX'], info['sizeY'])))
|
|
759
|
+
finally:
|
|
760
|
+
with _javabridgeAttachLock:
|
|
748
761
|
if javabridge.get_env():
|
|
749
762
|
javabridge.detach()
|
|
750
763
|
return large_image.tilesource.base._imageToPIL(image)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: large-image-source-bioformats
|
|
3
|
-
Version: 1.32.
|
|
3
|
+
Version: 1.32.4
|
|
4
4
|
Summary: An bioformats tilesource for large_image.
|
|
5
5
|
Home-page: https://github.com/girder/large_image
|
|
6
6
|
Author: Kitware, Inc.
|
|
@@ -8,7 +8,6 @@ Author-email: kitware@kitware.com
|
|
|
8
8
|
License: Apache-2.0
|
|
9
9
|
Keywords: large_image,tile source
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
11
|
Classifier: Programming Language :: Python :: 3
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.8
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -19,10 +18,10 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
19
18
|
Requires-Python: >=3.8
|
|
20
19
|
Description-Content-Type: text/x-rst
|
|
21
20
|
License-File: LICENSE
|
|
22
|
-
Requires-Dist: large-image>=1.32.
|
|
21
|
+
Requires-Dist: large-image>=1.32.4
|
|
23
22
|
Requires-Dist: python-bioformats>=1.5.2
|
|
24
23
|
Provides-Extra: girder
|
|
25
|
-
Requires-Dist: girder-large-image>=1.32.
|
|
24
|
+
Requires-Dist: girder-large-image>=1.32.4; extra == "girder"
|
|
26
25
|
Dynamic: author
|
|
27
26
|
Dynamic: author-email
|
|
28
27
|
Dynamic: classifier
|
|
@@ -24,7 +24,6 @@ setup(
|
|
|
24
24
|
author_email='kitware@kitware.com',
|
|
25
25
|
classifiers=[
|
|
26
26
|
'Development Status :: 5 - Production/Stable',
|
|
27
|
-
'License :: OSI Approved :: Apache Software License',
|
|
28
27
|
'Programming Language :: Python :: 3',
|
|
29
28
|
'Programming Language :: Python :: 3.8',
|
|
30
29
|
'Programming Language :: Python :: 3.9',
|
|
File without changes
|
{large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/README.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/pyproject.toml
RENAMED
|
File without changes
|
{large_image_source_bioformats-1.32.3.dev3 → large_image_source_bioformats-1.32.4}/setup.cfg
RENAMED
|
File without changes
|