mosaic.geometry.Geometry#
- class Geometry(points=None, normals=None, quaternions=None, color=(0.7, 0.7, 0.7), sampling_rate=None, meta=None, vtk_actor=None, vertex_properties=None, model=None, **kwargs)[source]#
Bases:
objectVTK-based geometry representation for 3D point clouds and meshes.
- Parameters:
- pointsnp.ndarray, optional
3D point coordinates.
- quaternionsnp.ndarray, optional
Normal vectors for each point (x,y,z).
- 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.
- model
mosaic.parametrization.Parametrization Model fitted to geometry data.
- **kwargs
Additional keyword arguments including normals.
- __init__(points=None, normals=None, quaternions=None, color=(0.7, 0.7, 0.7), sampling_rate=None, meta=None, vtk_actor=None, vertex_properties=None, model=None, **kwargs)[source]#
Methods
__init__([points, normals, quaternions, ...])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.
Get total number of points in the geometry.
is_mesh_representation([representation])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.
subset(idx[, copy])swap_data(points[, normals, faces, ...])Replace geometry data with new point cloud or mesh data.
Attributes
VTK actor object for rendering.
geometry_typeReturn a descriptive type of the current instance
Normal vectors at each point.
3D point coordinates of the geometry.
Orientation quaternions for each point.
vertex_propertiesVisibility state of the geometry.