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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.13 Windows x86-64

pye57-0.4.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.5 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

pye57-0.4.15-cp313-cp313-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.13 macOS 11.0+ ARM64

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

Uploaded CPython 3.12 Windows x86-64

pye57-0.4.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.5 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pye57-0.4.15-cp312-cp312-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

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

Uploaded CPython 3.11 Windows x86-64

pye57-0.4.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.5 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pye57-0.4.15-cp311-cp311-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

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

Uploaded CPython 3.10 Windows x86-64

pye57-0.4.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pye57-0.4.15-cp310-cp310-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

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

Uploaded CPython 3.9 Windows x86-64

pye57-0.4.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pye57-0.4.15-cp39-cp39-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

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

Uploaded CPython 3.8 Windows x86-64

pye57-0.4.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pye57-0.4.15-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.15.tar.gz.

File metadata

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

File hashes

Hashes for pye57-0.4.15.tar.gz
Algorithm Hash digest
SHA256 4d124c9db9f6d32127ca4418281e04defd9bd1e34098d8da0cd9b7f0503c75c2
MD5 3c5e181313357a767311cb522c491f1a
BLAKE2b-256 048cffddc0707b364943ae6e71341cad7b0a7bbbf320de927d0659a79648b85d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pye57-0.4.15-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/5.1.1 CPython/3.9.20

File hashes

Hashes for pye57-0.4.15-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 362d394b3dbac976be96b4dae0d94e4caee01e893757b3766415bb0ed9b32248
MD5 231d7a9cce7141389340e632d73bf47b
BLAKE2b-256 1a561881d68cedf3940ca9a4dd71d0813e94d3c7e002ddba6ec98b356ce2e46d

See more details on using hashes here.

Provenance

File details

Details for the file pye57-0.4.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 304e15fc625f9106d093a0e82785cb994d59c07c68d50ac9d8ff91b2a364eac4
MD5 e80949dead4d314fc298bb3ceed9487c
BLAKE2b-256 bf642ff710b0ca4db35cf6667282544db1d8adfee201aaa21afa62ba2b42015d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a1d311b9d0971249b7a94b17de6beb8366d9a17502e8c777fe931aa62669e00
MD5 60b93915bc06259ae756909aba6ac275
BLAKE2b-256 8ca455f2574963995547baf81e4fab8947b5b31655c75b24ff2264a1ee669606

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pye57-0.4.15-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.20

File hashes

Hashes for pye57-0.4.15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4454f03e1135c27c2f2d71c788cfde6955bf76de927cc4fc6b73961bcf01a8ff
MD5 d3e7c7db78cd4f32a6cfe38de80b31a9
BLAKE2b-256 0439e3ab5c6b2ba2b3aecc97cadf468617fd93231e279722808ba85885ab9715

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0bb6cedc89e305f0809d26e49405c19a3e21d0b5503adba9bbd575e5fe57bbcd
MD5 d873185a89bd1c9378d607c1563d7e29
BLAKE2b-256 04dc1fc6e273c4bd5273fafee4999a128e6eccffa080dc3b2ccf528d36452c6f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3bb43f6b102d29ce5a75969889e0fe4194fb365006f4363af69bec92bd0eeb14
MD5 9328937e8e6dbdc7e425e7c15bb5c4ff
BLAKE2b-256 64ce14081d3a90dec834ede2175cb9065a9544970a082bd73d1eaa639820b397

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pye57-0.4.15-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.20

File hashes

Hashes for pye57-0.4.15-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b50e6cb4fd48e95b72fe30675be311434d54e5a160fadf7f39bc387906cb4401
MD5 039d03a93edfbdd552a9e569f306dc8f
BLAKE2b-256 fa97f018bd3ee804b6f03330e9f10c49eecd4a3f73fd34be337dcd0e984b53c6

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2cd75de438a8eedbd7b2eff52b6d64394e06afd32a3e57d838540e9fdfbe090e
MD5 13af996ab665061698b4ba3cf3297294
BLAKE2b-256 6341bd1fc2e99925d254724bfc92e06c8def2daa30c3d3bf6a47456e59cf8478

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5dc59441722614cb8093c71bce49cd518268e81ecf8316631ef0eb72ed6e2ee8
MD5 3d537ceaef6f07711c584f60ce292e4d
BLAKE2b-256 e70cb274929f12608b4d0bdbdf28f99562ca231fa6282e49e7a544933eece57e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pye57-0.4.15-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.20

File hashes

Hashes for pye57-0.4.15-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d17cdbff79c0e37b81d921220501bf086a58c94b4f978cd6e7cd929397748971
MD5 30a585c5d0d30a31d222c3f018718f7b
BLAKE2b-256 17bdca951a48997ebe74ff327ef9afc355a3c0d34d316bda7dba25c31a2a3c8d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 84d3a0c200ec2190ef6bbb335b847b35f2e7b84f6a4b50c5a416361968c191e2
MD5 5a25d176e9811a77062da55edf4cd1f0
BLAKE2b-256 b69b3b8f4da8d71a5fc6f59743521cabbd6049c8e31bf6629e9d9e6fb6662696

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8b2b1613420b8194a9e0c6b41234a4bc9571706ab1944e60fb45a0a171c09f12
MD5 7ac6f8127e91cea4672851967c71fb0b
BLAKE2b-256 f6ea6ba4938d5d13d462251f6fddf6658b1b468368dbc75fc72c1f71f9c44092

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pye57-0.4.15-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.20

File hashes

Hashes for pye57-0.4.15-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 044b38b1701481e12adf8a78b7fb1666089d6a75a2532be035b9d0f8222c7c1d
MD5 29746840af4af618b6dc6e663557856a
BLAKE2b-256 a04dad5ff96707666bf6911a753c98d6592cf6279af7e78a432498a777442a95

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fe7d47c76cf0a5a26d6f536e9fad681c03ecc5216d0bbf558ed7fcce7e1224b2
MD5 ee5b5e079a2606291937b6884f97f6cf
BLAKE2b-256 f3fbb86a4e1e349307073eed9a15b4b2a108c06ac34fec416cea07811c0893e8

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6751869a42a5045384cc58cb02762578faa0444aef3503b7d4adb73e02ca7933
MD5 c98ef895f0685d93c20d5f7b6e8c7a82
BLAKE2b-256 5762211e5e04a24d3bd377cbdac0c23e95fff120d284587bef1b59d9039e8e3f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pye57-0.4.15-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.20

File hashes

Hashes for pye57-0.4.15-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a564039dc14da74222dd73039fbfb570976320ba4145389d39f4b5e6448ab9e3
MD5 b094868edd7a5d7f50bd9829b463672c
BLAKE2b-256 4c08d43d217bb3f5cb3b1b878e1b1ba4eced2e9d01d8e00c4b9856f39ee2cd3b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 74abeb451e0ec2053b5df53267e8334f32482c8467b805ed4f6ba5e85d28a99b
MD5 44c3ee9b3edea9f1320435e09cb6f32d
BLAKE2b-256 56c6e7b9eb106fb173369934d46d95a4c52611cac7530f55740c76407a2d1264

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pye57-0.4.15-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d8f09ca42d49198ddd0dd084b3d73b98cf67446eef64943a9a402df929a31b0d
MD5 9d0e7e77725edda3330139aa7d0e892f
BLAKE2b-256 9c577be6d00bb4d09cbe711d2f54e59f9481cf630f9546f49cac98f1ff8ea982

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