Skip to main content

A lightweight, Qt-based OpenGL viewer for visualising point cloud data.

Project description

PCDViewer

PCDViewer is a lightweight, Qt-based OpenGL viewer designed to visualise midsize point cloud datasets with ease. This package allows users to work with point clouds of approximately 100 million points, making it suitable for applications such as urban planning, geospatial analysis, and environmental monitoring. It is part of a larger project aimed at point cloud analysis, classification, and feature detection using neural networks, which is under development.

Features

  • Efficiently visualises midsize point clouds (around 100 million points).
  • Qt-based OpenGL rendering for interactive 3D visualisation.
  • Supports operations like rotation, panning, zooming, and point picking.
  • Adjustable parameters for optimised point cloud interaction.
  • Easy integration as a widget in custom Python projects.

Requirements

  • Python 3.8 or above
  • PyQt5
  • numpy
  • OpenGL
  • open3d (optional, for file import)

Installation

You can install PCDViewer via pip:

pip install pcdviewer

Alternatively, you can clone the repository and install the package manually:

git clone https://github.com/Sepehr-Sobhani-AU/PCDViewer.git
cd PCDViewer
python setup.py install

Usage

PCDViewer provides a main widget called PCDViewerWidget that can be used in PyQt5 applications for visualising point clouds.

Example Usage

Here's an example of how to create a PyQt5 application that uses PCDViewerWidget to visualise a point cloud:

from pcdviewer.PCDViewerWidget import PCDViewerWidget
from PyQt5.QtWidgets import QApplication
import numpy as np
import sys

# Create a 10,000 random point ndarray with float32 data type
points = np.random.rand(10000, 3).astype(np.float32)
colors = np.random.rand(10000, 3).astype(np.float32)

# Initialise a Qt application
app = QApplication(sys.argv)

# Initialise PCDViewerWidget
viewer = PCDViewerWidget()
viewer.zoom_max_factor = 3
viewer.default_zoom_factor = 1.5
viewer.point_size = 2
viewer.set_points(points, colors)
viewer.show()

# Execute the application
sys.exit(app.exec_())

Example File Loader

To load a point cloud from a .ply file using Open3D:

import sys
from PyQt5 import QtWidgets
import numpy as np
import open3d as o3d
from pcdviewer.PCDViewerWidget import PCDViewerWidget

def main():
    app = QtWidgets.QApplication(sys.argv)
    main_window = QtWidgets.QMainWindow()
    main_window.setWindowTitle("PCDViewerWidget Example")
    main_window.resize(800, 600)

    central_widget = QtWidgets.QWidget()
    main_window.setCentralWidget(central_widget)

    layout = QtWidgets.QVBoxLayout(central_widget)
    viewer_widget = PCDViewerWidget(central_widget)
    layout.addWidget(viewer_widget)

    # Load point cloud data
    pcd_data = o3d.io.read_point_cloud("path/to/your/pointcloud.ply")
    points = np.asarray(pcd_data.points, dtype=np.float32)
    colors = np.asarray(pcd_data.colors, dtype=np.float32) if pcd_data.colors else None
    viewer_widget.set_points(points, colors)

    main_window.show()
    sys.exit(app.exec_())

if __name__ == "__main__":
    main()

Documentation

For detailed documentation, refer to the Docs folder or visit the GitHub Pages. The documentation includes detailed information about modules, classes, methods, and properties available in the package, including how to extend and customise the widget.

Contributing

Contributions are welcome! Whether it's bug reports, feature requests, or pull requests, feel free to contribute and help improve PCDViewer. Please ensure all contributions adhere to the style guide and best practices detailed in the CONTRIBUTING.md.

Roadmap

PCDViewer is in its initial release (beta version). We have plans to improve its capabilities further, such as:

  • Out-of-Core Rendering: To enable visualisation of extremely large point clouds.
  • Classification and Feature Detection: Part of the broader vision to integrate neural network-based classification and analysis tools.
  • GUI Enhancements: More user-friendly tools and interaction modes for enhanced productivity.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions, feel free to reach out via GitHub or send an email to sepehr.sobhani@gmail.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PCDViewer-0.1.2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PCDViewer-0.1.2-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file PCDViewer-0.1.2.tar.gz.

File metadata

  • Download URL: PCDViewer-0.1.2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for PCDViewer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ddac18786d4e5b85fd3606e7b0a47aa9f117ff80b06a94fbd18a44d14bcd9944
MD5 7eb108dc65e990fb162839fbb602a2a0
BLAKE2b-256 d687745bbb57ae7ec5b1c9593facfe59d6aa7189c0d66548e1beeaf5e88d049e

See more details on using hashes here.

File details

Details for the file PCDViewer-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: PCDViewer-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for PCDViewer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e87207653668779f5652ef1527883b9fd95de32d3c6ecf45cf061071b41625e
MD5 69b86cbf819ef1a73e03f3a7024ecdc2
BLAKE2b-256 527688f32c6a65376c3db0928af78621b1c586227f3d7866a55f6c3f60f37c5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page