Skip to main content

Python .e57 files reader/writer

Project description

pye57

PyPI PyPI - Python Version GitHub

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 linux or Windows, a wheel should be available.

python -m pip install pye57

Building from source

Cloning the repository and required submodules

Clone a new repository along with the required submodules

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

Run pip install from the repo source

cd pye57
python -m pip install .

Uninstalling

Use pip again

python -m pip uninstall pye57

Project details


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.4.5.tar.gz (472.3 kB view details)

Uploaded Source

Built Distributions

pye57-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.4 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pye57-0.4.5-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

pye57-0.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pye57-0.4.5-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

pye57-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pye57-0.4.5-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

pye57-0.4.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pye57-0.4.5-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

pye57-0.4.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

File details

Details for the file pye57-0.4.5.tar.gz.

File metadata

  • Download URL: pye57-0.4.5.tar.gz
  • Upload date:
  • Size: 472.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for pye57-0.4.5.tar.gz
Algorithm Hash digest
SHA256 4e7345d35fa4675427168915f5c30522fc9af5b74bc9e43cc279ddb6b263382c
MD5 7dc3f19fedb6a923ab9ae4afba41bf92
BLAKE2b-256 c013bf18ad68193b2ca83672b66f4d95c460a30090f727aeb0a0e47bf9019893

See more details on using hashes here.

File details

Details for the file pye57-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db32cdab5cf0942b2c36e82e5adb73be0a6c7bb6a37be7b9572eb7aa67bc7ecb
MD5 af90703dc6bd713e7c8cd48079e786c9
BLAKE2b-256 f18621b53c9ca515880a28ba150afe1730e56d5fff20649879e2cf0a5d4f5dfa

See more details on using hashes here.

File details

Details for the file pye57-0.4.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pye57-0.4.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for pye57-0.4.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 97ca6ab3d976dd2b5c4ff0838966bbb7e57eacdd4f86497b83fbd071b7da10e7
MD5 4917496d4b8ec0a2cd175b712d9af4c8
BLAKE2b-256 d3344f5566268bc7ffd162c67de593755d05cb904a8e52cd854ccd1a4ab46da3

See more details on using hashes here.

File details

Details for the file pye57-0.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 018a4e47013e27dea1ae95c0ab9830bc6caec89442f0d9d03295923a66fe442f
MD5 e521acced05fc19484b6ecc392ec6e1d
BLAKE2b-256 703fea81c53867a288065bf694211161bb8337dcfe9eccea8e7e5860d3bdc793

See more details on using hashes here.

File details

Details for the file pye57-0.4.5-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pye57-0.4.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for pye57-0.4.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7a7947f43cb31cfcf53fec000a0b213b5850f65ede0af4cc0645da2f6468cf84
MD5 0751223ef484c050f2de012343c6d15e
BLAKE2b-256 bdf15ba312cd28fdd399aa25497cbeecfff2b94daf0d38e134686eced765b070

See more details on using hashes here.

File details

Details for the file pye57-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47958ab408fc03f784f0dcd69862cbbd9da6a350222a626f310bca6f08036a14
MD5 b6024c33defb6d14947d3c87f8a1302c
BLAKE2b-256 0ca7bd28e20ef1623c4956b362645d82574a4406feb3c89dbc59d7cd1958f0d6

See more details on using hashes here.

File details

Details for the file pye57-0.4.5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pye57-0.4.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for pye57-0.4.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a995a1789b2f59119730b48ba3a454f7ddd3381a711f6bd46fd9dc4c5572a68c
MD5 3df97652cdfb74c956853d993d492ad0
BLAKE2b-256 f3a5e838dff7c91c8dd7e96431d848fa8119f9ea27491b87761a24c8eb9a9816

See more details on using hashes here.

File details

Details for the file pye57-0.4.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 367c283bcdf712234c3a3d631fbf7b324dc3b67bfc3c7dddf04806b0a3627d15
MD5 a9c3aa774f1bd25eff19470d06c95c42
BLAKE2b-256 bc77c4f782cf7d43b612542adc94815606d650552e5488fe023dc6f6114237d0

See more details on using hashes here.

File details

Details for the file pye57-0.4.5-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pye57-0.4.5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for pye57-0.4.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e74d63063ffc2c0a69d743a4d75767c8fdac5a5c5d04efccb9111380c986eb63
MD5 f13bbb70b6e1b635e3d195955de7a2b3
BLAKE2b-256 9939a31b1f3460a567662695bd8dab9e5493e6fa19f0c9d04be9c92b610e4655

See more details on using hashes here.

File details

Details for the file pye57-0.4.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 057350935ce5854e47e6ba83d5e410ea11f8972642914b5baafcbe4e5d6f6c69
MD5 6fc4854196d1634f973ebca1117e3be0
BLAKE2b-256 096a5c9e3d22a880a9508a8a90dc406b6a2224f242f9534412ed63841890f76b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page