Python .e57 files reader/writer
Project description
pye57
Python wrapper of LibE57Format to read and write .e57 point cloud files
Example usage
import numpy as np
import pye57
e57 = pye57.E57("e57_file.e57")
# read scan at index 0
data = e57.read_scan(0)
# 'data' is a dictionary with the point types as keys
assert isinstance(data["cartesianX"], np.ndarray)
assert isinstance(data["cartesianY"], np.ndarray)
assert isinstance(data["cartesianZ"], np.ndarray)
# other attributes can be read using:
data = e57.read_scan(0, intensity=True, colors=True, row_column=True)
assert isinstance(data["cartesianX"], np.ndarray)
assert isinstance(data["cartesianY"], np.ndarray)
assert isinstance(data["cartesianZ"], np.ndarray)
assert isinstance(data["intensity"], np.ndarray)
assert isinstance(data["colorRed"], np.ndarray)
assert isinstance(data["colorGreen"], np.ndarray)
assert isinstance(data["colorBlue"], np.ndarray)
assert isinstance(data["rowIndex"], np.ndarray)
assert isinstance(data["columnIndex"], np.ndarray)
# the 'read_scan' method filters points using the 'cartesianInvalidState' field
# if you want to get everything as raw, untransformed data, use:
data_raw = e57.read_scan_raw(0)
# writing is also possible, but only using raw data for now
e57_write = pye57.E57("e57_file_write.e57", mode='w')
e57_write.write_scan_raw(data_raw)
# you can specify a header to copy information from
e57_write.write_scan_raw(data_raw, scan_header=e57.get_header(0))
# the ScanHeader object wraps most of the scan information:
header = e57.get_header(0)
print(header.point_count)
print(header.rotation_matrix)
print(header.translation)
# all the header information can be printed using:
for line in header.pretty_print():
print(line)
# the scan position can be accessed with:
position_scan_0 = e57.scan_position(0)
# the binding is very close to the E57Foundation API
# you can modify the nodes easily from python
imf = e57.image_file
root = imf.root()
data3d = root["data3D"]
scan_0 = data3d[0]
translation_x = scan_0["pose"]["translation"]["x"]
Installation
If you're on Windows and using python 3.5 or 3.6:
pip install pye57
Otherwise, you will have to build it yourself (working on linux and macos versions).
Building notes
You need xerces-c to compile. Binaries can be obtained from conda using: conda install xerces-c
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
pye57-0.1.8-cp36-cp36m-win_amd64.whl
(339.9 kB
view details)
pye57-0.1.8-cp36-cp36m-win32.whl
(266.3 kB
view details)
pye57-0.1.8-cp35-cp35m-win_amd64.whl
(339.8 kB
view details)
pye57-0.1.8-cp35-cp35m-win32.whl
(266.3 kB
view details)
File details
Details for the file pye57-0.1.8-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: pye57-0.1.8-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 339.9 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0d3daa926bb4ffe5dd9c00be13b12bb47fec09e1fc21e78cde649946d324d81 |
|
MD5 | c77a818b682d62f31759925fc157e8dc |
|
BLAKE2b-256 | 9a5332a298d5296c3b38fe16005f84d942f401bd1730de50e07c52ccb8f68e30 |
File details
Details for the file pye57-0.1.8-cp36-cp36m-win32.whl
.
File metadata
- Download URL: pye57-0.1.8-cp36-cp36m-win32.whl
- Upload date:
- Size: 266.3 kB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 967c3a67aa38d5fa7f3a60335ded832c47634db411477b750fe9812b33bad97e |
|
MD5 | 720250f137acedae580878ec4451e784 |
|
BLAKE2b-256 | c5da4817f480140c2d76bea54eb1c22b363bab5e9c642d250fbe74ccdf624982 |
File details
Details for the file pye57-0.1.8-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: pye57-0.1.8-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 339.8 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a808d13e0bf261828bc4e2887ef4061fa49753fd1950f96be126f8b3f9d59988 |
|
MD5 | 327db02c4a16a00a4b26b8e520f65fcf |
|
BLAKE2b-256 | 5cad725b8d6bec404129a45e4b6d9560af21f6e06f93400491f5d41ba593b2f8 |
File details
Details for the file pye57-0.1.8-cp35-cp35m-win32.whl
.
File metadata
- Download URL: pye57-0.1.8-cp35-cp35m-win32.whl
- Upload date:
- Size: 266.3 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67cb98015cf6063809b4840beb7c491f45772976300089e20e1f43394044425c |
|
MD5 | 9cd300f42e99b54b6448bcd8b35a5168 |
|
BLAKE2b-256 | 7629c3adbf8cce0d41edb73b54da85eef5db454077e395dfd4821cb4496d6885 |