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
On linux, Windows or Apple Silicon:
python -m pip install pye57
On macOS with Intel CPU you can try to build from source (advanced users):
Building from source (for developers)
Cloning the repository with required submodule
Clone a new repository along with the libe57Format submodule
git clone https://github.com/davidcaron/pye57.git --recursive
If the repository has already been previously cloned, but without the --recursive flag
cd pye57 # go to the cloned repository
git submodule init # this will initialise the submodules in the repository
git submodule update # this will update the submodules in the repository
Dependencies on Linux
Install libxerces-c-dev first.
sudo apt install libxerces-c-dev
Dependencies on Windows
To get xerces-c, you can either build from source or if you're using conda:
conda install -y xerces-c
Dependencies on MacOS
To get xerces-c, run:
bash ./scripts/install_xerces_c.sh
Run pip install
from the repo source
cd pye57
python -m pip install .
Uninstalling
Use pip again
python -m pip uninstall pye57
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
Built Distributions
Hashes for pye57-0.4.13-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9aebe17f32587412b2c168489e2040c4969c23432634c20ab4171deedb192a8 |
|
MD5 | 0f5d69be9463f935832ab8aa9352bcbd |
|
BLAKE2b-256 | 7afcf4498fe4b9f72c44e7638affd6fffde6519da4701274001d4e896b8d4657 |
Hashes for pye57-0.4.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36257afebde14ceb343c6486dfcf22555a275fe3b328e0c99d89d43e1eb2b3de |
|
MD5 | 8f97a83e67b63339b6d6a8c1760676ea |
|
BLAKE2b-256 | ade9277e1043bce0b237032663e5cae5365c09684e5860308950481601083886 |
Hashes for pye57-0.4.13-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90742426c46c47c955ab4ebc286b8b9d9040275c91d720f8e065ed9c8517c1b8 |
|
MD5 | 425ca7e2b139df30cb1420a2d097a90b |
|
BLAKE2b-256 | 51ce8d4ff348bd293529d0da1d31f13c989aadb5cd9f223ada448b0fb7bf9d07 |
Hashes for pye57-0.4.13-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36df8ada9b0f3df45cad61149ec0f0c813600771f6d03703477f7de73727644f |
|
MD5 | 40029e10f5be91d0199b9ad39779a60f |
|
BLAKE2b-256 | 7bdd12963bfaadb711e6f6f2dec8527f6dc127c29999951ec01fa8006de768dc |
Hashes for pye57-0.4.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae1df777ecf78e94044874b43527903c5ddd9e71147c56e75fbbe09cdd5b687e |
|
MD5 | 7ff2867506f13a129ba2d881f0e7ab18 |
|
BLAKE2b-256 | 747d2f8d11b9c5346c6fce3c59b66560c0e5ac9f207e1d4b3a9fcc8d54f9da2a |
Hashes for pye57-0.4.13-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91cc791f9c965391d7c9d0dc97855204b9645c0414791666bfff147de0ea8145 |
|
MD5 | ff9884e6ea5e75805327b494ab80edf0 |
|
BLAKE2b-256 | 9c9abeee0a7f5dfec8792f6d69720f248acfcd57a93953c0ec9e105b8578c9ae |
Hashes for pye57-0.4.13-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 600c68ab0423caa46aadfc9021775c1ad06e0c9d38e135c4d61663d5d4b1a262 |
|
MD5 | 6f064a917fba40acad80b48a7bdc3e68 |
|
BLAKE2b-256 | cd9bfeb4c8c334c678f4dfa1e693cb1d4001753d573ad27cc704a29a1ab3cdca |
Hashes for pye57-0.4.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f5cdf2aecc6d83a816e1d37db0b4f47aac0ff46f29132fe9fa72a0f4b04c235 |
|
MD5 | 9f693890330ec03ed16e458193b179ea |
|
BLAKE2b-256 | 20e2078f707c9ded13a09757d592a7854b03a10bd3e745f8e6cbd87038959c68 |
Hashes for pye57-0.4.13-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f21a2f0826e32322307a08829c497f137753bf45dd5958c624eab19090ea8eda |
|
MD5 | 3879fafb7c81d8c0ac2a6687c1874f89 |
|
BLAKE2b-256 | 4eda58368f2d60229a389d06fe57ada6da069762aabfe682dbd7310369310502 |
Hashes for pye57-0.4.13-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b0293e69186722cfab53fb7d5ecb5c43bb90aff5ec2e27222af85c8d48d0f8 |
|
MD5 | 93585e90ef51644b97956b893ba2b132 |
|
BLAKE2b-256 | 7c6de1eb81454b46540f22e8c3cc8b468b0d9fba08f5fdb700353fd8e0b4e132 |
Hashes for pye57-0.4.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7f88a9c4fa0c5eba06440eb1bc893c18c5ab7f7197921039cfe380464312ae1 |
|
MD5 | 3124079536dd011c00280704b943bab2 |
|
BLAKE2b-256 | 005e5b54fdf6eba95048209cc699207ba923e54941d432fe9b473b67872cc029 |
Hashes for pye57-0.4.13-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1ca37038cd25c74f6314f0ab0bc59b337b0d33a499468aafcd44adb05bc3eb5 |
|
MD5 | eb805bd02fa4223788d23eb16ee2cf70 |
|
BLAKE2b-256 | 1f369aa179665cf6502350c176314d5d6a39aeb3d0788c795d3dc9b6be1a856a |
Hashes for pye57-0.4.13-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f93eba8afb0f5a68ffc013da898885a766b71685c9df31ab752ea04a78ea4529 |
|
MD5 | 273cb76f0920ad8443b7d75b6bb1b6e1 |
|
BLAKE2b-256 | 3db766700ca5bf365a47554d66889138e5f72161e0eeb82cb119e0ddeb2f65e9 |
Hashes for pye57-0.4.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d2dbe992db1bc63099872b6a936b85fb7750dbdb63088246c1f0dba48123179 |
|
MD5 | a53949796b9bb2bcbc5a0674be17b6ce |
|
BLAKE2b-256 | 550b6d34d263c8db875bdf01e38ed62225a8a3cbe55b2862f55925808446c83a |
Hashes for pye57-0.4.13-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36d6754a35298bc23864ab57d2175c3fc8048367a9f8fafe301f87740be7d570 |
|
MD5 | 2b896f1e6c8743c4c7252ff270fb21fe |
|
BLAKE2b-256 | fbf74520a9055dfc56976f06150037d2e4847e8e7251875bd3818d2aed1b9cf7 |