Git Product home page Git Product logo

pye57's Introduction

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

pye57's People

Contributors

akashpushkar avatar chpatrick avatar dancergraham avatar davidcaron avatar joaori avatar khu1998 avatar pfmephisto avatar tobydunneabyss avatar totorro35 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pye57's Issues

Anybody Knows if is available for macOS?

I'm trying to install this lib in a python project using MacOS but returning an error.
this is the error... ---> Could not build wheels for pye57, which is required to install pyproject.toml-based projects

I've tried to install pyproject.toml-base but doesn't work

Does anybody know what I can do?

pye57 - error importing libe57

Hello.

I tried to install pye57 lib using different python versions ... 3.5, 3.6 and 3.7 also.

I used pip, with no problem at all (succefully installed pye57-0.2.3)

When I try to import the module the error shown is always the same as in the following (including the installation steps)

_D:\Python35>python
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import numpy
import pye57
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named 'pye57'
exit()

D:\Python35>cd Scripts

D:\Python35\Scripts>pip install pye57
Collecting pye57
Using cached https://files.pythonhosted.org/packages/8d/9c/7c21d829f5afc50d25f9ea5a51c1c230aad2b2f00e54450a0390eb88dc2e/pye57-0.2.3-cp35-cp35m-win_amd64.whl
Requirement already satisfied: pybind11 in d:\python35\lib\site-packages (from pye57) (2.2.3)
Requirement already satisfied: numpy in d:\python35\lib\site-packages (from pye57) (1.15.1)
Requirement already satisfied: pyquaternion in d:\python35\lib\site-packages (from pye57) (0.9.2)
Installing collected packages: pye57
Successfully installed pye57-0.2.3

D:\Python35\Scripts>cd ..

D:\Python35>python.exe
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import numpy
import pye57
Traceback (most recent call last):
File "", line 1, in
File "D:\Python35\lib\site-packages\pye57_init_.py", line 1, in
from pye57 import libe57
ImportError: DLL load failed: Impossibile trovare il modulo specificato.
_

Any suggestion?

Thanks
Michele

Cannot find reference 'libe57' in '__init__.py' also ( circular import )

I'm getting a circular import in the init.py within src/pye57
image

Then when I make changes e.g. changing from pye57 import libe57 to simply import libe57
image

image

I tried the pip install -U pye57 and python -m pip install . and pip install -e .

image

image

I also ran conda and installed xerces, I also placed 'xerces-c_3_2.dll' in the root folder
image

build libe57_wrapper.cpp issues

Hey David,
just wondering if you can provide the steps that you build libe57_wrapper.cpp please?
Below are my steps, but it shows error when I import libe57 package.

1.I built pybind11 and copy the "pybind11" folder to "pye57/pye57" folder.
2.In "pye57/pye57" folder, I use 
c++ -O3 -Wall -shared -std=c++14 -fPIC `python3 -m pybind11 --includes` libe57_wrapper.cpp -o libe57`python3-config --extension-suffix`

When importing the built package, it shows the error as below,
ImportError: /home/Projects/pye57/pye57/libe57.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNK3e579FloatNode8pathNameB5cxx11Ev

Read Directly into Numpy Array

Hi,

Is it possible to read the specified fields ( cartesianX, cartesianY, colorRed) directly into numpy arrays without creating a dictionary?

The reason: when the data is converted to numpy arrays, it is copied. For large point clouds, it is an issue due to the fact that the memory usage is doubled at the peak.

Thank you in advance

Custom attributes

Hello, I was testing with the library and and I want to ask if there is a way to add custom attributes to an .e57 file.

Issues pye57

Hi David

As per library i have used the pye57 code. But every scan points i want to extract the " 6 images ,camera sensor related entire information just like , Focal lenght, Axis point angle calculation,focal length(fx,fy) ,principal point ,Fov ,Rotational and translation matrix , theta calculation etc.

Could you please suggest that for extract the information from E57 ? / if you have source code please share with me.

Also please share your email id.

Regards
Devendra Sinngh

Function to read images from E57 files

Hi,
I am trying to add an image-read function in pye57. While I am testing it on my fork branch, I found I could not upload code regarding "libE57Format". That folder belongs to the E57 repo author. Does it mean I need to send a code request to E57 repo first? Or is there any alternatives?

Export spherical image from e57file which not contains 2D Image

Hi,
I've got a cool code to extract image2D from an e57 file wich contains a 2D Image.
I use this :
`e57 = pye57.E57(e57filename)

imageFile = e57.image_file
root = imageFile.root()`

My question is how to extract jpg spherical image when NO image is on the e57 file?
I suppose I have to convert all of my points for spherical but how???
Should I use pcl package or anything?
Thx!

Apply transformation to an e57 file

copied from
https://laserscanningforum.com/forum/viewtopic.php?f=43&t=21442

Hey all,

I have a point cloud in e57 format and am looking for a way to efficiently apply a transformation (via rotation matrix and translation). Im playing around with the pye57 package and am aware of the header section in the e57 file format. There is a node called 'pose' which potentially could be modified to apply the transformation without having to read the whole point cloud, but I cant seem to figure out away to actually modify these nodes as they seem to be read only.

Do you have any tips on that? Is there a was to modify those nodes? (in the pye57 description they talk about modifying them, but it doesnt work for me)
And what would be the syntax for that?

Thank you very much,
Stefan

E57_ERROR_PATH_UNDEFINED

I try to extract images from E57 with

    for image_idx, image2D in enumerate(root['images2D']):
[...]
        pinhole = image2D['pinholeRepresentation']

but I'm getting this error :

Traceback (most recent call last):
  File "extract.py", line 56, in <module>
    pinhole = image2D['pinholeRepresentation']
    pye57.libe57.E57Exception: E57 element path well formed but not defined (E57_ERROR_PATH_UNDEFINED)

Any idea about why ?

Error extracting data

Hello,
I am extracting data from differents E57 that has its center about x=100, y=100, z=2000, but when i print the new data at axis z changes to about -2 to 2.
How can I fix it? Can I extract the data as string?
link of an example file: https://gofile.io/d/auwmD3

Thanks!

Plans to implement more robust export functions?

I'm computing the normals of e57 scans based on the scanner head positions, and want to write these new XYZ normals values back to an e57 file.

Are there plans to update the export functionality to support writing custom data?

Thanks

extract image

Hello everyone,

I would like to know if it is possible to extract the images present in the file e57 ?
I tried this:
imf = e57.image_file
root = imf.root()

By I don't have the key "data3d" inside

Absolut path for setup.py

Hey,

first of all thanks for this repo, it's quite handy.

I'm using your code within docker and try to build it like described in the following:

RUN git clone https://github.com/davidcaron/pye57.git --recursive \
    && cd pye57 \
    && python -m pip install . \
    && cd libE57Format \
    && mkdir -p build && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build --parallel \
    && cd build \
    && make install \
    && apt-get -qq clean

Within the python installing part the following error comes up:

Building wheels for collected packages: pye57
  Building wheel for pye57 (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pye57 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      running bdist_wheel
      running build
      running build_py
      running egg_info
      writing src/pye57.egg-info/PKG-INFO
      writing dependency_links to src/pye57.egg-info/dependency_links.txt
      writing requirements to src/pye57.egg-info/requires.txt
      writing top-level names to src/pye57.egg-info/top_level.txt
      reading manifest file 'src/pye57.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'src/pye57.egg-info/SOURCES.txt'
      error: Error: setup script specifies an absolute path:
      
          /pye57/libE57Format/src/BlobNodeImpl.cpp
      
      setup() arguments must *always* be /-separated paths relative to the
      setup.py directory, *never* absolute paths.
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pye57
Failed to build pye57
ERROR: Could not build wheels for pye57, which is required to install pyproject.toml-based projects

As the error states, this is caused by an absolute path specified in a SOURCES.txt (src/pye57.egg-info/SOURCES.txt'). I think it does happen because of the include_package_data=True flag, which is set within the setup.py. Changing the flag does install the package without any problems.

Would it make sense to change the flag?

Extract photo spheres from E57

Hello, I'm trying to export photospheres as jpeg images from E57 file. I saw #4 but it doesn't work.
Do you have a working sample code that explains hox to proceed please ?

Read and Write BlobNodes (Image2D)

Greetings,

I have implemented wrapper functions for reading and writing BlobNodes in my fork of this repo.

I have also added a simple example showing how to extract and display 2D images (the "jpegImage" Blob objects which are part of the pinholeRepresentation of image2D objects).

Would this be of interest to integrate through a PR?

Thank you for your time

Adding panorama image to e57 file

I can't find infomation on adding image to e57 file - I'm aware of the implementation in #15 but fail to find any doumentation on how to add new nodes

Read from BytesIO object

Hello,

It would be great for testing and for cloud applications to be able to read from a BytesIO or similar in-memory object rather than needing to write a file to disk and provide the path as a string.

BlobNode not supported by StructureNode.set() method

Hello,

When trying to embed a spherical image into an e57 file. I noticed that the BlobNode is not supported by StructureNode.set method.

The culprit was libe57_wrapper.cpp in the following lines:

cls_StructureNode.def("set", [](StructureNode &node, const std::string &pathName, StructureNode &n){
        node.set(pathName, n);
    }, "pathName"_a, "n"_a);
    cls_StructureNode.def("set", [](StructureNode &node, const std::string &pathName, VectorNode &n){
        node.set(pathName, n);
    }, "pathName"_a, "n"_a);
    cls_StructureNode.def("set", [](StructureNode &node, const std::string &pathName, CompressedVectorNode &n){
        node.set(pathName, n);
    }, "pathName"_a, "n"_a);
    cls_StructureNode.def("set", [](StructureNode &node, const std::string &pathName, IntegerNode &n){
        node.set(pathName, n);
    }, "pathName"_a, "n"_a);
    cls_StructureNode.def("set", [](StructureNode &node, const std::string &pathName, ScaledIntegerNode &n){
        node.set(pathName, n);
    }, "pathName"_a, "n"_a);
    cls_StructureNode.def("set", [](StructureNode &node, const std::string &pathName, FloatNode &n){
        node.set(pathName, n);
    }, "pathName"_a, "n"_a);
    cls_StructureNode.def("set", [](StructureNode &node, const std::string &pathName, StringNode &n){
        node.set(pathName, n);
    }, "pathName"_a, "n"_a);

as can be seen there is no implementation for BlobNode. I tested adding a BlobNode implementation and rebuilded and this worked

Opening e57 2.3.0 files

Hello, I have the same error message as described below when trying to open files saved with e57LibraryVersion E57Format-2.3.0-AMD 64-windows

#6 (comment)

  File "/usr/local/lib/python3.10/site-packages/pye57/e57.py", line 139, in read_scan_raw
    np_array, buffer = self.make_buffer(field, header.point_count)
  File "/usr/local/lib/python3.10/site-packages/pye57/e57.py", line 114, in make_buffer
     raise ValueError("Unsupported point field: %s" % field_name)
 ValueError: Unsupported point field: nor:normalX

Dependencies: Upgrade Libe57Format to version 3

Version 3 of Libe57Format removes some of the variables used by this wrapper and the line cls_ImageFile.def("extensionsLookupPrefix", &ImageFile::extensionsLookupPrefix, "prefix"_a, "uri"_a); seems to cause an error

      src/pye57/libe57_wrapper.cpp(478): error C2672: 'pybind11::class_<e57::ImageFile>::def' : fonction correspondante surchargée introuvable
      src/pye57/libe57_wrapper.cpp(478): error C2784: 'pybind11::class_<e57::ImageFile> &pybind11::class_<e57::ImageFile>::def(pybind11::detail::initimpl::pickle_factory<Args...> &&,const Extra &...)' : impossible de déduire l'argument modèle pour 'pybind11::detail::initimpl::pickle_factory<Args...> &&' à partir de 'const char [23]'

pye57 installation - xercesc: No such file or directory

Hi,

Problem:
I am working with PyCharm 2019.3.3 professional version, Python 3.8.5 64-bit, Windows 10 and I am trying to install pye57.
I recently installed VS Built Tools 2019 and I have also upgraded my setuptools inside my working virtual environment (not a conda environment).

However, I still get the error below (I have copied and pasted the entire outcome). It seems like file
xercesc/sax2/XMLReaderFactory.hpp
cannot be found.

Any advice would be highly appreciated!

pye57 installation output message:

Collecting pye57
Using cached pye57-0.2.3.tar.gz (159 kB)
Requirement already satisfied: numpy in c:\users\paschalis\documents\2_bedi_consult\venv\lib\site-packages (from pye57) (1.19.2)
Requirement already satisfied: pyquaternion in c:\users\paschalis\documents\2_bedi_consult\venv\lib\site-packages (from pye57) (0.9.9)
Requirement already satisfied: pybind11 in c:\users\paschalis\documents\2_bedi_consult\venv\lib\site-packages (from pye57) (2.6.1)
Using legacy 'setup.py install' for pye57, since package 'wheel' is not installed.
Installing collected packages: pye57
Running setup.py install for pye57: started
Running setup.py install for pye57: finished with status 'error'

DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at pypa/pip#8333.
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Paschalis\Documents\2_bedi_consult\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Paschalis\AppData\Local\Temp\pycharm-packaging\pye57\setup.py'"'"'; file='"'"'C:\Users\Paschalis\AppData\Local\Temp\pycharm-packaging\pye57\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Paschalis\AppData\Local\Temp\pip-record-4bsy69l0\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Paschalis\Documents\2_bedi_consult\venv\include\site\python3.8\pye57'
cwd: C:\Users\Paschalis\AppData\Local\Temp\pycharm-packaging\pye57
Complete output (35 lines):
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\pye57
copying pye57\e57.py -> build\lib.win-amd64-3.8\pye57
copying pye57\exception.py -> build\lib.win-amd64-3.8\pye57
copying pye57\scan_header.py -> build\lib.win-amd64-3.8\pye57
copying pye57\utils.py -> build\lib.win-amd64-3.8\pye57
copying pye57_init_.py -> build\lib.win-amd64-3.8\pye57
copying pye57_version_.py -> build\lib.win-amd64-3.8\pye57
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
building 'pye57.libe57' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\pye57
creating build\temp.win-amd64-3.8\Release\libE57Format
creating build\temp.win-amd64-3.8\Release\libE57Format\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\Scripts\Library\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\lib\site-packages\pybind11\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\lib\site-packages\pybind11\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\include -IC:\Users\Paschalis\AppData\Local\Programs\Python\Python38\include -IC:\Users\Paschalis\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tppye57/libe57_wrapper.cpp /Fobuild\temp.win-amd64-3.8\Release\pye57/libe57_wrapper.obj /EHsc /DVERSION_INFO=\"0.2.3\" /DREVISION_ID=\"pye57-0.2.3\" /DWIN32 /DWINDOWS
libe57_wrapper.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\Scripts\Library\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\lib\site-packages\pybind11\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\lib\site-packages\pybind11\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\include -IC:\Users\Paschalis\AppData\Local\Programs\Python\Python38\include -IC:\Users\Paschalis\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TplibE57Format/src/CheckedFile.cpp /Fobuild\temp.win-amd64-3.8\Release\libE57Format/src/CheckedFile.obj /EHsc /DVERSION_INFO=\"0.2.3\" /DREVISION_ID=\"pye57-0.2.3\" /DWIN32 /DWINDOWS
CheckedFile.cpp
libE57Format/src/CheckedFile.cpp(555): warning C4996: 'unlink': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _unlink. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\Scripts\Library\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\lib\site-packages\pybind11\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\lib\site-packages\pybind11\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\include -IC:\Users\Paschalis\AppData\Local\Programs\Python\Python38\include -IC:\Users\Paschalis\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TplibE57Format/src/Decoder.cpp /Fobuild\temp.win-amd64-3.8\Release\libE57Format/src/Decoder.obj /EHsc /DVERSION_INFO=\"0.2.3\" /DREVISION_ID=\"pye57-0.2.3\" /DWIN32 /DWINDOWS
Decoder.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\Scripts\Library\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\lib\site-packages\pybind11\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\lib\site-packages\pybind11\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\include -IC:\Users\Paschalis\AppData\Local\Programs\Python\Python38\include -IC:\Users\Paschalis\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TplibE57Format/src/E57Foundation.cpp /Fobuild\temp.win-amd64-3.8\Release\libE57Format/src/E57Foundation.obj /EHsc /DVERSION_INFO=\"0.2.3\" /DREVISION_ID=\"pye57-0.2.3\" /DWIN32 /DWINDOWS
E57Foundation.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\Scripts\Library\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\lib\site-packages\pybind11\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\lib\site-packages\pybind11\include -IC:\Users\Paschalis\Documents\2_bedi_consult\venv\include -IC:\Users\Paschalis\AppData\Local\Programs\Python\Python38\include -IC:\Users\Paschalis\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TplibE57Format/src/E57FoundationImpl.cpp /Fobuild\temp.win-amd64-3.8\Release\libE57Format/src/E57FoundationImpl.obj /EHsc /DVERSION_INFO=\"0.2.3\" /DREVISION_ID=\"pye57-0.2.3\" /DWIN32 /DWINDOWS
E57FoundationImpl.cpp
libE57Format/src/E57FoundationImpl.cpp(32): fatal error C1083: Cannot open include file: 'xercesc/sax2/XMLReaderFactory.hpp': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------

ERROR: Command errored out with exit status 1: 'C:\Users\Paschalis\Documents\2_bedi_consult\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Paschalis\AppData\Local\Temp\pycharm-packaging\pye57\setup.py'"'"'; file='"'"'C:\Users\Paschalis\AppData\Local\Temp\pycharm-packaging\pye57\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Paschalis\AppData\Local\Temp\pip-record-4bsy69l0\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Paschalis\Documents\2_bedi_consult\venv\include\site\python3.8\pye57' Check the logs for full command output.

How can I insert my panoramic images in the correct position (in a 3D view) after extracting them from an E57 file?

I have been having trouble finding answers for this. I have extracted images after reading the E57 file. How am I supposed to get the cartesian coordinates for the image (for every pixel perhaps) or project them onto the point cloud? I have spherical representation for the images and the 3D point cloud data is in cartesian coordinates. What information do I need and how am I supposed to use it?

Handle missing cartesianInvalidState

Hello,
It seems that a file without <cartesianInvalidState> cannot be read. Without that xml tag, the following error appears for any input file

File "..." in read_scan
"Consider using 'ignore_missing_fields' to skip it. ValueError: Requested to read a field (cartesianInvalidState) with is absent from the e57 file. Consider using 'ignore_missing_fields' to skip it.

So I retry with

e57 = e57.read_scan(0, ignore_missing_fields = True)

and get

valid = ~data["cartesianInvalidState"].astype("?")
KeyError: 'cartesianInvalidState'

In my final attempt I added a <cartesianInvalidState> entry copied from http://www.libe57.org/example.html. That resulted in a file length header in the header:

pye57.libe57.E57Exception: size in file header not same as actual (57_ERROR_BAD_FILE_LENGTH)

I suggest some extra code to handle files missing <cartesianInvalidState>, for compatibility with Adobe ReCap.
Thanks

ERROR: Could not build wheels for pye57, which is required to install pyproject.toml-based projects

Hey all,

I encountered problems when trying to install the pye57 package in my Python environment. The error messages indicated that the build process failed due to missing dependencies or configuration issues.

The first error indicated that the pye57 package could not build its wheel.
      /Users/lishenyu/pye57/libE57Format/src/E57XmlParser.cpp:32:10: fatal error: 'xercesc/sax2/Attributes.hpp' file not found
      #include <xercesc/sax2/Attributes.hpp>
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pye57

The second error occurred when I tried to install pye57 using the --no-build-isolation flag.
Failed to build pye57
ERROR: Could not build wheels for pye57, which is required to install pyproject.toml-based projects

Do you have any advice on that?

waiting for your help,
yuyu

i.e lots of error code, hope it works

lishenyu@6c7e67cb100b pye57 % python3 -m pip install .

lishenyu@6c7e67cb100b pye57 % pwd
/Users/lishenyu/pye57
lishenyu@6c7e67cb100b pye57 % ls
LICENSE build pyproject.toml setup.py
MANIFEST.in libE57Format requirements-dev.txt src
README.md parse_header.py scripts tests
lishenyu@6c7e67cb100b pye57 % git submodule init
lishenyu@6c7e67cb100b pye57 % git submodule update'
quote>
lishenyu@6c7e67cb100b pye57 % git submodule update
lishenyu@6c7e67cb100b pye57 % python -m pip install .
zsh: command not found: python
lishenyu@6c7e67cb100b pye57 % python3 -m pip install .
Defaulting to user installation because normal site-packages is not writeable
Processing /Users/lishenyu/pye57
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting numpy (from pye57==0.4.5)
Using cached numpy-1.26.4-cp39-cp39-macosx_11_0_arm64.whl.metadata (61 kB)
Collecting pyquaternion (from pye57==0.4.5)
Using cached pyquaternion-0.9.9-py3-none-any.whl.metadata (1.4 kB)
Using cached numpy-1.26.4-cp39-cp39-macosx_11_0_arm64.whl (14.0 MB)
Using cached pyquaternion-0.9.9-py3-none-any.whl (14 kB)
Building wheels for collected packages: pye57
Building wheel for pye57 (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pye57 (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
running bdist_wheel
running build
running build_py
copying src/pye57/exception.py -> build/lib.macosx-10.9-universal2-cpython-39/pye57
copying src/pye57/init.py -> build/lib.macosx-10.9-universal2-cpython-39/pye57
copying src/pye57/version.py -> build/lib.macosx-10.9-universal2-cpython-39/pye57
copying src/pye57/e57.py -> build/lib.macosx-10.9-universal2-cpython-39/pye57
copying src/pye57/utils.py -> build/lib.macosx-10.9-universal2-cpython-39/pye57
copying src/pye57/scan_header.py -> build/lib.macosx-10.9-universal2-cpython-39/pye57
running build_ext
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c flagcheck.cpp -o flagcheck.o -std=c++17
building 'pye57.libe57' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/BlobNode.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/BlobNode.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/BlobNodeImpl.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/BlobNodeImpl.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/CheckedFile.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/CheckedFile.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/Common.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/Common.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/CompressedVectorNode.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/CompressedVectorNode.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/CompressedVectorNodeImpl.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/CompressedVectorNodeImpl.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/CompressedVectorReader.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/CompressedVectorReader.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/CompressedVectorReaderImpl.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/CompressedVectorReaderImpl.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/CompressedVectorWriter.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/CompressedVectorWriter.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/CompressedVectorWriterImpl.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/CompressedVectorWriterImpl.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/DecodeChannel.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/DecodeChannel.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/Decoder.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/Decoder.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/E57Exception.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/E57Exception.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/E57SimpleData.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/E57SimpleData.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/E57SimpleReader.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/E57SimpleReader.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/E57SimpleWriter.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/E57SimpleWriter.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/E57Version.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/E57Version.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -DE57_DLL= -IlibE57Format/include -IlibE57Format/src -IlibE57Format/extern/CRCpp/inc -I/private/var/folders/vw/_zlrv9g91j9c2p691k3nvy8m0000gq/T/pip-build-env-lg2klncn/overlay/lib/python3.9/site-packages/pybind11/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /Users/lishenyu/pye57/libE57Format/src/E57XmlParser.cpp -o build/temp.macosx-10.9-universal2-cpython-39/Users/lishenyu/pye57/libE57Format/src/E57XmlParser.o -std=c++17 -mmacosx-version-min=10.14 -DVERSION_INFO="0.4.5" -DREVISION_ID="pye57-0.4.5" -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable
/Users/lishenyu/pye57/libE57Format/src/E57XmlParser.cpp:32:10: fatal error: 'xercesc/sax2/Attributes.hpp' file not found
#include <xercesc/sax2/Attributes.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pye57
Failed to build pye57
ERROR: Could not build wheels for pye57, which is required to install pyproject.toml-based projects

Reading point data using an other Function than .read_scan(i)

I have a huge point cloud formed of one single scan containing 227 million points. So every time I use the .read_scan() function the code crashed and doesn't load the point cloud at all. I'm wondering if this library offers a way to read the x or y or z coordinates individually or even half a scan perhaps.

Prepare for Libe57Format version 4.0

We have lots of deprecation warnings at the moment - here is a subset generated by a compilation error on line 502:

We need to remove or update these declarations, maintaining backwards compatibility where possible.

      src/pye57/libe57_wrapper.cpp(20): warning C4996: 'e57::E57_BLOB': Will be removed in 4.0. Use TypeBlob.
      src/pye57/libe57_wrapper.cpp(22): warning C4996: 'e57::E57_COMPRESSED_VECTOR': Will be removed in 4.0. Use TypeCompressedVector.
      src/pye57/libe57_wrapper.cpp(24): warning C4996: 'e57::E57_FLOAT': Will be removed in 4.0. Use TypeFloat.
      src/pye57/libe57_wrapper.cpp(26): warning C4996: 'e57::E57_INTEGER': Will be removed in 4.0. Use TypeInteger.
      src/pye57/libe57_wrapper.cpp(28): warning C4996: 'e57::E57_SCALED_INTEGER': Will be removed in 4.0. Use TypeScaledInteger.
      src/pye57/libe57_wrapper.cpp(30): warning C4996: 'e57::E57_STRING': Will be removed in 4.0. Use TypeString.
      src/pye57/libe57_wrapper.cpp(32): warning C4996: 'e57::E57_STRUCTURE': Will be removed in 4.0. Use TypeStructure.
      src/pye57/libe57_wrapper.cpp(34): warning C4996: 'e57::E57_VECTOR': Will be removed in 4.0. Use TypeVector.
      src/pye57/libe57_wrapper.cpp(79): warning C4996: 'e57::E57_STRUCTURE': Will be removed in 4.0. Use TypeStructure.
      src/pye57/libe57_wrapper.cpp(80): warning C4996: 'e57::E57_VECTOR': Will be removed in 4.0. Use TypeVector.
      src/pye57/libe57_wrapper.cpp(81): warning C4996: 'e57::E57_COMPRESSED_VECTOR': Will be removed in 4.0. Use TypeCompressedVector.
      src/pye57/libe57_wrapper.cpp(82): warning C4996: 'e57::E57_INTEGER': Will be removed in 4.0. Use TypeInteger.
      src/pye57/libe57_wrapper.cpp(83): warning C4996: 'e57::E57_SCALED_INTEGER': Will be removed in 4.0. Use TypeScaledInteger.
      src/pye57/libe57_wrapper.cpp(84): warning C4996: 'e57::E57_FLOAT': Will be removed in 4.0. Use TypeFloat.
      src/pye57/libe57_wrapper.cpp(85): warning C4996: 'e57::E57_STRING': Will be removed in 4.0. Use TypeString.
      src/pye57/libe57_wrapper.cpp(86): warning C4996: 'e57::E57_BLOB': Will be removed in 4.0. Use TypeBlob.
      src/pye57/libe57_wrapper.cpp(89): warning C4996: 'e57::E57_SINGLE': Will be removed in 4.0. Use PrecisionSingle.
      src/pye57/libe57_wrapper.cpp(90): warning C4996: 'e57::E57_DOUBLE': Will be removed in 4.0. Use PrecisionDouble.
      src/pye57/libe57_wrapper.cpp(93): warning C4996: 'e57::E57_INT8': Will be removed in 4.0. Use Int8.
      src/pye57/libe57_wrapper.cpp(94): warning C4996: 'e57::E57_UINT8': Will be removed in 4.0. Use UInt8.
      src/pye57/libe57_wrapper.cpp(95): warning C4996: 'e57::E57_INT16': Will be removed in 4.0. Use Int16.
      src/pye57/libe57_wrapper.cpp(96): warning C4996: 'e57::E57_UINT16': Will be removed in 4.0. Use UInt16.
      src/pye57/libe57_wrapper.cpp(97): warning C4996: 'e57::E57_INT32': Will be removed in 4.0. Use Int32.
      src/pye57/libe57_wrapper.cpp(98): warning C4996: 'e57::E57_UINT32': Will be removed in 4.0. Use UInt32.
      src/pye57/libe57_wrapper.cpp(99): warning C4996: 'e57::E57_INT64': Will be removed in 4.0. Use Int64.
      src/pye57/libe57_wrapper.cpp(100): warning C4996: 'e57::E57_BOOL': Will be removed in 4.0. Use Bool.
      src/pye57/libe57_wrapper.cpp(101): warning C4996: 'e57::E57_REAL32': Will be removed in 4.0. Use Real32.
      src/pye57/libe57_wrapper.cpp(102): warning C4996: 'e57::E57_REAL64': Will be removed in 4.0. Use Real64.
      src/pye57/libe57_wrapper.cpp(103): warning C4996: 'e57::E57_USTRING': Will be removed in 4.0. Use UString.
      src/pye57/libe57_wrapper.cpp(106): warning C4996: 'e57::E57_SUCCESS': Will be removed in 4.0. Use Success.
      src/pye57/libe57_wrapper.cpp(107): warning C4996: 'e57::E57_ERROR_BAD_CV_HEADER': Will be removed in 4.0. Use ErrorBadCVHeader.
      src/pye57/libe57_wrapper.cpp(108): warning C4996: 'e57::E57_ERROR_BAD_CV_PACKET': Will be removed in 4.0. Use ErrorBadCVPacket.
      src/pye57/libe57_wrapper.cpp(109): warning C4996: 'e57::E57_ERROR_CHILD_INDEX_OUT_OF_BOUNDS': Will be removed in 4.0. Use ErrorChildIndexOutOfBounds.
      src/pye57/libe57_wrapper.cpp(110): warning C4996: 'e57::E57_ERROR_SET_TWICE': Will be removed in 4.0. Use ErrorSetTwice.
      src/pye57/libe57_wrapper.cpp(111): warning C4996: 'e57::E57_ERROR_HOMOGENEOUS_VIOLATION': Will be removed in 4.0. Use ErrorHomogeneousViolation.
      src/pye57/libe57_wrapper.cpp(112): warning C4996: 'e57::E57_ERROR_VALUE_NOT_REPRESENTABLE': Will be removed in 4.0. Use ErrorValueNotRepresentable.
      src/pye57/libe57_wrapper.cpp(113): warning C4996: 'e57::E57_ERROR_SCALED_VALUE_NOT_REPRESENTABLE': Will be removed in 4.0. Use ErrorScaledValueNotRepresentable.
      src/pye57/libe57_wrapper.cpp(114): warning C4996: 'e57::E57_ERROR_REAL64_TOO_LARGE': Will be removed in 4.0. Use ErrorReal64TooLarge.
      src/pye57/libe57_wrapper.cpp(115): warning C4996: 'e57::E57_ERROR_EXPECTING_NUMERIC': Will be removed in 4.0. Use ErrorExpectingNumeric.
      src/pye57/libe57_wrapper.cpp(116): warning C4996: 'e57::E57_ERROR_EXPECTING_USTRING': Will be removed in 4.0. Use ErrorExpectingUString.
      src/pye57/libe57_wrapper.cpp(117): warning C4996: 'e57::E57_ERROR_INTERNAL': Will be removed in 4.0. Use ErrorInternal.
      src/pye57/libe57_wrapper.cpp(118): warning C4996: 'e57::E57_ERROR_BAD_XML_FORMAT': Will be removed in 4.0. Use ErrorBadXMLFormat.
      src/pye57/libe57_wrapper.cpp(119): warning C4996: 'e57::E57_ERROR_XML_PARSER': Will be removed in 4.0. Use ErrorXMLParser.
      src/pye57/libe57_wrapper.cpp(120): warning C4996: 'e57::E57_ERROR_BAD_API_ARGUMENT': Will be removed in 4.0. Use ErrorBadAPIArgument.
      src/pye57/libe57_wrapper.cpp(121): warning C4996: 'e57::E57_ERROR_FILE_IS_READ_ONLY': Will be removed in 4.0. Use ErrorFileReadOnly.
      src/pye57/libe57_wrapper.cpp(122): warning C4996: 'e57::E57_ERROR_BAD_CHECKSUM': Will be removed in 4.0. Use ErrorBadChecksum.
      src/pye57/libe57_wrapper.cpp(123): warning C4996: 'e57::E57_ERROR_OPEN_FAILED': Will be removed in 4.0. Use ErrorOpenFailed.
      src/pye57/libe57_wrapper.cpp(124): warning C4996: 'e57::E57_ERROR_CLOSE_FAILED': Will be removed in 4.0. Use ErrorCloseFailed.
      src/pye57/libe57_wrapper.cpp(125): warning C4996: 'e57::E57_ERROR_READ_FAILED': Will be removed in 4.0. Use ErrorReadFailed.
      src/pye57/libe57_wrapper.cpp(126): warning C4996: 'e57::E57_ERROR_WRITE_FAILED': Will be removed in 4.0. Use ErrorWriteFailed.
      src/pye57/libe57_wrapper.cpp(127): warning C4996: 'e57::E57_ERROR_LSEEK_FAILED': Will be removed in 4.0. Use ErrorSeekFailed.
      src/pye57/libe57_wrapper.cpp(128): warning C4996: 'e57::E57_ERROR_PATH_UNDEFINED': Will be removed in 4.0. Use ErrorPathUndefined.
      src/pye57/libe57_wrapper.cpp(129): warning C4996: 'e57::E57_ERROR_BAD_BUFFER': Will be removed in 4.0. Use ErrorBadBuffer.
      src/pye57/libe57_wrapper.cpp(130): warning C4996: 'e57::E57_ERROR_NO_BUFFER_FOR_ELEMENT': Will be removed in 4.0. Use ErrorNoBufferForElement.
      src/pye57/libe57_wrapper.cpp(131): warning C4996: 'e57::E57_ERROR_BUFFER_SIZE_MISMATCH': Will be removed in 4.0. Use ErrorBufferSizeMismatch.
      src/pye57/libe57_wrapper.cpp(132): warning C4996: 'e57::E57_ERROR_BUFFER_DUPLICATE_PATHNAME': Will be removed in 4.0. Use ErrorBufferDuplicatePathName.
      src/pye57/libe57_wrapper.cpp(133): warning C4996: 'e57::E57_ERROR_BAD_FILE_SIGNATURE': Will be removed in 4.0. Use ErrorBadFileSignature.
      src/pye57/libe57_wrapper.cpp(134): warning C4996: 'e57::E57_ERROR_UNKNOWN_FILE_VERSION': Will be removed in 4.0. Use ErrorUnknownFileVersion.
      src/pye57/libe57_wrapper.cpp(135): warning C4996: 'e57::E57_ERROR_BAD_FILE_LENGTH': Will be removed in 4.0. Use ErrorBadFileLength.
      src/pye57/libe57_wrapper.cpp(136): warning C4996: 'e57::E57_ERROR_XML_PARSER_INIT': Will be removed in 4.0. Use ErrorXMLParserInit.
      src/pye57/libe57_wrapper.cpp(137): warning C4996: 'e57::E57_ERROR_DUPLICATE_NAMESPACE_PREFIX': Will be removed in 4.0. Use ErrorDuplicateNamespacePrefix.
      src/pye57/libe57_wrapper.cpp(138): warning C4996: 'e57::E57_ERROR_DUPLICATE_NAMESPACE_URI': Will be removed in 4.0. Use ErrorDuplicateNamespaceURI.
      src/pye57/libe57_wrapper.cpp(139): warning C4996: 'e57::E57_ERROR_BAD_PROTOTYPE': Will be removed in 4.0. Use ErrorBadPrototype.
      src/pye57/libe57_wrapper.cpp(140): warning C4996: 'e57::E57_ERROR_BAD_CODECS': Will be removed in 4.0. Use ErrorBadCodecs.
      src/pye57/libe57_wrapper.cpp(141): warning C4996: 'e57::E57_ERROR_VALUE_OUT_OF_BOUNDS': Will be removed in 4.0. Use ErrorValueOutOfBounds.
      src/pye57/libe57_wrapper.cpp(142): warning C4996: 'e57::E57_ERROR_CONVERSION_REQUIRED': Will be removed in 4.0. Use ErrorConversionRequired.
      src/pye57/libe57_wrapper.cpp(143): warning C4996: 'e57::E57_ERROR_BAD_PATH_NAME': Will be removed in 4.0. Use ErrorBadPathName.
      src/pye57/libe57_wrapper.cpp(144): warning C4996: 'e57::E57_ERROR_NOT_IMPLEMENTED': Will be removed in 4.0. Use ErrorNotImplemented.
      src/pye57/libe57_wrapper.cpp(145): warning C4996: 'e57::E57_ERROR_BAD_NODE_DOWNCAST': Will be removed in 4.0. Use ErrorBadNodeDowncast.
      src/pye57/libe57_wrapper.cpp(146): warning C4996: 'e57::E57_ERROR_WRITER_NOT_OPEN': Will be removed in 4.0. Use ErrorWriterNotOpen.
      src/pye57/libe57_wrapper.cpp(147): warning C4996: 'e57::E57_ERROR_READER_NOT_OPEN': Will be removed in 4.0. Use ErrorReaderNotOpen.
      src/pye57/libe57_wrapper.cpp(148): warning C4996: 'e57::E57_ERROR_NODE_UNATTACHED': Will be removed in 4.0. Use ErrorNodeUnattached.
      src/pye57/libe57_wrapper.cpp(149): warning C4996: 'e57::E57_ERROR_ALREADY_HAS_PARENT': Will be removed in 4.0. Use ErrorAlreadyHasParent.
      src/pye57/libe57_wrapper.cpp(150): warning C4996: 'e57::E57_ERROR_DIFFERENT_DEST_IMAGEFILE': Will be removed in 4.0. Use ErrorDifferentDestImageFile.
      src/pye57/libe57_wrapper.cpp(151): warning C4996: 'e57::E57_ERROR_IMAGEFILE_NOT_OPEN': Will be removed in 4.0. Use ErrorImageFileNotOpen.
      src/pye57/libe57_wrapper.cpp(152): warning C4996: 'e57::E57_ERROR_BUFFERS_NOT_COMPATIBLE': Will be removed in 4.0. Use ErrorBuffersNotCompatible.
      src/pye57/libe57_wrapper.cpp(153): warning C4996: 'e57::E57_ERROR_TOO_MANY_WRITERS': Will be removed in 4.0. Use ErrorTooManyWriters.
      src/pye57/libe57_wrapper.cpp(154): warning C4996: 'e57::E57_ERROR_TOO_MANY_READERS': Will be removed in 4.0. Use ErrorTooManyReaders.
      src/pye57/libe57_wrapper.cpp(155): warning C4996: 'e57::E57_ERROR_BAD_CONFIGURATION': Will be removed in 4.0. Use ErrorBadConfiguration.
      src/pye57/libe57_wrapper.cpp(156): warning C4996: 'e57::E57_ERROR_INVARIANCE_VIOLATION': Will be removed in 4.0. Use ErrorInvarianceViolation.
      src/pye57/libe57_wrapper.cpp(403): warning C4996: 'e57::E57_DOUBLE': Will be removed in 4.0. Use PrecisionDouble.
      src/pye57/libe57_wrapper.cpp(54): warning C4996: 'e57::CHECKSUM_POLICY_NONE': Will be removed in 4.0. Use ChecksumPolicy::ChecksumNone.
      src/pye57/libe57_wrapper.cpp(55): warning C4996: 'e57::CHECKSUM_POLICY_SPARSE': Will be removed in 4.0. Use ChecksumPolicy::ChecksumSparse.
      src/pye57/libe57_wrapper.cpp(56): warning C4996: 'e57::CHECKSUM_POLICY_HALF': Will be removed in 4.0. Use ChecksumPolicy::ChecksumHalf.
      src/pye57/libe57_wrapper.cpp(57): warning C4996: 'e57::CHECKSUM_POLICY_ALL': Will be removed in 4.0. Use ChecksumPolicy::ChecksumAll.
      src/pye57/libe57_wrapper.cpp(491): warning C4996: 'e57::CHECKSUM_POLICY_ALL': Will be removed in 4.0. Use ChecksumPolicy::ChecksumAll.

Trouble reading a e57 file containing multiple scans

I am trying to read e57 files containing multiple scans. My idea is to read every scan from the file, apply the rotation, subsample everything then save as a single file with Open3D. Sadly, though, the fused pointcloud seems to be all wrong, and I imagine it is a problem related to the rotation itself (for reference, CloudCompare works correctly on my files).

Here's what I'm doing:

import numpy as np
from pathlib import Path
import pye57
import open3d as o3d
from open3d.geometry import PointCloud
from open3d.utility import Vector3dVector

#%% Parameters and input
datafile = Path("../../Data/datafile.e57")
factor = 50

#%% Assembling every scan into a data dict
e57 = pye57.E57(datafile.as_posix()) # creating once to get number of scans
N = len(e57.data3d)

def get_scan(datafile, idx, factor):

    data = e57.read_scan_raw(idx)
    # data = e57.read_scan(idx, colors=True)
    header = e57.get_header(idx)
    
    points = np.array([
        data['cartesianX'][::factor],
        data['cartesianY'][::factor],
        data['cartesianZ'][::factor]]).T
    
    colors = np.array([
        data['colorRed'][::factor],
        data['colorGreen'][::factor],
        data['colorBlue'][::factor]]).T / 255
    
    rotation = header.rotation_matrix
    translation = header.translation

    print(f'Scan number {idx}, done!')

    return points, colors, rotation, translation
    
    
#%% Process scans into Open3D pointclouds
pcds = []
for i in range(N):
    points, colors, rotation, translation = get_scan(datafile, i, factor)
    
    # Creating a Open3D pointcloud
    pcd = PointCloud()
    pcd.points = Vector3dVector(points)
    pcd.colors = Vector3dVector(colors)
    
    transformation = np.eye(4)
    transformation[:3, :3] = rotation
    transformation[:3, -1] = translation
    
    # Apply transformation
    pcd.transform(transformation)
    
    pcds.append(pcd)

o3d.visualization.draw_geometries(pcds)

I also tried using the PointCloud.rotate and PointCloud.translate methods instead of PointCloud.transform, did not help much though.

Point field support

After exporting an e57 file from CloudCompare, I noticed some extra point fields that are not in the SUPPORTED_POINT_FIELDS dictionary. I don't know if CloudCompare is just writing non-standard field names, or if they were just missed in the dictionary. Is there an official list of point fields for the e57 format?

The field names that it creates are: "nor:normalX", "nor:normalY", and "nor:normalZ"

I've added the fields locally for now, but our tool chain pulls repos from pypi, so long term it would be much easier if they were included here. However, if they aren't standard fields then of course they shouldn't be.

Bad file signature while reading E57 written with pye57

I am writing an E57 file using pye57.write_scan_raw() and I can load this e57 file in BIM Collab and Cloud Compare.

If i try to read back the same e57 file, there is an error about the file signature not being ASTM-E57.

e57_write = pye57.E57("sample.e57", mode='w')
e57_write.write_scan_raw(data_sample,  translation=scan_0_tra ) # I can load the this E57 file in BIM Collab and Cloud Compare

# read back written e57
e57new = pye57.E57("sample.e57", mode='r')

This last line throws an error. The error messages are:

e57new = pye57.E57("sample.e57", mode="r")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\vtk1\Lib\site-packages\pye57\e57.py", line 66, in init
raise e
File "C:\ProgramData\anaconda3\envs\vtk1\Lib\site-packages\pye57\e57.py", line 57, in init
self.image_file = libe57.ImageFile(path, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pye57.libe57.E57Exception: file signature not ASTM-E57 (E57_ERROR_BAD_FILE_SIGNATURE)

Is there something I am not passing to write_scan_raw or not passing while calling pye57.E57 to read the written file?.

Thanks
Rajagopal

E57 element path well formed but not defined (ErrorPathUndefined)

I had the error
File ".venv\lib\site-packages\pye57\e57.py", line 214, in read_scan xyz = self.to_global(xyz, header.rotation, header.translation) File ".venv\lib\site-packages\pye57\scan_header.py", line 32, in rotation q = Quaternion([e.value() for e in self.node["pose"]["rotation"]]) pye57.libe57.E57Exception: E57 element path well formed but not defined (ErrorPathUndefined)
for e57 files created from Recap and also the downloaded e57 sample file Trimble Data - Muliple Scans point cloud from libe57
Does anybody know this topic?

setup.py stops

In Ubuntu 18.04.2 LTS on AWS, when I run pip install pye57 , there is a problem that I can not proceed from setup.py. It runs in the environment of Python 3.7 built on Anaconda.

~$ pip install pye57
Collecting pye57
  Using cached https://files.pythonhosted.org/packages/66/37/bc000ec2bc87afcd7b90a2b9ff772aafcfcfb2d91d11e74fd64439e2c3aa/pye57-0.2.3.tar.gz
Requirement already satisfied: numpy in ./anaconda3/envs/kajima/lib/python3.7/site-packages (from pye57) (1.16.4)
Requirement already satisfied: pyquaternion in ./anaconda3/envs/kajima/lib/python3.7/site-packages (from pye57) (0.9.5)
Requirement already satisfied: pybind11 in ./anaconda3/envs/kajima/lib/python3.7/site-packages (from pye57) (2.2.4)
Building wheels for collected packages: pye57
  Building wheel for pye57 (setup.py) ... 

pip3 install failed on ubuntu 16.04

On a machine with Ubuntu 16.04 I got this error trying to install pye57:

sudo -H pip3 install pye57
Collecting pye57
  Downloading https://files.pythonhosted.org/packages/66/37/bc000ec2bc87afcd7b90a2b9ff772aafcfcfb2d91d11e74fd64439e2c3aa/pye57-0.2.3.tar.gz (159kB)
    100% |████████████████████████████████| 163kB 2.6MB/s 
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/lib/python3.5/dist-packages (from pye57)
Requirement already satisfied (use --upgrade to upgrade): pyquaternion in /usr/local/lib/python3.5/dist-packages (from pye57)
Requirement already satisfied (use --upgrade to upgrade): pybind11 in /usr/local/lib/python3.5/dist-packages (from pye57)
Installing collected packages: pye57
  Running setup.py install for pye57 ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t119ypj9/pye57/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4l1hrohj-record/install-record.txt --single-version-externally-managed --compile:
    /usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    /usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/pye57
    copying pye57/utils.py -> build/lib.linux-x86_64-3.5/pye57
    copying pye57/exception.py -> build/lib.linux-x86_64-3.5/pye57
    copying pye57/__init__.py -> build/lib.linux-x86_64-3.5/pye57
    copying pye57/scan_header.py -> build/lib.linux-x86_64-3.5/pye57
    copying pye57/__version__.py -> build/lib.linux-x86_64-3.5/pye57
    copying pye57/e57.py -> build/lib.linux-x86_64-3.5/pye57
    running build_ext
    creating tmp
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c /tmp/tmp7l0et_uh.cpp -o tmp/tmp7l0et_uh.o -std=c++14
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c /tmp/tmpter4mm1w.cpp -o tmp/tmpter4mm1w.o -fvisibility=hidden
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    building 'pye57.libe57' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/pye57
    creating build/temp.linux-x86_64-3.5/libE57Format
    creating build/temp.linux-x86_64-3.5/libE57Format/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -I/usr/include/python3.5m -I/usr/local/include/python3.5 -I/home/micheleclaus/.local/include/python3.5m -I/usr/include/python3.5m -c pye57/libe57_wrapper.cpp -o build/temp.linux-x86_64-3.5/pye57/libe57_wrapper.o -DLINUX -DVERSION_INFO="0.2.3" -DREVISION_ID="pye57-0.2.3" -std=c++14 -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable -fvisibility=hidden
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    pye57/libe57_wrapper.cpp: In function ‘auto cast_node(e57::Node&)’:
    pye57/libe57_wrapper.cpp:34:1: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -I/usr/include/python3.5m -I/usr/local/include/python3.5 -I/home/micheleclaus/.local/include/python3.5m -I/usr/include/python3.5m -c libE57Format/src/CheckedFile.cpp -o build/temp.linux-x86_64-3.5/libE57Format/src/CheckedFile.o -DLINUX -DVERSION_INFO="0.2.3" -DREVISION_ID="pye57-0.2.3" -std=c++14 -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable -fvisibility=hidden
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -I/usr/include/python3.5m -I/usr/local/include/python3.5 -I/home/micheleclaus/.local/include/python3.5m -I/usr/include/python3.5m -c libE57Format/src/Decoder.cpp -o build/temp.linux-x86_64-3.5/libE57Format/src/Decoder.o -DLINUX -DVERSION_INFO="0.2.3" -DREVISION_ID="pye57-0.2.3" -std=c++14 -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable -fvisibility=hidden
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -I/usr/include/python3.5m -I/usr/local/include/python3.5 -I/home/micheleclaus/.local/include/python3.5m -I/usr/include/python3.5m -c libE57Format/src/E57Foundation.cpp -o build/temp.linux-x86_64-3.5/libE57Format/src/E57Foundation.o -DLINUX -DVERSION_INFO="0.2.3" -DREVISION_ID="pye57-0.2.3" -std=c++14 -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable -fvisibility=hidden
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -I/usr/include/python3.5m -I/usr/local/include/python3.5 -I/home/micheleclaus/.local/include/python3.5m -I/usr/include/python3.5m -c libE57Format/src/E57FoundationImpl.cpp -o build/temp.linux-x86_64-3.5/libE57Format/src/E57FoundationImpl.o -DLINUX -DVERSION_INFO="0.2.3" -DREVISION_ID="pye57-0.2.3" -std=c++14 -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable -fvisibility=hidden
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    libE57Format/src/E57FoundationImpl.cpp: In member function ‘uint64_t e57::CompressedVectorReaderImpl::earliestPacketNeededForInput() const’:
    libE57Format/src/E57FoundationImpl.cpp:4961:14: warning: variable ‘earliestChannel’ set but not used [-Wunused-but-set-variable]
         unsigned earliestChannel = 0;
                  ^
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -IlibE57Format/include -IlibE57Format/src -IlibE57Format/contrib/CRCpp/inc -I/usr/include/python3.5m -I/usr/local/include/python3.5 -I/home/micheleclaus/.local/include/python3.5m -I/usr/include/python3.5m -c libE57Format/src/E57XmlParser.cpp -o build/temp.linux-x86_64-3.5/libE57Format/src/E57XmlParser.o -DLINUX -DVERSION_INFO="0.2.3" -DREVISION_ID="pye57-0.2.3" -std=c++14 -DCRCPP_USE_CPP11 -DCRCPP_BRANCHLESS -Wno-unused-variable -fvisibility=hidden
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    libE57Format/src/E57XmlParser.cpp:92:13: error: ‘XMLFilePos’ does not name a type
         virtual XMLFilePos      curPos() const {return(logicalPosition_);}
                 ^
    libE57Format/src/E57XmlParser.cpp: In member function ‘virtual xercesc_2_8::BinInputStream* e57::E57FileInputSource::makeStream() const’:
    libE57Format/src/E57XmlParser.cpp:166:69: error: invalid new-expression of abstract class type ‘E57FileInputStream’
         return new E57FileInputStream(cf_, logicalStart_, logicalLength_);
                                                                         ^
    libE57Format/src/E57XmlParser.cpp:87:7: note:   because the following virtual functions are pure within ‘E57FileInputStream’:
     class E57FileInputStream : public BinInputStream
           ^
    In file included from libE57Format/src/E57XmlParser.cpp:30:0:
    /usr/include/xercesc/util/BinInputStream.hpp:41:26: note: 	virtual unsigned int xercesc_2_8::BinInputStream::curPos() const
         virtual unsigned int curPos() const = 0;
                              ^
    /usr/include/xercesc/util/BinInputStream.hpp:43:26: note: 	virtual unsigned int xercesc_2_8::BinInputStream::readBytes(XMLByte*, unsigned int)
         virtual unsigned int readBytes
                              ^
    libE57Format/src/E57XmlParser.cpp: In member function ‘e57::ustring e57::E57XmlParser::toUString(const XMLCh*)’:
    libE57Format/src/E57XmlParser.cpp:818:9: error: ‘TranscodeToStr’ was not declared in this scope
             TranscodeToStr UTF8Transcoder(xml_str, "UTF-8");
             ^
    libE57Format/src/E57XmlParser.cpp:819:56: error: ‘UTF8Transcoder’ was not declared in this scope
             u_str  = ustring(reinterpret_cast<const char*>(UTF8Transcoder.str()));
                                                            ^
    libE57Format/src/E57XmlParser.cpp: In member function ‘e57::ustring e57::E57XmlParser::lookupAttribute(const xercesc_2_8::Attributes&, const XMLCh*)’:
    libE57Format/src/E57XmlParser.cpp:827:56: error: invalid conversion from ‘XMLSize_t {aka long unsigned int}’ to ‘const XMLCh* {aka const short unsigned int*}’ [-fpermissive]
         if (!attributes.getIndex(attribute_name, attr_index))
                                                            ^
    In file included from libE57Format/src/E57XmlParser.cpp:27:0:
    /usr/include/xercesc/sax2/Attributes.hpp:211:14: note:   initializing argument 2 of ‘virtual int xercesc_2_8::Attributes::getIndex(const XMLCh*, const XMLCh*) const’
      virtual int getIndex(const XMLCh* const uri, const XMLCh* const localPart ) const = 0 ;
                  ^
    libE57Format/src/E57XmlParser.cpp: In member function ‘bool e57::E57XmlParser::isAttributeDefined(const xercesc_2_8::Attributes&, const XMLCh*)’:
    libE57Format/src/E57XmlParser.cpp:835:58: error: invalid conversion from ‘XMLSize_t {aka long unsigned int}’ to ‘const XMLCh* {aka const short unsigned int*}’ [-fpermissive]
         return(attributes.getIndex(attribute_name, attr_index));
                                                              ^
    In file included from libE57Format/src/E57XmlParser.cpp:27:0:
    /usr/include/xercesc/sax2/Attributes.hpp:211:14: note:   initializing argument 2 of ‘virtual int xercesc_2_8::Attributes::getIndex(const XMLCh*, const XMLCh*) const’
      virtual int getIndex(const XMLCh* const uri, const XMLCh* const localPart ) const = 0 ;
                  ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t119ypj9/pye57/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4l1hrohj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-t119ypj9/pye57/
You are using pip version 8.1.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.