triplclust_rs 0.4.0

Rust version of C. Dalitz's triplclust clustering algorithm
Documentation

triplclust_rs

Rust CI Python CI PyPI - version Crates.io - version Rust Docs License

Rust implementation of the triplclust hierarchical clustering algorithm outlined in

C. Dalitz, J. Wilberg, L. Aymans: "TriplClust: An Algorithm for Curve Detection in 3D Point Clouds." Image Processing Online 9, pp. 26-46 (2019). https://doi.org/10.5201/ipol.2019.234

used by AT-TPC, with Python bindings using pyo3. It also includes the optional post-processing algorithm to correct for over-clustering.

Requirements

Python > 3.8 if creating Python bindings. Rust compiler, if compiling from source.

Basic Installation

Python

To install the Python bindings, create a virtual environment, activate it, and then use

pip install triplclust_py

Most OS-architecture-python targets have a prebuilt wheel, so you should not need to compile from source. Some caveats:

  • windows11-aarch is not supported. kiddo does not support windows11-aarch through one of it's dependencies.
  • Python prior to 3.8 is not supported on any platform. Python prior to 3.10 is not supported on Windows.
  • A wide range of linux distributions is covered via the manylinux spec. See the spec for details if you have questions.

Rust

Requires the Rust compiler tool chain.

To add the Rust library as a dependency to your repository, use cargo

cargo add triplclust_rs

From source

Requires the Rust compiler tool chain.

Download the repository from GitHub and then create a Python virtual environment. Activate the virtual environment and install maturin using

pip install maturin

Then from the top level of the repository run

maturin develop

This will compile triplclust_rs and install the Python bindings triplclust_py.

Usage

For a complete description of the library, see the Rust documentation. For a high level overview and an outline of the Python bindings, see the Python documentation.

Benchmarks

To run the benchmarks run

cargo bench