mosaic.geometry.Geometry#

class Geometry(points=None, quaternions=None, color=(0.7, 0.7, 0.7), sampling_rate=None, meta=None, vtk_actor=None, vertex_properties=None, **kwargs)[source]#

Bases: object

VTK-based geometry representation for 3D point clouds and meshes.

Parameters:
pointsnp.ndarray, optional

3D point coordinates.

quaternionsnp.ndarray, optional

Orientation quaternions for each point (scalar first w,x,y,z).

colortuple, optional

Base RGB color values, by default (0.7, 0.7, 0.7).

sampling_ratenp.ndarray, optional

Sampling rates along each axis.

metadict, optional

Metadata dictionary.

vtk_actorvtk.vtkActor, optional

Custom VTK actor object.

vertex_propertiesVertexPropertyContainer, optional

Additional vertex properties.

**kwargs

Additional keyword arguments including normals.

__init__(points=None, quaternions=None, color=(0.7, 0.7, 0.7), sampling_rate=None, meta=None, vtk_actor=None, vertex_properties=None, **kwargs)[source]#

Methods

__init__([points, quaternions, color, ...])

change_representation([representation])

Change the visual representation mode of the geometry.

color_points(point_ids, color)

Color specific points in the geometry using set_scalars backend.

compute_distance(query_points[, k])

get_number_of_points()

Get total number of points in the geometry.

merge(geometries)

Merge multiple geometry objects into a single geometry.

set_appearance([size, opacity, ...])

Set visual appearance properties of the geometry.

set_color([color])

Set uniform color for all points in the geometry.

set_scalars(scalars, color_lut[, ...])

Set scalar data for coloring points.

set_visibility([visibility])

Set geometry visibility in the scene.

swap_data(points[, normals, faces, ...])

Replace geometry data with new point cloud or mesh data.

Attributes

actor

VTK actor object for rendering.

normals

Normal vectors at each point.

points

3D point coordinates of the geometry.

quaternions

Orientation quaternions for each point.

sampling_rate

vertex_properties

visible

Visibility state of the geometry.