python.e57文件读写器

pye57的Python项目详细描述


PYE57

PyPIPyPI - Python VersionAppVeyorTravis

python包装LibE57Format来读写.e57点云文件

示例用法

importnumpyasnpimportpye57e57=pye57.E57("e57_file.e57")# read scan at index 0data=e57.read_scan(0)# 'data' is a dictionary with the point types as keysassertisinstance(data["cartesianX"],np.ndarray)assertisinstance(data["cartesianY"],np.ndarray)assertisinstance(data["cartesianZ"],np.ndarray)# other attributes can be read using:data=e57.read_scan(0,intensity=True,colors=True,row_column=True)assertisinstance(data["cartesianX"],np.ndarray)assertisinstance(data["cartesianY"],np.ndarray)assertisinstance(data["cartesianZ"],np.ndarray)assertisinstance(data["intensity"],np.ndarray)assertisinstance(data["colorRed"],np.ndarray)assertisinstance(data["colorGreen"],np.ndarray)assertisinstance(data["colorBlue"],np.ndarray)assertisinstance(data["rowIndex"],np.ndarray)assertisinstance(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 nowe57_write=pye57.E57("e57_file_write.e57",mode='w')e57_write.write_scan_raw(data_raw)# you can specify a header to copy information frome57_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:forlineinheader.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 pythonimf=e57.image_fileroot=imf.root()data3d=root["data3D"]scan_0=data3d[0]translation_x=scan_0["pose"]["translation"]["x"]

安装

pip install pye57

如果您在windows上使用python 3.5或3.6,则可以使用控制盘。

否则,请参阅下面的建筑注释。

建筑注释

窗口

xerces-c的二进制文件可以从conda获得,使用:conda install xerces-c

Linux

在安装之前安装libxerces-c-dev。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何将向量的内容从一个包发送到另一个包?   java无法扩展类并对ArrayList进行排序   java无法对字符串的ArrayList进行排序   JavaP:ajax更改事件请求返回500错误   java如何为TableHeader使用渲染器   带有记号的java JSlider问题   Java如何在不同的类中调用add()方法   java如何使用JDBC和HSQLDB检索以前自动生成的PK ID值   java如何使dropwizard应用程序在启动完成之前忽略所有调用   使用MethodValidationPostProcessor进行java Spring验证   java Mediaplayer错误(19 0)不适用于release()   java UnsatifiedPendencyException Swigger2+Sringboot+@RestClientTest   java如何从onActivityResult更新回收器视图元素   java基于图像添加地板或如何优化已有方法   jComboBox的java奇怪行为   java从数据库表php中提取信息   Android-sqlite更新方法;JAVAlang.IllegalStateException:无法执行活动的方法   java如何将多个XSD文件合并到一个XSD文件?   java在不使用大多数API的情况下消除空格