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

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


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

Uploaded Source

Built Distributions

pye57-0.4.12-cp312-cp312-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.12 Windows x86-64

pye57-0.4.12-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.12-cp312-cp312-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

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

Uploaded CPython 3.11 Windows x86-64

pye57-0.4.12-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.12-cp311-cp311-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

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

Uploaded CPython 3.10 Windows x86-64

pye57-0.4.12-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.12-cp310-cp310-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

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

Uploaded CPython 3.9 Windows x86-64

pye57-0.4.12-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.12-cp39-cp39-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

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

Uploaded CPython 3.8 Windows x86-64

pye57-0.4.12-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

pye57-0.4.12-cp38-cp38-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for pye57-0.4.12.tar.gz
Algorithm Hash digest
SHA256 867109280bed134a0c12c9ea909884f77c705024c9f01646f5f72d9d06194047
MD5 2c063bd396e6fc0a2f128fe078bc9012
BLAKE2b-256 81f5bd01074b921a7ecd7a912f2935d3c26a207a0b4503b9ed42ba9a25c200c9

See more details on using hashes here.

File details

Details for the file pye57-0.4.12-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pye57-0.4.12-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for pye57-0.4.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6c6a12104ba608009c856b7c06550823b1bce7fa8b411ee13a2416036a7a311f
MD5 3e1a5cb8cafe45269bf81f109a142a4a
BLAKE2b-256 fcf3c3b6c62cedb2c0a4d985056f56b08603bda4daab3b5557d1caa720140e0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 41be6f21662b9d41a0180fda895479ca199781af40fe8033dc2dd3d9b8e76fa1
MD5 e129a8a807c57778021e5895f7425b79
BLAKE2b-256 af150586d635a4c74abbae7e1cafcf939950fa9e7ccd85150dbb5f921fffc937

See more details on using hashes here.

File details

Details for the file pye57-0.4.12-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pye57-0.4.12-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e8267af6e1bc0a4d65d63e9ec1af66f093641d9652d87f0c1b9518d213a56b73
MD5 659594e42a386b30e2ba1816ed6f999c
BLAKE2b-256 e2a21e4186fbefb18ff72d594baba025d1ae1a46949002c7abed3df54cde79c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.12-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.1.1 CPython/3.9.19

File hashes

Hashes for pye57-0.4.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8f8570bd8b1ac416e14d24551b01c5c8602b2a01bb106f7a8865cad75fe8b1b3
MD5 78f8d7177b3e9a15672c745900c62026
BLAKE2b-256 5f0f607ca940a7cb99ecc06a63259954932731af8135856a4d6a2a373e8e77fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 658f23a637fb85b5108ea075b0fdcf8044eceefd697dcc170c7295764623b455
MD5 e9929473be8c77db81515a8206fdef9b
BLAKE2b-256 119bde297296d7241effc4ec5497bd912e3d492c2c1c10687fddcc4066a7d8b5

See more details on using hashes here.

File details

Details for the file pye57-0.4.12-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pye57-0.4.12-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 80b50967cdf3735db67d0ab1b4f3b8f8c9f82b1b1fd0cabbd2292ea9f51d41af
MD5 5310a31fbee16418f9010326a2e95c4f
BLAKE2b-256 c2e5d2096daae39bf86222cde49ef159f93140031f9d381f0cac38828cccf06d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.12-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.1.1 CPython/3.9.19

File hashes

Hashes for pye57-0.4.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 51653be388dabed141674a4b4435ffcccdcf5ac7f3663fba4125d5e1f1f019ff
MD5 08e9b9802432cac60b6b8f422c1df6b3
BLAKE2b-256 e8a3dd4d82cf4b04411ac8f3639fcf9183d7ef4c835d1a17a8f95aa118f1997d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0cb1e5a419187c95bcf5737d0e56a1a3fd3b43f51f39906792bde59d0d90496d
MD5 3ba131745ab786538d46b983824369a3
BLAKE2b-256 70342c25f97333e52c51ec6c37a60931768787bc50a4469060aad2bac9654943

See more details on using hashes here.

File details

Details for the file pye57-0.4.12-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pye57-0.4.12-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8cb7d09e44b3f0da6902c3fc3e8834bab892ba587f06ddcf0f3456843e63f1e5
MD5 692d8463c4f10d149b3050e2f3e67329
BLAKE2b-256 65cfdcca6d17bcff5303fb3fff473a729c4656ce5ec481e8a41275485367218a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.12-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.1.1 CPython/3.9.19

File hashes

Hashes for pye57-0.4.12-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3d370cc9c02784e09c460e30ff290b1faf6347069d38546dbbd138e6bf1c2220
MD5 a6e779eed6f8973d9450684b9b4a5012
BLAKE2b-256 3666a92ac010c2912a7a11ccc3673b64982827717ca6445a956e30a062a6e424

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ce05751dcec6e3e3ba8fa4051af5da3b3c658413861bcaab2a4b3b5b45dff7c
MD5 9837474a90bdca8f8e3338498753fc6b
BLAKE2b-256 e3a5b8b32a4c8f2ea3c840ecfbf49d598277e68f08240155f7775a0bf00c224d

See more details on using hashes here.

File details

Details for the file pye57-0.4.12-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pye57-0.4.12-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 948435e63905b3d32ea9649e3d17e604bb1378d004fff294d31f6456121fb0f2
MD5 166ff98858d64e4efc5dd94d93a2d503
BLAKE2b-256 bee6ed2a4ea7f836fcb550b9bc956bfede8d3dca75578127df418269e5e0c750

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.12-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.1.1 CPython/3.9.19

File hashes

Hashes for pye57-0.4.12-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 58a4c1546a9a43d3479f0ac7d65d029558f4d9cdd352d3e0ff887042dddabdef
MD5 1cfdf46e77a60b25adbf025240e9ceaf
BLAKE2b-256 ac3d4c869c1577cfb2cc21cfa291c9f279124d92eba40ffc6e2d806a942d8f2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea3b23844832980c4dbef7a6975dd7ef3ff2c2e7170d51e302e123980f07de4e
MD5 9aadb31bd0781760aa5d53002b145990
BLAKE2b-256 c53fcdd11c619757100c31630d8f0b2ac233571df088443f51e950de948c0ad1

See more details on using hashes here.

File details

Details for the file pye57-0.4.12-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pye57-0.4.12-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e2b473b4055a0ee1f47d8d01482839394ad3b61a8314bbe6a78761ec972a26a
MD5 d1874a2692a34a1fcb2e02a0830b52e5
BLAKE2b-256 643f88fe685fc342ef8abcb3ae3ccaf3936abb71a3d6085da56d86eaec67adf7

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