cloudViewer.ml.torch.vis.Visualizer#
- class cloudViewer.ml.torch.vis.Visualizer[source]#
The visualizer class for dataset objects and custom point clouds.
- class ColormapEdit(window, em)[source]#
This class is used to create a color map for visualization of points.
- class LabelLUTEdit[source]#
This class includes functionality for managing a labellut (label look-up-table).
- class ProgressDialog(title, window, n_items)[source]#
This class is used to manage the progress dialog displayed during visualization.
- Parameters:
title – The title of the dialog box.
window – The window where the progress dialog box should be displayed.
n_items – The maximum number of items.
- set_lut(attr_name, lut)[source]#
Set the LUT for a specific attribute.
Args: attr_name: The attribute name as string. lut: The LabelLUT object that should be updated.
- visualize(data, lut=None, bounding_boxes=None, width=1280, height=768)[source]#
Visualize a custom point cloud data.
Example
Minimal example for visualizing a single point cloud with an attribute:
import numpy as np import cloudViewer.ml.torch as ml3d # or import cloudViewer.ml.tf as ml3d data = [ { 'name': 'my_point_cloud', 'points': np.random.rand(100,3).astype(np.float32), 'point_attr1': np.random.rand(100).astype(np.float32), } ] vis = ml3d.vis.Visualizer() vis.visualize(data)
- Parameters:
data – A list of dictionaries. Each dictionary is a point cloud with attributes. Each dictionary must have the entries ‘name’ and ‘points’. Points and point attributes can be passed as numpy arrays, PyTorch tensors or TensorFlow tensors.
lut – Optional lookup table for colors.
bounding_boxes – Optional bounding boxes.
width – window width.
height – window height.
- visualize_dataset(dataset, split, indices=None, width=1280, height=768)[source]#
Visualize a dataset.
Example
- Minimal example for visualizing a dataset::
import cloudViewer.ml.torch as ml3d # or cloudViewer.ml.tf as ml3d
dataset = ml3d.datasets.SemanticKITTI(dataset_path=’/path/to/SemanticKITTI/’) vis = ml3d.vis.Visualizer() vis.visualize_dataset(dataset, ‘all’, indices=range(100))
- Parameters:
dataset – The dataset to use for visualization.
split – The dataset split to be used, such as ‘training’
indices – An iterable with a subset of the data points to visualize, such as [0,2,3,4].
width – The width of the visualization window.
height – The height of the visualization window.
- COLOR_NAME = 'RGB'#
- GREYSCALE_NAME = 'Colormap (Greyscale)'#
- LABELS_NAME = 'Label Colormap'#
- RAINBOW_NAME = 'Colormap (Rainbow)'#
- SOLID_NAME = 'Solid Color'#
- X_ATTR_NAME = 'x position'#
- Y_ATTR_NAME = 'y position'#
- Z_ATTR_NAME = 'z position'#