mosaic.geometry.VolumeGeometry#

class VolumeGeometry(volume=None, volume_sampling_rate=array([1., 1., 1.]), **kwargs)[source]#

Bases: Geometry

Geometry class specialized for 3D volume rendering with isosurfaces.

Parameters:
volumenp.ndarray, optional

3D volume data array.

volume_sampling_ratenp.ndarray, optional

Sampling rates for volume data, by default ones(3).

**kwargs

Additional keyword arguments passed to parent Geometry class.

__init__(volume=None, volume_sampling_rate=array([1., 1., 1.]), **kwargs)[source]#

Methods

__init__([volume, volume_sampling_rate])

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([isovalue_percentile])

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.

update_isovalue(upper[, lower])

Update the isovalue for volume surface rendering.

update_isovalue_quantile(upper_quantile[, ...])

Update isovalue using quantile-based thresholds.

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.