vis4d.vis.pointcloud.viewer.base

Generic classes to visualize and save pointcloud data.

Classes

PointCloudVisualizerBackend(class_color_mapping)

Visualization Backen Interface for Pointclouds.

class PointCloudVisualizerBackend(class_color_mapping, instance_color_mapping=None)[source]

Visualization Backen Interface for Pointclouds.

Creates a new Open3D visualization backend.

Parameters:
  • class_color_mapping (list[tuple[int, int ,int]]) – List of length n_classes that maps each class index to a unique color.

  • instance_color_mapping (list[tuple[int, int ,int]], optional) – List of length n_instances that maps each instance id to a unique color. Defaults to None.

add_scene(scene)[source]

Adds a given Scene3D to the visualization.

Parameters:

scene (Scene3D) – 3D scene that should be added.

Return type:

None

create_new_scene()[source]

Creates a new empty scene.

Return type:

Scene3D

get_current_scene()[source]

Returns the currently active scene.

If no scene is available, an new empty one is created.

Returns:

current pointcloud scene

Return type:

Scene3D

reset()[source]

Clears all stored data.

Return type:

None

save_to_disk(path_to_out_folder)[source]

Saves the visualization to disk.

Parameters:

path_to_out_folder (str) – Path to output folder

Return type:

None

show(blocking=True)[source]

Shows the visualization.

Parameters:

blocking (bool) – If the visualization should be blocking and wait for human input

Return type:

None