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
with pye57.E57("e57_file_write.e57", mode='w') as e57_write:
    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.18.tar.gz (474.4 kB view details)

Uploaded Source

Built Distributions

pye57-0.4.18-cp313-cp313-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.13Windows x86-64

pye57-0.4.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pye57-0.4.18-cp313-cp313-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

pye57-0.4.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pye57-0.4.18-cp312-cp312-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

pye57-0.4.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pye57-0.4.18-cp311-cp311-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

pye57-0.4.18-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pye57-0.4.18-cp310-cp310-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

pye57-0.4.18-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pye57-0.4.18-cp39-cp39-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: pye57-0.4.18.tar.gz
  • Upload date:
  • Size: 474.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for pye57-0.4.18.tar.gz
Algorithm Hash digest
SHA256 981d01aa83408abe0ddb36cf05cee7a5ed20b2d7f211cba0952fe95f8bc97bda
MD5 e4cdcd68cfce8f0a9b5bc1d20560e011
BLAKE2b-256 779fe49ab6ca2c5b785baf92656d8e61ee1ec7153597e4e03dd79aad92df4fda

See more details on using hashes here.

File details

Details for the file pye57-0.4.18-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pye57-0.4.18-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for pye57-0.4.18-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4cc771c75e883fe3f607b419dcb1add1f5f94ca6baed09489dd289c8b1bff07b
MD5 1e0a92a06266dca0752f4db84bde5b16
BLAKE2b-256 173e7ddffde52d5064f36fc920b0988be767f44a39da502218988ad68750af01

See more details on using hashes here.

File details

Details for the file pye57-0.4.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2a4a42871b457e4958a5727ff2ad28e486948510a4430bed11ce9f5eb2127661
MD5 5cb9c6ebd604a1a6f9ed82fe03ef0e45
BLAKE2b-256 6f85bc0a4684c85b63861716f78c919f72cf48dd0d41b3ade2192e114a81418b

See more details on using hashes here.

File details

Details for the file pye57-0.4.18-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pye57-0.4.18-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6ce44ab07095c7728a8488c8422f529d384a1aadc1aed96f5786e085a9019899
MD5 150d0c0bc40fb804cd49a5ac14cb5b3f
BLAKE2b-256 cd7c001e51a557e8821218ed6040e3b10c35b3deac4cb0d6e5039f887b5125fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.18-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/6.1.0 CPython/3.9.23

File hashes

Hashes for pye57-0.4.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6f46aa9d370d9904fda416a7183404d1c19fb48fbd59fa14a6cc35d0edc7e096
MD5 ea756cb319f9c7d040f447f4897684bb
BLAKE2b-256 2a6e51a478d766c686d3bf81bcfb1097bc0b6e642e2e710aa330d0de8e8bcb04

See more details on using hashes here.

File details

Details for the file pye57-0.4.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 20756d32bd2d9a91c51786c3820ad85d8142f99bf19fd608b47d9f752775800e
MD5 82b5137f1f05ccc735b91b4ec6225534
BLAKE2b-256 cfb652647fa92c3c1328d37c904015d6170d55928b2fa881e2f523527826c390

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.18-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 17a069828d39b121f79e7bd086c05b69e38235ac7245db2198ea252f6fc6f884
MD5 6aee33507257ab4194900dc6a1d4a714
BLAKE2b-256 f1a412ca5adb18468bd81f7faa2e68b451dd892b18c6c767f8209e24a58b33bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.18-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/6.1.0 CPython/3.9.23

File hashes

Hashes for pye57-0.4.18-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 30fb09e18dc6ad59edf7298113bb6b53ecc01a99860f2dcd33e9901643814ce8
MD5 6a6249436accfe149c5a15ad4e743c65
BLAKE2b-256 ff385756c929c6da80a8d5fabd0cc933dabeebfa2187d23e2fadb9940b2c55a7

See more details on using hashes here.

File details

Details for the file pye57-0.4.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 241726d62189c41f58aebb27d93b7c1769663befce30ec01df24bb114989abbe
MD5 b0a3727aee0f6e5bc07cc83fbf6b3f7d
BLAKE2b-256 73494db6ea87d037b0925bf8d591b2eb5b1034f7e8eca18082697232025ddc6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.18-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 512ce1d71342184448a01a50f298376c57e6aa001dafe1f562f072be0cd529db
MD5 3188a9ce814a60743cb5d7393ef2fa50
BLAKE2b-256 5d176e50c2f79ef8b57c94d48eaf30ef2f97facec3ab9408c87b82b4660f80bb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.18-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/6.1.0 CPython/3.9.23

File hashes

Hashes for pye57-0.4.18-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d5d48e14792d94f07706ad60ef04357532a36ae165737fd3504cf26ee145f8e6
MD5 248fa49732fbf0a50b2fd553b6e8be20
BLAKE2b-256 0b77b6c558f34a4942ce4e81a62689a8b1f28180475814b45b26aadb0a18ca38

See more details on using hashes here.

File details

Details for the file pye57-0.4.18-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.18-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b53b85f8c2b8bf6099464659a075ed145ff31669f5a73a4f6900fcda7b1c442a
MD5 e600fed3886b13036f90b3021b3edfe4
BLAKE2b-256 c4fb00c42b35d3ddc7f69e8d32539bb77f248a4c647d7010604fb19cac52f637

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.18-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8cdaea9ef06125cb371336544cb971d08e2b2e453d2895d626afad06d86a501f
MD5 33f1a2a447e2fac2a7a8b6c5a676b290
BLAKE2b-256 75e4d1da66f8796f41109de5b593aaffee7646dd5bf3158ac19edd879beb1bd2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.18-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/6.1.0 CPython/3.9.23

File hashes

Hashes for pye57-0.4.18-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4d2dea9b1ec6123237b406f284887a692197bbf720e203629b462f6f3ebdaea2
MD5 716577849f881591672b39fcf69479d9
BLAKE2b-256 26691ccfaba9c09ca4feb3cb74d59ce91186dfe3eedcb3c5037531e80bee0732

See more details on using hashes here.

File details

Details for the file pye57-0.4.18-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.18-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 62efdf8a0d625fc701d172da7823d1571884dc5154fd3ebcdf492395e335ec42
MD5 01b9f77e9dc5a959f8d1e5c2e2d0d77d
BLAKE2b-256 19ce66028f969afc73d231be5b210462291aeb6aaec486187eb7cb02b18ee21f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.18-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 85fa9d70e595712bd5b2dd1dd644c688085986fbd50da497fd4deb749f68b34c
MD5 41afbc914315a16e6716cf245a15febf
BLAKE2b-256 42f77d1f688de3e4304ab0f41c129e2a8fc020e2a905a0abc42735eaa0a95199

See more details on using hashes here.

Supported by

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