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 Distribution
pye57-0.2.2.tar.gz
(158.9 kB
view details)
Built Distributions
pye57-0.2.2-cp36-cp36m-win_amd64.whl
(330.1 kB
view details)
pye57-0.2.2-cp36-cp36m-win32.whl
(256.5 kB
view details)
pye57-0.2.2-cp35-cp35m-win_amd64.whl
(330.1 kB
view details)
pye57-0.2.2-cp35-cp35m-win32.whl
(256.5 kB
view details)
File details
Details for the file pye57-0.2.2.tar.gz
.
File metadata
- Download URL: pye57-0.2.2.tar.gz
- Upload date:
- Size: 158.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f063a86f03c81ffe281be781b10115a54ff37132c98972e3773920d37e639d90 |
|
MD5 | d03bc2521d114e2c992dd998ce735604 |
|
BLAKE2b-256 | 6ca71b8d85414cee78f51a13c6decd4f076a75b455c421deae293f828b131a53 |
File details
Details for the file pye57-0.2.2-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: pye57-0.2.2-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 330.1 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0fdaab76512a6acb0d68a714f0ae03fc47b9ebb43e6f3728088f358576db122 |
|
MD5 | 23141bd12984a90e5f73dfa17cef8ac4 |
|
BLAKE2b-256 | e4a1f59dc6f1dd46f9cf149ed39ea52842db68fafe161c26c67c961de18c34e7 |
File details
Details for the file pye57-0.2.2-cp36-cp36m-win32.whl
.
File metadata
- Download URL: pye57-0.2.2-cp36-cp36m-win32.whl
- Upload date:
- Size: 256.5 kB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e977b8135e4c2c319aeefad1277745c9b7e987c0e524a81658f7081c1375166 |
|
MD5 | 2665178225da9c95c1524fc7c5f92cc9 |
|
BLAKE2b-256 | 96a12008f925261ca3161bb9b0082a5a1c3c19cc668a37c84d6d1499aee2799e |
File details
Details for the file pye57-0.2.2-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: pye57-0.2.2-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 330.1 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3443daa0c9cb8b8d294f306cd489f50e7d8f59486928244cf5ce90fc2337ae5f |
|
MD5 | 29883dfc3156a773e86ad12a3aee35f7 |
|
BLAKE2b-256 | 76be6a4894e702e1b39b70436986a2b129269928c6c8446180c84a76a9738f53 |
File details
Details for the file pye57-0.2.2-cp35-cp35m-win32.whl
.
File metadata
- Download URL: pye57-0.2.2-cp35-cp35m-win32.whl
- Upload date:
- Size: 256.5 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d08fa951107eddafe41da1294ed2ef9f273e5d4fd5c20d4c081cdbd56b5b2d8 |
|
MD5 | 02521085b967fd7d327231fca052a731 |
|
BLAKE2b-256 | 4beaf22362b0171b86d8f43db6df3df44408302e05be14ce35fac3967b74eaef |