Skip to main content

Python .e57 files reader/writer

Project description

pye57

PyPI PyPI - Python Version AppVeyor Travis

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

pip install pye57

If you're on Windows and using python 3.5 or 3.6, wheels are available.

Otherwise, see the building notes below.

Building notes

Windows

Binaries of xerces-c can be obtained from conda using: conda install xerces-c

Linux

Install libxerces-c-dev before installing.

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

Uploaded Source

Built Distributions

pye57-0.2.3-cp36-cp36m-win_amd64.whl (330.1 kB view details)

Uploaded CPython 3.6m Windows x86-64

pye57-0.2.3-cp36-cp36m-win32.whl (256.6 kB view details)

Uploaded CPython 3.6m Windows x86

pye57-0.2.3-cp35-cp35m-win_amd64.whl (330.1 kB view details)

Uploaded CPython 3.5m Windows x86-64

pye57-0.2.3-cp35-cp35m-win32.whl (256.5 kB view details)

Uploaded CPython 3.5m Windows x86

File details

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

File metadata

  • Download URL: pye57-0.2.3.tar.gz
  • Upload date:
  • Size: 159.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pye57-0.2.3.tar.gz
Algorithm Hash digest
SHA256 d4c51803af76ebd34a4d3b0e7d24d562e5689b9dbe933b8ee090c43aee458b6e
MD5 6f3840272c75cdee44525b380a66a4ff
BLAKE2b-256 6637bc000ec2bc87afcd7b90a2b9ff772aafcfcfb2d91d11e74fd64439e2c3aa

See more details on using hashes here.

File details

Details for the file pye57-0.2.3-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for pye57-0.2.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e79b773e31870e2f18d02fb8e2f827b4b8dfa1afcda982b7aff02759b39495af
MD5 ffe50cde12d0421ddca82ea87b247ac0
BLAKE2b-256 a200ac2cc037f6de23c6f0aefc83b5873b37ed10cdcbfcf7bc1e5f482f23f6b7

See more details on using hashes here.

File details

Details for the file pye57-0.2.3-cp36-cp36m-win32.whl.

File metadata

File hashes

Hashes for pye57-0.2.3-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 f8477d93dbf8ca2345c1e373322fd1e4fed7690510af24b44ac9d925f0cadb94
MD5 b58477a4f464c3d1fc222f9756e462b4
BLAKE2b-256 d90f4e01875270f426c4b8820505cc1697798a884b9e8580d104c55065a97c2f

See more details on using hashes here.

File details

Details for the file pye57-0.2.3-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for pye57-0.2.3-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 6bb6a008bdb35744778bebe2b559fe75ad34d7d31205df002fb4f7143d92cfc8
MD5 ed5069e6b093aebd3bd61a6ffcfc0947
BLAKE2b-256 8d9c7c21d829f5afc50d25f9ea5a51c1c230aad2b2f00e54450a0390eb88dc2e

See more details on using hashes here.

File details

Details for the file pye57-0.2.3-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for pye57-0.2.3-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 39f42f69f477d2e5039ad286b9653bcda0c8e6a2c907b100dd2320cf806d2f3e
MD5 e126fa5335d69a309ca91826d136d784
BLAKE2b-256 7962921ac59b898f27672c23fff95eb98cf1c3ffa41d846a7228dc0c7ec74dc2

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