pma-python 2.0.0.182__tar.gz → 2.0.0.184__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.
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/PKG-INFO +32 -10
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/README.md +5 -5
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python/core.py +27 -15
- pma_python-2.0.0.184/pma_python/version.py +1 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python.egg-info/PKG-INFO +32 -10
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python.egg-info/SOURCES.txt +0 -1
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/setup.py +4 -3
- pma_python-2.0.0.182/long_desc.txt +0 -49
- pma_python-2.0.0.182/pma_python/version.py +0 -1
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python/__init__.py +0 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python/control.py +0 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python/core_admin.py +0 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python/pma.py +0 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python/pma_core_client.py +0 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python/view.py +0 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python.egg-info/dependency_links.txt +0 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python.egg-info/not-zip-safe +0 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python.egg-info/requires.txt +0 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/pma_python.egg-info/top_level.txt +0 -0
- {pma_python-2.0.0.182 → pma_python-2.0.0.184}/setup.cfg +0 -0
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pma_python
|
|
3
|
-
Version: 2.0.0.
|
|
3
|
+
Version: 2.0.0.184
|
|
4
4
|
Summary: Universal viewing of digital microscopy, whole slide imaging and digital pathology data
|
|
5
5
|
Home-page: https://github.com/pathomation/pma_python
|
|
6
6
|
Author: Pathomation
|
|
7
7
|
Author-email: info@pathomation.com
|
|
8
8
|
License: https://www.pathomation.com/contact/
|
|
9
|
-
Keywords: wsi whole slide imaging gigapixel microscopy histology pathology
|
|
9
|
+
Keywords: wsi whole slide imaging gigapixel microscopy histology pathology digital pathology pma pma.python pathomation pma.core
|
|
10
10
|
Classifier: Development Status :: 3 - Alpha
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Requires-Python: >=3
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
13
14
|
Requires-Dist: pandas
|
|
14
15
|
Requires-Dist: pillow
|
|
15
16
|
Requires-Dist: requests
|
|
@@ -18,6 +19,7 @@ Dynamic: author
|
|
|
18
19
|
Dynamic: author-email
|
|
19
20
|
Dynamic: classifier
|
|
20
21
|
Dynamic: description
|
|
22
|
+
Dynamic: description-content-type
|
|
21
23
|
Dynamic: home-page
|
|
22
24
|
Dynamic: keywords
|
|
23
25
|
Dynamic: license
|
|
@@ -25,22 +27,28 @@ Dynamic: requires-dist
|
|
|
25
27
|
Dynamic: requires-python
|
|
26
28
|
Dynamic: summary
|
|
27
29
|
|
|
28
|
-
pma_python
|
|
30
|
+
# pma_python
|
|
31
|
+
pma_python is a Python wrapper library for PMA.core ([https://www.pathomation.com](https://www.pathomation.com)),
|
|
29
32
|
a universal viewer by Pathomation for whole slide imaging and microscopy.
|
|
30
33
|
|
|
31
|
-
YOU NEED TO HAVE PMA.
|
|
34
|
+
YOU NEED TO HAVE PMA.core (or PMA.START) RUNNING IN ORDER TO USE THIS
|
|
32
35
|
LIBRARY. PMA_PYTHON IS NOT A STAND-ALONE LIBRARY FOR WSI.
|
|
33
36
|
|
|
34
37
|
If you're working with
|
|
35
38
|
|
|
36
|
-
* microscopy data and are you tired of having to use a different
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
+
* microscopy data and are you tired of having to use a different
|
|
40
|
+
library for each vendor specific digital slide format
|
|
41
|
+
* image analysis software and are you looking for a way to have
|
|
42
|
+
complete control over your algorithms (and not just be able to
|
|
43
|
+
select those provided for you)
|
|
44
|
+
* novel evaluation methods for histology / pathology and do you
|
|
45
|
+
just wish there was a way to now automatically evaluate it on
|
|
46
|
+
100s of slides (batch processing)
|
|
39
47
|
|
|
40
|
-
and you're doing all of this in Python, then PMA.start and
|
|
48
|
+
and you're doing all of this in Python, then PMA.core (or PMA.start) and
|
|
41
49
|
pma_python are for you!
|
|
42
50
|
|
|
43
|
-
PMA.start can be downloaded
|
|
51
|
+
PMA.start can be downloaded from [https://www.pathomation.com/pmastart](https://www.pathomation.com/pmastart)
|
|
44
52
|
|
|
45
53
|
With pma_python, you can inspect and navigate any type of
|
|
46
54
|
microscopic imaging file format available. Whether you have
|
|
@@ -72,5 +80,19 @@ The following vendor formats are currently supported:
|
|
|
72
80
|
* Perkin Elmer (.qptiff)
|
|
73
81
|
|
|
74
82
|
The most up to date list with supported file formats can be found at
|
|
75
|
-
http://
|
|
83
|
+
[http://www.pathomation.com/formats](https://www.pathomation.com/formats)
|
|
76
84
|
|
|
85
|
+
## Installation from source
|
|
86
|
+
To install from pypi
|
|
87
|
+
```sh
|
|
88
|
+
pip install pma_python
|
|
89
|
+
```
|
|
90
|
+
To upgrade an already existing version from pypi
|
|
91
|
+
```sh
|
|
92
|
+
pip install --upgrade pma_python
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## How to use
|
|
96
|
+
```python
|
|
97
|
+
>>> from pma_python import *
|
|
98
|
+
```
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# pma_python
|
|
2
|
-
pma_python is a Python wrapper library for PMA.
|
|
2
|
+
pma_python is a Python wrapper library for PMA.core ([https://www.pathomation.com](https://www.pathomation.com)),
|
|
3
3
|
a universal viewer by Pathomation for whole slide imaging and microscopy.
|
|
4
4
|
|
|
5
|
-
YOU NEED TO HAVE PMA.
|
|
5
|
+
YOU NEED TO HAVE PMA.core (or PMA.START) RUNNING IN ORDER TO USE THIS
|
|
6
6
|
LIBRARY. PMA_PYTHON IS NOT A STAND-ALONE LIBRARY FOR WSI.
|
|
7
7
|
|
|
8
8
|
If you're working with
|
|
@@ -16,10 +16,10 @@ select those provided for you)
|
|
|
16
16
|
just wish there was a way to now automatically evaluate it on
|
|
17
17
|
100s of slides (batch processing)
|
|
18
18
|
|
|
19
|
-
and you're doing all of this in Python, then PMA.start and
|
|
19
|
+
and you're doing all of this in Python, then PMA.core (or PMA.start) and
|
|
20
20
|
pma_python are for you!
|
|
21
21
|
|
|
22
|
-
PMA.start can be downloaded
|
|
22
|
+
PMA.start can be downloaded from [https://www.pathomation.com/pmastart](https://www.pathomation.com/pmastart)
|
|
23
23
|
|
|
24
24
|
With pma_python, you can inspect and navigate any type of
|
|
25
25
|
microscopic imaging file format available. Whether you have
|
|
@@ -51,7 +51,7 @@ The following vendor formats are currently supported:
|
|
|
51
51
|
* Perkin Elmer (.qptiff)
|
|
52
52
|
|
|
53
53
|
The most up to date list with supported file formats can be found at
|
|
54
|
-
http://
|
|
54
|
+
[http://www.pathomation.com/formats](https://www.pathomation.com/formats)
|
|
55
55
|
|
|
56
56
|
## Installation from source
|
|
57
57
|
To install from pypi
|
|
@@ -1901,7 +1901,30 @@ def get_annotation_distance(slideRef, layerID, annotationID, sessionID=None, ver
|
|
|
1901
1901
|
# **************************************#
|
|
1902
1902
|
# === Uploader === #
|
|
1903
1903
|
# **************************************#
|
|
1904
|
+
FOUR_GB = 4 * 1024 * 1024 * 1024
|
|
1904
1905
|
FIVE_GB = 5 * 1024 * 1024 * 1024
|
|
1906
|
+
|
|
1907
|
+
def _get_slide_package_size(slide_path: str) -> tuple[int, int]:
|
|
1908
|
+
"""Return total bytes and maximum single-file bytes for a slide package."""
|
|
1909
|
+
total_size = 0
|
|
1910
|
+
max_size = 0
|
|
1911
|
+
|
|
1912
|
+
files = [slide_path]
|
|
1913
|
+
slide_name_no_ext = os.path.splitext(os.path.basename(slide_path))[0]
|
|
1914
|
+
slide_dir = os.path.join(os.path.dirname(slide_path), slide_name_no_ext)
|
|
1915
|
+
|
|
1916
|
+
if os.path.isdir(slide_dir):
|
|
1917
|
+
for root, _, filenames in os.walk(slide_dir):
|
|
1918
|
+
for filename in filenames:
|
|
1919
|
+
files.append(os.path.join(root, filename))
|
|
1920
|
+
|
|
1921
|
+
for filepath in files:
|
|
1922
|
+
size = os.stat(filepath).st_size
|
|
1923
|
+
total_size += size
|
|
1924
|
+
max_size = max(max_size, size)
|
|
1925
|
+
|
|
1926
|
+
return total_size, max_size
|
|
1927
|
+
|
|
1905
1928
|
async def upload(
|
|
1906
1929
|
*,
|
|
1907
1930
|
pma_core_url: str,
|
|
@@ -1925,21 +1948,10 @@ async def upload(
|
|
|
1925
1948
|
# ================================
|
|
1926
1949
|
# CALCULATE TOTAL SLIDE SIZE
|
|
1927
1950
|
# ================================
|
|
1928
|
-
total_size =
|
|
1929
|
-
|
|
1930
|
-
# main file size
|
|
1931
|
-
total_size += os.stat(slide_path).st_size
|
|
1932
|
-
|
|
1933
|
-
# possible slide folder (multi-files slides)
|
|
1934
|
-
slide_name_no_ext = os.path.splitext(os.path.basename(slide_path))[0]
|
|
1935
|
-
slide_dir = os.path.join(os.path.dirname(slide_path), slide_name_no_ext)
|
|
1936
|
-
|
|
1937
|
-
if os.path.isdir(slide_dir):
|
|
1938
|
-
for root, _, files in os.walk(slide_dir):
|
|
1939
|
-
for f in files:
|
|
1940
|
-
total_size += os.stat(os.path.join(root, f)).st_size
|
|
1951
|
+
total_size, max_file_size = _get_slide_package_size(slide_path)
|
|
1941
1952
|
|
|
1942
1953
|
print("Total slide size:", round(total_size / (1024 ** 3), 2), "GB")
|
|
1954
|
+
print("Largest single file:", round(max_file_size / (1024 ** 3), 2), "GB")
|
|
1943
1955
|
|
|
1944
1956
|
# ================================
|
|
1945
1957
|
# CHECK UPLOAD TYPE (PRE-FLIGHT)
|
|
@@ -1981,8 +1993,8 @@ async def upload(
|
|
|
1981
1993
|
progress_callback=progress_callback
|
|
1982
1994
|
)
|
|
1983
1995
|
|
|
1984
|
-
# Otherwise
|
|
1985
|
-
if total_size < FIVE_GB:
|
|
1996
|
+
# Otherwise choose based on total package size or safe single-request cap
|
|
1997
|
+
if total_size < FOUR_GB and max_file_size < FIVE_GB:
|
|
1986
1998
|
print("Using SMALL file uploader")
|
|
1987
1999
|
|
|
1988
2000
|
return upload_legacy(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.0.0.184'
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pma_python
|
|
3
|
-
Version: 2.0.0.
|
|
3
|
+
Version: 2.0.0.184
|
|
4
4
|
Summary: Universal viewing of digital microscopy, whole slide imaging and digital pathology data
|
|
5
5
|
Home-page: https://github.com/pathomation/pma_python
|
|
6
6
|
Author: Pathomation
|
|
7
7
|
Author-email: info@pathomation.com
|
|
8
8
|
License: https://www.pathomation.com/contact/
|
|
9
|
-
Keywords: wsi whole slide imaging gigapixel microscopy histology pathology
|
|
9
|
+
Keywords: wsi whole slide imaging gigapixel microscopy histology pathology digital pathology pma pma.python pathomation pma.core
|
|
10
10
|
Classifier: Development Status :: 3 - Alpha
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Requires-Python: >=3
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
13
14
|
Requires-Dist: pandas
|
|
14
15
|
Requires-Dist: pillow
|
|
15
16
|
Requires-Dist: requests
|
|
@@ -18,6 +19,7 @@ Dynamic: author
|
|
|
18
19
|
Dynamic: author-email
|
|
19
20
|
Dynamic: classifier
|
|
20
21
|
Dynamic: description
|
|
22
|
+
Dynamic: description-content-type
|
|
21
23
|
Dynamic: home-page
|
|
22
24
|
Dynamic: keywords
|
|
23
25
|
Dynamic: license
|
|
@@ -25,22 +27,28 @@ Dynamic: requires-dist
|
|
|
25
27
|
Dynamic: requires-python
|
|
26
28
|
Dynamic: summary
|
|
27
29
|
|
|
28
|
-
pma_python
|
|
30
|
+
# pma_python
|
|
31
|
+
pma_python is a Python wrapper library for PMA.core ([https://www.pathomation.com](https://www.pathomation.com)),
|
|
29
32
|
a universal viewer by Pathomation for whole slide imaging and microscopy.
|
|
30
33
|
|
|
31
|
-
YOU NEED TO HAVE PMA.
|
|
34
|
+
YOU NEED TO HAVE PMA.core (or PMA.START) RUNNING IN ORDER TO USE THIS
|
|
32
35
|
LIBRARY. PMA_PYTHON IS NOT A STAND-ALONE LIBRARY FOR WSI.
|
|
33
36
|
|
|
34
37
|
If you're working with
|
|
35
38
|
|
|
36
|
-
* microscopy data and are you tired of having to use a different
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
+
* microscopy data and are you tired of having to use a different
|
|
40
|
+
library for each vendor specific digital slide format
|
|
41
|
+
* image analysis software and are you looking for a way to have
|
|
42
|
+
complete control over your algorithms (and not just be able to
|
|
43
|
+
select those provided for you)
|
|
44
|
+
* novel evaluation methods for histology / pathology and do you
|
|
45
|
+
just wish there was a way to now automatically evaluate it on
|
|
46
|
+
100s of slides (batch processing)
|
|
39
47
|
|
|
40
|
-
and you're doing all of this in Python, then PMA.start and
|
|
48
|
+
and you're doing all of this in Python, then PMA.core (or PMA.start) and
|
|
41
49
|
pma_python are for you!
|
|
42
50
|
|
|
43
|
-
PMA.start can be downloaded
|
|
51
|
+
PMA.start can be downloaded from [https://www.pathomation.com/pmastart](https://www.pathomation.com/pmastart)
|
|
44
52
|
|
|
45
53
|
With pma_python, you can inspect and navigate any type of
|
|
46
54
|
microscopic imaging file format available. Whether you have
|
|
@@ -72,5 +80,19 @@ The following vendor formats are currently supported:
|
|
|
72
80
|
* Perkin Elmer (.qptiff)
|
|
73
81
|
|
|
74
82
|
The most up to date list with supported file formats can be found at
|
|
75
|
-
http://
|
|
83
|
+
[http://www.pathomation.com/formats](https://www.pathomation.com/formats)
|
|
76
84
|
|
|
85
|
+
## Installation from source
|
|
86
|
+
To install from pypi
|
|
87
|
+
```sh
|
|
88
|
+
pip install pma_python
|
|
89
|
+
```
|
|
90
|
+
To upgrade an already existing version from pypi
|
|
91
|
+
```sh
|
|
92
|
+
pip install --upgrade pma_python
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## How to use
|
|
96
|
+
```python
|
|
97
|
+
>>> from pma_python import *
|
|
98
|
+
```
|
|
@@ -24,17 +24,18 @@ def extract_version(v):
|
|
|
24
24
|
setup(name='pma_python',
|
|
25
25
|
version=extract_version(read("pma_python/version.py")),
|
|
26
26
|
description='Universal viewing of digital microscopy, whole slide imaging and digital pathology data',
|
|
27
|
-
long_description=read('
|
|
27
|
+
long_description=read('README.md'),
|
|
28
|
+
long_description_content_type='text/markdown',
|
|
28
29
|
url='https://github.com/pathomation/pma_python',
|
|
29
30
|
author='Pathomation',
|
|
30
31
|
author_email='info@pathomation.com',
|
|
31
32
|
license='https://www.pathomation.com/contact/',
|
|
32
33
|
packages=['pma_python'],
|
|
33
|
-
data_files=[('', ['
|
|
34
|
+
data_files=[('', ['README.md'])],
|
|
34
35
|
classifiers=[
|
|
35
36
|
'Development Status :: 3 - Alpha',
|
|
36
37
|
'Programming Language :: Python :: 3'],
|
|
37
|
-
keywords='wsi whole slide imaging gigapixel microscopy histology pathology',
|
|
38
|
+
keywords='wsi whole slide imaging gigapixel microscopy histology pathology digital pathology pma pma.python pathomation pma.core',
|
|
38
39
|
install_requires=['pandas', 'pillow', 'requests', 'requests_toolbelt'],
|
|
39
40
|
python_requires='>=3', # assume this only works in Python 3
|
|
40
41
|
zip_safe=False)
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
pma_python is a Python wrapper library for PMA.start (http://free.pathomation.com),
|
|
2
|
-
a universal viewer by Pathomation for whole slide imaging and microscopy.
|
|
3
|
-
|
|
4
|
-
YOU NEED TO HAVE PMA.START (OR PMA.CORE) RUNNING IN ORDER TO USE THIS
|
|
5
|
-
LIBRARY. PMA_PYTHON IS NOT A STAND-ALONE LIBRARY FOR WSI.
|
|
6
|
-
|
|
7
|
-
If you're working with
|
|
8
|
-
|
|
9
|
-
* microscopy data and are you tired of having to use a different library for each vendor specific digital slide format
|
|
10
|
-
* image analysis software and are you looking for a way to have complete control over your algorithms (and not just be able to select those provided for you)
|
|
11
|
-
* novel evaluation methods for histology / pathology and do you just wish there was a way to now automatically evaluate it on 100s of slides (batch processing)
|
|
12
|
-
|
|
13
|
-
and you're doing all of this in Python, then PMA.start and
|
|
14
|
-
pma_python are for you!
|
|
15
|
-
|
|
16
|
-
PMA.start can be downloaded free of charge from http://free.pathomation.com
|
|
17
|
-
|
|
18
|
-
With pma_python, you can inspect and navigate any type of
|
|
19
|
-
microscopic imaging file format available. Whether you have
|
|
20
|
-
macroscopic observations, whole slide imaging data, or fluorescent
|
|
21
|
-
snapshot observations, we can bring it all into Python now.
|
|
22
|
-
|
|
23
|
-
The following vendor formats are currently supported:
|
|
24
|
-
|
|
25
|
-
* TIFF (.tif, .tiff) with JPEG, JPEG2000, LZW, Deflate, Raw, RLE
|
|
26
|
-
* JPEG (.jpeg, .jpg)
|
|
27
|
-
* JPEG 2000 (.jp2)
|
|
28
|
-
* PNG (.png)
|
|
29
|
-
* Olympus VSI (.vsi) with lossless JPEG, JPEG, Raw
|
|
30
|
-
* Ventana / Roche BIF (.bif)
|
|
31
|
-
* Hamamatsu (.vms, .ndpi, .dcm) with JPEG, JPEG2000
|
|
32
|
-
* Huron Technologies (.tif)
|
|
33
|
-
* 3DHistech (.mrxs) with JPEG, PNG, BMP
|
|
34
|
-
* Aperio / Leica (.svs, .cws, .scn, .lif, DICOMDIR) with JPEG, JPEG2000
|
|
35
|
-
* Carl Zeiss (.zvi, .czi, .lsm) with Raw, PNG, JPEG, LZW, Deflate, JPEG2000
|
|
36
|
-
* Open Microscopy Environment OME-TIFF (.tf2, .tf8, .btf, .ome.tif)
|
|
37
|
-
* Nikon (.nd2, .tiff) with Deflate, JPEG, JPEG2000, LZW, Deflate, Raw, RLE
|
|
38
|
-
* Philips (.tif) with JPEG, JPEG2000, LZW, Deflate, Raw, RLE
|
|
39
|
-
* Sakura (.svslide) with JPEG(sqlite2, sqlite3, mssql)
|
|
40
|
-
* Menarini (.ini) with Raw
|
|
41
|
-
* Motic (.mds)
|
|
42
|
-
* Zoomify (.zif) with JPEG, JPEG2000, LZW, Deflate, Raw, RLE
|
|
43
|
-
* SmartZoom (.szi) with JPEG, BMP
|
|
44
|
-
* Objective Imaging / Glissano (.sws)
|
|
45
|
-
* Perkin Elmer (.qptiff)
|
|
46
|
-
|
|
47
|
-
The most up to date list with supported file formats can be found at
|
|
48
|
-
http://free.pathomation.com/formats
|
|
49
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.0.0.182'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|