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

Uploaded Source

Built Distributions

pye57-0.4.11-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.11-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

pye57-0.4.11-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.11-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

pye57-0.4.11-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.11-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

pye57-0.4.11-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.11-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

pye57-0.4.11-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.11.tar.gz.

File metadata

  • Download URL: pye57-0.4.11.tar.gz
  • Upload date:
  • Size: 472.7 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.11.tar.gz
Algorithm Hash digest
SHA256 97c03ccd3b0fb7c073d9eb7641c376aed3913eb4404e5a057883590637402db8
MD5 908b564a27dbd48d2c2c40bc8f2464f5
BLAKE2b-256 4136656b580c0b9bccfa61424c927f8596ca1bcb6d702424c310494662273510

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 24e727957ada4b33135f304d9517a9c447c8a3f357269221e842c5ea91b93196
MD5 befa0b45388cd13ffb87b233e9208080
BLAKE2b-256 1acc55462c3ad91e8c528169d19c2104e717fa00c9b29ee85f1881ebc45ffa12

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pye57-0.4.11-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.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1ccd9ca88d71f03bcf9cb4581399728287dc59a98d3ee70f577ca4730f0c8b35
MD5 ac5414728fa8cfdfcae38666f6a263e9
BLAKE2b-256 0beeefc47b2a06e4ff28cbe378a0f0078b1ed6fcb2ccf368b2b648bfc56eafe0

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9c16c5efe478c65e3f22bbad260d054cd3b14ed1cfa8b460a44d46e3f792a141
MD5 1f8c492b33d0d24e18eee491d9219d80
BLAKE2b-256 5c9aaedcdfe5d2957abd54c593a0f5833da8c1f77720589d1837f0ec3d460029

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pye57-0.4.11-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.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 278804b34eddf8d8fce42c0b079e04a960e29d22415ed9aaa31bf28177bdc7fc
MD5 eaab566c37fbdc6239da2e4a8df01973
BLAKE2b-256 f71b77232c0ea4424a20293cdbf48c4ae8ab1125db74dba8b510e2d7335acf00

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46b823101e9a6d78ce4facb706e793ad9f81384f98b77c78ff3f77d121e44e5d
MD5 551420df679fe9d22e256e348264d1f5
BLAKE2b-256 5432955ce9b09934bb8315cd9051442a92da5a892de561db36845b9b38ec81a6

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pye57-0.4.11-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.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3345121aeba5697f17f5ade0dc2b900a543661d90c3c8fc7d77f48553089fb2e
MD5 9e3ae8eba77069377388c0529bd6eb8e
BLAKE2b-256 d279699ad2faeba523919f4040ad08eca770828a12fe1d2533f594678c2f0c58

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a15379b6235f470fbc60b59cb7fec37bde710e5d2e40373b4875e0db1befd3c5
MD5 19d4e180dd843f422584f1de72584092
BLAKE2b-256 b98f6620fe40c57e7ea91c3a79f1e3e2600199734d6ca31c3608caf588a02d1d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pye57-0.4.11-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.11-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0ff7cf8e10ce9c7f074040b7f96d1bfc8d07a35cd46cdd90dfddc63073a88b51
MD5 607c01d0d4059cb903ab4c03c25ee87e
BLAKE2b-256 b97c134e53d662e5603d0e026e9893bc5e27c41521295c347fb6d176e3dd457f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9a3596be9c339148c8d9a74dfe7d1079b555a849a3c47277266e743afe94c33a
MD5 ee6c947611a25cb6b9c6c558b1029a6e
BLAKE2b-256 c30a3571cf04c42b93ef5c22c39a444638c2b044c447f2014aa5e77d7176d62b

See more details on using hashes here.

Provenance

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