Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for binary PLY files #588

Merged
merged 10 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/build-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
fail-fast: false
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11']
os:
os:
# - windows-2019 cannot compile on Windows
# (!) TODO: The workflow contains code for Windows building, but we cannot compile it with MS MPI. Changes in the source code are needed.

- ubuntu-20.04

permissions:
contents: write

runs-on: ${{ matrix.os }}

steps:
Expand All @@ -54,23 +54,23 @@ jobs:
run: |
echo "BOOST_DIR=boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}" >> $GITHUB_ENV
echo "BOOST_VERSION=${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}" >> $GITHUB_ENV

- name: Init env variable on Linux
if: ${{ runner.os == 'Linux' }}
run: |
run: |
echo "BOOST_ARCHIVE_NAME=${{ env.BOOST_DIR }}.7z" >> $GITHUB_ENV

- name: Init base env variable on Windows
if: ${{ runner.os == 'Windows' }}
run: |
echo "BOOST_DIR=boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "BOOST_VERSION=${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Init env variable on Windows
if: ${{ runner.os == 'Windows' }}
run: |
run: |
echo "BOOST_ARCHIVE_NAME=${{ env.BOOST_DIR }}.zip" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Cache boost
id: cache-boost
if: ${{ runner.os == 'Linux' }}
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
with:
path: ${{ env.PYBIND11_INSTALL_PATH }}
key: ${{ runner.os }}-pybind11-cache--${{ env.PYBIND11_VERSION }}-python-${{ matrix.python_version }}

- name: Make dirs on Linux
if: ${{ runner.os == 'Linux' }}
run: |
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
run: |
python -m pip install -U 'pip>=23.0'
pip install 'numpy>=1.20' wheel 'setuptools>=61.0' 'build~=0.10'

- name: Install dependencies on Windows
if: ${{ runner.os == 'Windows' }}
run: |
Expand Down Expand Up @@ -229,7 +229,7 @@ jobs:
run: |
git clone -b ${{ env.PYBIND11_VERSION }} --single-branch https://github.com/pybind/pybind11.git


- name: Install pybind11 ${{ env.PYBIND11_VERSION }} on Linux
working-directory: ${{ env.PYBIND11_SRC_DIR }}
if: ${{ steps.cache-pybind11.outputs.cache-hit != 'true' && runner.os == 'Linux' }}
Expand All @@ -242,7 +242,7 @@ jobs:
-S . -B ./build
cmake --build ./build --target install
rm -r ./build

- name: Install pybind11 ${{ env.PYBIND11_VERSION }} on Windows
working-directory: ${{ env.PYBIND11_SRC_DIR }}
if: ${{ steps.cache-pybind11.outputs.cache-hit != 'true' && runner.os == 'Windows' }}
Expand Down Expand Up @@ -288,7 +288,7 @@ jobs:
-DCMAKE_BUILD_TYPE="RelWithDebInfo" `
-S . -B ${{ env.BUILD_DIR }}
cmake --build ${{ env.BUILD_DIR }} --target install

- name: Build python wheel
working-directory: ./python
run: |
Expand All @@ -298,7 +298,7 @@ jobs:
working-directory: ./python
run: |
pip install ${{ env.PYTHON_WHEEL_DIR }}/*.whl

- name: Test import
working-directory: ${{ runner.temp }}
run: python -c "from pypointmatcher import *"
Expand Down
12 changes: 6 additions & 6 deletions doc/ImportExport.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ There exists a myriad of [graphics file formats](http://en.wikipedia.org/wiki/Ca

## Table of Supported File Formats

| File Type | Extension | Versions Supported | Descriptors Supported | Additional Information |
| --------- |:---------:|:------------------:|:---------------------:|---------|
| Comma Separated Values | .csv | NA | yes (see [table of descriptor labels](#descmaptable)) | |
| Visualization Toolkit Files | .vtk | Legacy format versions 3.0 and lower (ASCII only) | yes | Only polydata and unstructured grid VTK Datatypes supported. More information can be found [here](http://www.vtk.org/VTK/img/file-formats.pdf).|
| Polygon File Format | .ply | 1.0 (ASCII only) | yes (see [table of descriptor labels](#descmaptable)) | |
| Point Cloud Library Format | .pcd | 0.7 (ASCII only) | yes (see [table of descriptor labels](#descmaptable)) | |
| File Type | Extension | Versions Supported | Descriptors Supported | Additional Information |
| --------- |:---------:|:-------------------------------------------------:|:---------------------:|---------------------------------------------------------------------------------------------------------------------------------------------------|
| Comma Separated Values | .csv | NA | yes (see [table of descriptor labels](#descmaptable)) | |
| Visualization Toolkit Files | .vtk | Legacy format versions 3.0 and lower (ASCII only) | yes | Only polydata and unstructured grid VTK Datatypes supported. More information can be found [here](http://www.vtk.org/VTK/img/file-formats.pdf). |
| Polygon File Format | .ply | 1.0 (ASCII and binary) | yes (see [table of descriptor labels](#descmaptable)) | Users are encouraged to execute `libpointmatcher` using `double` as the floating precision format to prevent overflows. |
| Point Cloud Library Format | .pcd | 0.7 (ASCII only) | yes (see [table of descriptor labels](#descmaptable)) | |

## Comma Separated Values (CSV) Files

Expand Down
Loading
Loading