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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

pye57-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

pye57-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

pye57-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pye57-0.3.0-cp37-cp37m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.7m Windows x86-64

pye57-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: pye57-0.3.0.tar.gz
  • Upload date:
  • Size: 174.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for pye57-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c3bf82c4f7004e80a3dedc2b8f80b00ddb38d5c5d8feeac4132d8de85c2d599f
MD5 633566c2930a950698138f02f020e110
BLAKE2b-256 14b9579c36576efb15b508eabca1f375f70b62707a88e80d1433701138dabbdd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.3.0-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/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for pye57-0.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 628b3950af70efb4c6668f8f9ba594daf44d1c40a91badef25fa161f50774a48
MD5 472a32b4d066760328e73a028900c9e7
BLAKE2b-256 80e31161db77e59d5f6024c95fbe969067cf09b6ab93059d3142e9f3c4ede3f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 75808007ba149aef0df6877accb54b0ac242a888f6799b06a8f8c8fa85a12249
MD5 e6cead9d1f2e3ca1bd20d4d19b6ec4ec
BLAKE2b-256 20bd4d45673ca708388bf5e93396aa79a1e67590597f0f51d29dc3c2b2de4933

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.3.0-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/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for pye57-0.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b4ba5862a975b9b3d11d8edbb44176006030dea6d33dfaa03e5ed517952d5215
MD5 a21dfbd5e00c95bb65435dfaec5ba027
BLAKE2b-256 f75160b64877d2e63582bf791b1a23262b70f5ccf1f417d8e37953f29234fe8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0d890dadc03c9690f5d5827127b97e7651d71d8a8fa669d6c8a2ae8a2ed5907b
MD5 80715ee210600e15c6c42e3afba6dbf3
BLAKE2b-256 0cab53e87b877853cf6ea616d62f86623ccfb573af729b51805197a2f38cfe80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.3.0-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/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for pye57-0.3.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9710bb73050df4f5afb2cc77d4e7bcc094b217484268a692f47c12354b43e185
MD5 0f00f50ed27249dafaf1680811c74292
BLAKE2b-256 ddd169bea99591ba7178cf737abb304672533ed4c14f83c21be7622954136619

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a5fbb99e142731d35f71bd44dbd3b7b0fe55d41eb2065dd5e2158f94c1e76918
MD5 9318b2a910b34adcaee125ccd70fa653
BLAKE2b-256 01a52149139b2667acf07d60fd8ec5300ec62c5825161f89a72dcf07d808803c

See more details on using hashes here.

File details

Details for the file pye57-0.3.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pye57-0.3.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for pye57-0.3.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 21afc85034fecaf136d5387262252172d725d2dd055076966ef1f679f7e781d5
MD5 53eaf49ceef1753c88d10961a858b4f8
BLAKE2b-256 f5ff491abc0855aa0d73e50f7ee53f0650ba7326a42cbd27fecbfe0a9035e876

See more details on using hashes here.

File details

Details for the file pye57-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f32184b76d7e68adecec494f86b8b02ee4649a94728a8ce97f74b4e9af501d2d
MD5 d64cbd7af028c7ae0156870d0bb5f2ba
BLAKE2b-256 650440ee97f6c0c6bbeb7252c169f27c36fea8789368426944a1f117f3d4dc4b

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