ialdev-io 0.1.0__tar.gz → 0.2.0__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.
- ialdev_io-0.2.0/PKG-INFO +64 -0
- ialdev_io-0.2.0/README.md +43 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/pyproject.toml +9 -1
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/basic_formats.py +1 -1
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/bit_streams.py +2 -2
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/inu/utils/imread.py +4 -4
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/special.py +1 -1
- ialdev_io-0.1.0/PKG-INFO +0 -24
- ialdev_io-0.1.0/README.md +0 -7
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/__init__.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/ciif.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/format.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/imread.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/imwrite.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/inu/__init__.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/inu/env._py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/inu/utils/__init__.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/pfm.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/ply.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/tb.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/tiff_tags.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/video.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/src/iad/io/zfp.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/tests/test_formats.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/tests/test_imread.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/tests/test_pfm.py +0 -0
- {ialdev_io-0.1.0 → ialdev_io-0.2.0}/tests/test_zfp.py +0 -0
ialdev_io-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ialdev-io
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: iad.io — image and structured file I/O (imread, formats, CIIF, inu helpers, etc.)
|
|
5
|
+
Author: ipcoder
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: ialdev-core
|
|
9
|
+
Requires-Dist: numpy>=1.20.0
|
|
10
|
+
Requires-Dist: pillow>=8.0.0
|
|
11
|
+
Requires-Dist: scikit-image>=0.19.0
|
|
12
|
+
Requires-Dist: tifffile
|
|
13
|
+
Requires-Dist: zfpy
|
|
14
|
+
Requires-Dist: pyyaml>=5.4.0
|
|
15
|
+
Requires-Dist: pytest>=7.0.0 ; extra == "dev"
|
|
16
|
+
Project-URL: Homepage, https://github.com/ipcoder/ialdev/tree/master/fio
|
|
17
|
+
Project-URL: Issues, https://github.com/ipcoder/ialdev/issues
|
|
18
|
+
Project-URL: Repository, https://github.com/ipcoder/ialdev
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
|
|
21
|
+
# ialdev-io
|
|
22
|
+
|
|
23
|
+
Image and structured file I/O utilities for the `iad` toolbox, published as `ialdev-io` and imported as `iad.io`.
|
|
24
|
+
|
|
25
|
+
The source directory is named `fio/` instead of `io/` so local development does not shadow Python's standard library `io` module.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install ialdev-io
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Requires Python `>=3.10`.
|
|
34
|
+
|
|
35
|
+
## Highlights
|
|
36
|
+
|
|
37
|
+
- General image loading/saving with `imread` and `imsave`.
|
|
38
|
+
- File format registry and metadata helpers in `iad.io.format`.
|
|
39
|
+
- PFM, PLY, TIFF tag, ZFP, bit-stream, and pickle helpers.
|
|
40
|
+
- CIIF conversion/loading utilities.
|
|
41
|
+
- Inuitive/NU4 helpers under `iad.io.inu`.
|
|
42
|
+
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
from iad.io import imread, imsave
|
|
47
|
+
|
|
48
|
+
image = imread("input.tif")
|
|
49
|
+
imsave("copy.tif", image)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from iad.io.pfm import load_pfm, save_pfm
|
|
54
|
+
|
|
55
|
+
depth = load_pfm("depth.pfm")
|
|
56
|
+
save_pfm("depth_copy.pfm", depth)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from iad.io.format import FileFormat
|
|
61
|
+
|
|
62
|
+
handler = FileFormat.find_handler("image.tif")
|
|
63
|
+
```
|
|
64
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# ialdev-io
|
|
2
|
+
|
|
3
|
+
Image and structured file I/O utilities for the `iad` toolbox, published as `ialdev-io` and imported as `iad.io`.
|
|
4
|
+
|
|
5
|
+
The source directory is named `fio/` instead of `io/` so local development does not shadow Python's standard library `io` module.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install ialdev-io
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires Python `>=3.10`.
|
|
14
|
+
|
|
15
|
+
## Highlights
|
|
16
|
+
|
|
17
|
+
- General image loading/saving with `imread` and `imsave`.
|
|
18
|
+
- File format registry and metadata helpers in `iad.io.format`.
|
|
19
|
+
- PFM, PLY, TIFF tag, ZFP, bit-stream, and pickle helpers.
|
|
20
|
+
- CIIF conversion/loading utilities.
|
|
21
|
+
- Inuitive/NU4 helpers under `iad.io.inu`.
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from iad.io import imread, imsave
|
|
27
|
+
|
|
28
|
+
image = imread("input.tif")
|
|
29
|
+
imsave("copy.tif", image)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from iad.io.pfm import load_pfm, save_pfm
|
|
34
|
+
|
|
35
|
+
depth = load_pfm("depth.pfm")
|
|
36
|
+
save_pfm("depth_copy.pfm", depth)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from iad.io.format import FileFormat
|
|
41
|
+
|
|
42
|
+
handler = FileFormat.find_handler("image.tif")
|
|
43
|
+
```
|
|
@@ -4,11 +4,14 @@ build-backend = "flit_core.buildapi"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ialdev-io"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.2.0"
|
|
8
8
|
description = "iad.io — image and structured file I/O (imread, formats, CIIF, inu helpers, etc.)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
license = {text = "MIT"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "ipcoder"}
|
|
14
|
+
]
|
|
12
15
|
dependencies = [
|
|
13
16
|
"ialdev-core",
|
|
14
17
|
"numpy>=1.20.0",
|
|
@@ -22,6 +25,11 @@ dependencies = [
|
|
|
22
25
|
[project.optional-dependencies]
|
|
23
26
|
dev = ["pytest>=7.0.0"]
|
|
24
27
|
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://github.com/ipcoder/ialdev/tree/master/fio"
|
|
30
|
+
Repository = "https://github.com/ipcoder/ialdev"
|
|
31
|
+
Issues = "https://github.com/ipcoder/ialdev/issues"
|
|
32
|
+
|
|
25
33
|
[tool.flit.module]
|
|
26
34
|
name = "iad.io"
|
|
27
35
|
|
|
@@ -19,7 +19,7 @@ _cfg_sfx = [['.yaml', '.yml'], ['.json', '.jso', '.js', '.jsn'], ['.toml', '.tml
|
|
|
19
19
|
|
|
20
20
|
class ConfigFormat(FileFormat, desc="Nested Textual Configuration",
|
|
21
21
|
content=CT.META | CT.CONFIG, patterns=[*chain(*_cfg_sfx)]):
|
|
22
|
-
from iad.core.
|
|
22
|
+
from iad.core.tbox import TBox
|
|
23
23
|
_aliases = {sfx: grp[0].strip('.') for grp in _cfg_sfx for sfx in grp}
|
|
24
24
|
|
|
25
25
|
@classmethod
|
|
@@ -11,7 +11,7 @@ def save_bit_streams(full_file_name, streams, order=None):
|
|
|
11
11
|
:return: ---
|
|
12
12
|
"""
|
|
13
13
|
import tifffile, json
|
|
14
|
-
from iad.core.binary import join_bits
|
|
14
|
+
from iad.core.data.binary import join_bits
|
|
15
15
|
streams = streams.copy()
|
|
16
16
|
|
|
17
17
|
def extract_bits_data(names):
|
|
@@ -48,7 +48,7 @@ def load_bit_streams(full_file_name):
|
|
|
48
48
|
the file is assumed to contain YML metadata recorded by save_bit_streams()
|
|
49
49
|
:return: split data streams
|
|
50
50
|
"""
|
|
51
|
-
from iad.core.binary import split_bits
|
|
51
|
+
from iad.core.data.binary import split_bits
|
|
52
52
|
from imread import imread
|
|
53
53
|
tiff_im, streams = imread(full_file_name, get_meta=True)
|
|
54
54
|
|
|
@@ -70,7 +70,7 @@ def tiff_inu_cam(file_name: str):
|
|
|
70
70
|
"""
|
|
71
71
|
from PIL import Image, TiffImagePlugin
|
|
72
72
|
import numbers
|
|
73
|
-
from iad.core.
|
|
73
|
+
from iad.core.tbox import TBox
|
|
74
74
|
from iad.img.camera import StereoCam
|
|
75
75
|
|
|
76
76
|
stack_x_tag = 5005 # 1 or 2: number of images per line
|
|
@@ -122,7 +122,7 @@ def imread_stereo(file, cam_info=None, source=False) -> namedtuple:
|
|
|
122
122
|
"""
|
|
123
123
|
from re import sub
|
|
124
124
|
import os
|
|
125
|
-
from iad.core.
|
|
125
|
+
from iad.core.tbox import TBox
|
|
126
126
|
|
|
127
127
|
filename = os.path.split(file)[-1]
|
|
128
128
|
if filename.startswith('Video_') or filename.startswith('StereoImage_'):
|
|
@@ -182,7 +182,7 @@ def imread_fly3d(fid, scid=0, group='A', *, disp=False, test=True,
|
|
|
182
182
|
0.0 0.0 1.0
|
|
183
183
|
where (fx,fy) are focal lengths and (cx,cy) denotes the principal point."
|
|
184
184
|
"""
|
|
185
|
-
from iad.core.
|
|
185
|
+
from iad.core.tbox import TBox
|
|
186
186
|
from iad.img.camera import StereoCam
|
|
187
187
|
import os
|
|
188
188
|
|
|
@@ -244,7 +244,7 @@ def save_depth_nu4(file, depth, *, units='mm/100', inv=0):
|
|
|
244
244
|
if hasattr(depth, 'magnitude'):
|
|
245
245
|
Q = type(depth)
|
|
246
246
|
else:
|
|
247
|
-
from iad.core.units import Quantity
|
|
247
|
+
from iad.core.data.units import Quantity
|
|
248
248
|
Q = Quantity
|
|
249
249
|
depth = Q(depth, 'mm')
|
|
250
250
|
|
|
@@ -32,7 +32,7 @@ def middlebury_calib(source: Union[str, 'Path']):
|
|
|
32
32
|
:return: StereoCam TBox object with calibration parameters
|
|
33
33
|
"""
|
|
34
34
|
from iad.img.camera import StereoCam
|
|
35
|
-
from iad.core.
|
|
35
|
+
from iad.core.tbox import TBox
|
|
36
36
|
|
|
37
37
|
source = Path(source) if isinstance(source, str) else source
|
|
38
38
|
c = TBox.from_yaml(source.read_text('utf-8').replace('=', ': '))
|
ialdev_io-0.1.0/PKG-INFO
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: ialdev-io
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: iad.io — image and structured file I/O (imread, formats, CIIF, inu helpers, etc.)
|
|
5
|
-
Requires-Python: >=3.10
|
|
6
|
-
Description-Content-Type: text/markdown
|
|
7
|
-
Requires-Dist: ialdev-core
|
|
8
|
-
Requires-Dist: numpy>=1.20.0
|
|
9
|
-
Requires-Dist: pillow>=8.0.0
|
|
10
|
-
Requires-Dist: scikit-image>=0.19.0
|
|
11
|
-
Requires-Dist: tifffile
|
|
12
|
-
Requires-Dist: zfpy
|
|
13
|
-
Requires-Dist: pyyaml>=5.4.0
|
|
14
|
-
Requires-Dist: pytest>=7.0.0 ; extra == "dev"
|
|
15
|
-
Provides-Extra: dev
|
|
16
|
-
|
|
17
|
-
# ialdev-io (`fio/`)
|
|
18
|
-
|
|
19
|
-
**PyPI:** `ialdev-io` **Imports:** `iad.io` (and `iad.io.inu` for Inuitive/NU4 helpers)
|
|
20
|
-
|
|
21
|
-
The repository directory is named `fio` (not `io`) to avoid clashing with the Python standard library `io` when running tests with `importlib` import mode.
|
|
22
|
-
|
|
23
|
-
Former `algutils.io`: generic image/file I/O.
|
|
24
|
-
|
ialdev_io-0.1.0/README.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# ialdev-io (`fio/`)
|
|
2
|
-
|
|
3
|
-
**PyPI:** `ialdev-io` **Imports:** `iad.io` (and `iad.io.inu` for Inuitive/NU4 helpers)
|
|
4
|
-
|
|
5
|
-
The repository directory is named `fio` (not `io`) to avoid clashing with the Python standard library `io` when running tests with `importlib` import mode.
|
|
6
|
-
|
|
7
|
-
Former `algutils.io`: generic image/file I/O.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|