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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pye57-0.4.19-cp314-cp314t-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.14tWindows x86-64

pye57-0.4.19-cp314-cp314-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.14Windows x86-64

pye57-0.4.19-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

pye57-0.4.19-cp314-cp314-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

pye57-0.4.19-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.19-cp313-cp313-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for pye57-0.4.19.tar.gz
Algorithm Hash digest
SHA256 0323a0cb5e62286fb3f4d7a2c63d811bb813ac65e2a21cfadf8ca848eaa27101
MD5 9e5ed4bc23a28946f60c3aeca8879eb6
BLAKE2b-256 46cd93dbfeec9dcc1bfb3f4c3f8edcc31d67eacfa683c8a3a3b90fffa98adcd7

See more details on using hashes here.

File details

Details for the file pye57-0.4.19-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: pye57-0.4.19-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pye57-0.4.19-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 52772b0ef4a8ec2e4bc3d3134b9edb2cbd9c8d412104659ea0eaa0cb85b1e20b
MD5 c8922ca97ae694db5db8fa9a3e7fc6a0
BLAKE2b-256 1c51c8c80982a65420d0ea9d491fea956ceae8b32f7f210ac016fadab9677a44

See more details on using hashes here.

File details

Details for the file pye57-0.4.19-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: pye57-0.4.19-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pye57-0.4.19-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 9f9d54c89ee9a3c835d6e04640a069cb22321d4d8d54e5d7e0055fed134eb8f3
MD5 9bfe22a5632b495cc2a3fb8aeca8a222
BLAKE2b-256 65574c081affb44cf0cf5b4ce695fd09010680d9a02dd54105c490bacfb5c6da

See more details on using hashes here.

File details

Details for the file pye57-0.4.19-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pye57-0.4.19-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 99aa67fd36a6607d08e927cfe25a14fb74eb55065889020ec4b67ec174563887
MD5 fe24a8f6b62edde99a70d42bf1a51f72
BLAKE2b-256 52607f8940aaa72c6faecd260cb38c335c32681267968dab5b387a9d1f2cefdf

See more details on using hashes here.

File details

Details for the file pye57-0.4.19-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pye57-0.4.19-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e20bb7b68c020c79c4abc8227cd79e0ae15407609c13cc36d1638b1af2f2a02c
MD5 47bc655c12099c314f036f64ee0c89da
BLAKE2b-256 65517748498e84d72209750567f4b9850d9a4a0405d91b6b93bd86cda7448208

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.19-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.13.7

File hashes

Hashes for pye57-0.4.19-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d27332054bf18689acb45470a3bc16d4c21ed7b0b0848c56ef9e42cc8980a3c4
MD5 725c8cd42bfb215a174a639f14999718
BLAKE2b-256 d6fe613fcde256d10c0d1a8f7288d3ca871a9fa6996f0602da71f4940e93bbc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.19-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 230540b53f04b004025ccc840b42d2813299bc19e00ad9e9e216b394fd9299fd
MD5 7c770b0d9c5a6b9b73d628de471a55cb
BLAKE2b-256 a1d65cd3dfb00ceba448a4a2f488af0565f1869515c0bfa3c325b706d7684990

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.19-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 290c6c04e12fbc281560c775d5716c3a808e279704518b1987bdc53367d11bdb
MD5 dfe84364e9c0a778fa59d9abe206742f
BLAKE2b-256 d9101ee8fe0fce7b1ae8f643f55a3b8207fafd4efae67707f4e60831e3334799

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.19-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.13.7

File hashes

Hashes for pye57-0.4.19-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ec415dac94f66832d8f8709ef33eb43b1a5a002ac63c02af5458229c8d29e3a2
MD5 304f4404fa0190708bb632cf3a381e38
BLAKE2b-256 d044abc7d0576eb8c791cc0866a187dde795c69b5550119b1fd1fc09222e251a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.19-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 326890c430a8019528e8ce97fb8fb7355aa64fbd41c00c6161a12ff1c86592fa
MD5 6464c63e5d4ab865147cb7f53a8e794b
BLAKE2b-256 ddc0583f287be7deddf6ceaaeffd7ad2db5c9cecf0b82af131e5ce36861aa701

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.19-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d548a28ea795ad003fcabdceccd624ddd6674360cc08df4a39b2d6854073d688
MD5 345d905033874ed95277417743d0fac3
BLAKE2b-256 fb84453ddb116a0f081223eb193ae2e47748bd9b40afc3e1315c0f94f08d0c45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.19-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.13.7

File hashes

Hashes for pye57-0.4.19-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 858aab1379924f11c04ab80653d7853fec71c43abf60c8bde27e3077e03abf7c
MD5 9b3c8b5b2f17afa41e5d45676fb5956f
BLAKE2b-256 4f952ce656932797b29181c5deff7366a0b2c6c8caf5f3688928a67fb051faf0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.19-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 938ef15a5ab64a877a0a3b11bf58a4b5967fdc4fbb969c80987dd959400d9220
MD5 bb59574c72a1e33a99b9bffab3bbad61
BLAKE2b-256 b5eeb6fe83ceb9b76298cee9d226e86ee611e2e38f22b2d9c80c0e451dd2ecf6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.19-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 56175b0424edb0624dad83a973f5d6c1e974f521d263d0230665e23e430a6703
MD5 efbc0ecdc4498483e96341d7ce738800
BLAKE2b-256 cb685d04a0fbe6833e0c6b027cf9562ff2c9b63f01f9a6108cb07d54096f8723

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pye57-0.4.19-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.13.7

File hashes

Hashes for pye57-0.4.19-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b0fdc023d88706739ff5bfa22022bd69611b2394298d477a9cc91c669c4cbcf8
MD5 21f1bb4261734e1547497d4dfc37ce55
BLAKE2b-256 519c95f355e5a2f3fe5654d3d518831b91aa0c6943f66690750e9ac3f7fe3d9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.19-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 29c81a05e062737fe7a1883d1717ec0a05d86876c4d549b2bdacafa230dd7ba2
MD5 7136b13e02720850d57e32c887c1de90
BLAKE2b-256 a4de448cd13ae098a035ed71744c6bd81826d89ac9f98aa6336be5e49996ae1d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pye57-0.4.19-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c9d678c7a78b1b33cf75765c193a55ced19febbd8f37e2b9a49c6957d2226b5c
MD5 1867371dac218afce1dc6af18cb15ebe
BLAKE2b-256 6c053ffba49cc59cc7130f4a81b8153513601fb57b4660f94d65051763e38579

See more details on using hashes here.

Supported by

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