DataContainerInteractor#

class DataContainerInteractor(session, role, prefix='Cluster')[source]#

Bases: QObject

Handle interaction between GUI and DataContainer

Attributes

DataContainerInteractor.container

The DataContainer this pane operates on.

DataContainerInteractor.data_changed

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

Methods

DataContainerInteractor.add(*args, **kwargs)

DataContainerInteractor.add_point(point)

Append a point to the active drawing cluster.

DataContainerInteractor.add_selection(...[, add])

Add new cloud from selected points.

DataContainerInteractor.apply(changes, *, undo)

Apply each change in the given direction, then refresh once.

DataContainerInteractor.attach_viewport(viewport)

Wire this pane to its ViewportInteractor.

DataContainerInteractor.change_representation(...)

DataContainerInteractor.clear()

DataContainerInteractor.deselect()

Deselect on right-click

DataContainerInteractor.deselect_points()

DataContainerInteractor.duplicate(geometries)

DataContainerInteractor.get_selected_geometries()

DataContainerInteractor.highlight_clusters_from_selected_points()

DataContainerInteractor.highlight_selected_points(color)

DataContainerInteractor.merge()

DataContainerInteractor.next_color()

DataContainerInteractor.pick_prop(picked_prop)

Select the geometry whose actor was picked by the viewport, if any.

DataContainerInteractor.remove(...)

Remove the given geometries from the container and notify listeners.

DataContainerInteractor.remove_selection()

Drop selected points (or whole geometries when fully selected).

DataContainerInteractor.render([defer_render])

DataContainerInteractor.render_vtk()

DataContainerInteractor.set_active_cluster(uuid)

Set the UUID of the cluster receiving drawn points (None to clear).

DataContainerInteractor.set_coloring_mode(mode)

DataContainerInteractor.set_selection_by_uuid(uuids)

Set selection by UUIDs.

DataContainerInteractor.update([tree_state])

Resync the tree widget after the session swapped containers.

DataContainerInteractor.visibility(geometries)

add_point(point)[source]#

Append a point to the active drawing cluster.

add_selection(selected_point_ids, add=True)[source]#

Add new cloud from selected points.

Parameters:
selected_point_idsdict

Mapping of geometry UUID to selected point IDs.

addbool

Whether to add the Geometry defined by selected points.

Returns:
int

Index of new cloud, -1 if creation failed.

apply(changes, *, undo)[source]#

Apply each change in the given direction, then refresh once.

attach_viewport(viewport)[source]#

Wire this pane to its ViewportInteractor.

property container#

The DataContainer this pane operates on.

deselect()[source]#

Deselect on right-click

pick_prop(picked_prop)[source]#

Select the geometry whose actor was picked by the viewport, if any.

remove(uuids_or_geometries)[source]#

Remove the given geometries from the container and notify listeners.

remove_selection()[source]#

Drop selected points (or whole geometries when fully selected).

set_active_cluster(uuid)[source]#

Set the UUID of the cluster receiving drawn points (None to clear).

set_selection_by_uuid(uuids)[source]#

Set selection by UUIDs.

Parameters:
uuidslist of str

UUIDs to select

update(tree_state=None)[source]#

Resync the tree widget after the session swapped containers.

Parameters:
tree_stateTreeState, optional

Tree structure to restore. If None, items are added to root.