cedalion.vis.anatomy.optode_selector

Classes

OptodeSelector(surface, points[, normals, ...])

A class for visualizing point clouds with interactive features in PyVista.

class cedalion.vis.anatomy.optode_selector.OptodeSelector(surface, points, normals=None, plotter=None, labels=None)[source]

Bases: object

A class for visualizing point clouds with interactive features in PyVista.

This class provides functionality to visualize and interact with labeled point clouds using a PyVista plotter. It allows points to be dynamically added or removed by picking them directly from the plot interface.

surface[source]

The surface of a head for normals.

Type:

cdc.Surface

points[source]

The point cloud data containing point coordinates.

Type:

cdt.LabeledPoints

normals[source]

Normal vectors to the points.

Type:

xr.DataArray

plotter[source]

A PyVista plotter instance for rendering the point cloud.

Type:

pv.Plotter

labels[source]

Labels corresponding to the points, displayed if provided.

Type:

list of str, optional

actors[source]

List of PyVista actor objects representing the points in the visualization.

Type:

list

color[source]

Default color for points if not specified by point type.

Type:

str or tuple, optional

plot()[source]

Renders the point cloud using the current settings.

on_pick(picked_point)[source]

Callback function for picking points in the visualization

update_visualization()[source]

Clears the existing plot and re-renders the point cloud.

enable_picking()[source]

Enables interactive picking of points on the plot.

Initial Contributors:
plot()[source]
on_pick(picked_point)[source]
update_visualization()[source]
enable_picking()[source]
find_surface_normal(picked_point, radius=6)[source]
update_normals(normal_at_picked_point, label)[source]