VolumeGeometry#

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

Bases: Geometry

Geometry class to replace individual points with 3D glyphs.

Parameters:
volumenp.ndarray, optional

3D volume data array.

volume_sampling_ratenp.ndarray, optional

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

target_resolutionfloat, optional

Target physical resolution for lowpass filtering. Set to 0 to disable filtering. By default 10.0 (Angstroms).

**kwargs

Additional keyword arguments passed to parent Geometry class.

Notes

This class is primarily used for backmapping electron density maps to their experimentally determined positions in tomograms.

Attributes

Methods

VolumeGeometry.set_appearance(**kwargs)

Set visual appearance properties of the geometry.

VolumeGeometry.update_isovalue(upper[, lower])

Update the isovalue for volume surface rendering.

VolumeGeometry.update_isovalue_quantile(...)

Update isovalue using quantile-based thresholds.

VolumeGeometry.update_target_resolution(...)

Update the target physical resolution for lowpass filtering.

set_appearance(**kwargs)[source]#

Set visual appearance properties of the geometry.

Parameters:
sizeint, optional

Point size for rendering.

opacityfloat, optional

Transparency level (0.0 to 1.0).

render_spheresbool, optional

Whether to render points as spheres.

ambientfloat, optional

Ambient lighting coefficient.

diffusefloat, optional

Diffuse lighting coefficient.

specularfloat, optional

Specular lighting coefficient.

base_colortuple of float, optional

RGB color values.

**kwargs

Additional appearance parameters.

update_isovalue(upper, lower=0)[source]#

Update the isovalue for volume surface rendering.

Parameters:
upperfloat

Upper isovalue threshold.

lowerfloat, optional

Lower isovalue threshold, by default 0.

update_isovalue_quantile(upper_quantile, lower_quantile=0.0)[source]#

Update isovalue using quantile-based thresholds.

Parameters:
upper_quantilefloat

Upper quantile threshold (0.0 to 1.0).

lower_quantilefloat, optional

Lower quantile threshold (0.0 to 1.0), by default 0.0.

Raises:
ValueError

If upper quantile is not greater than lower quantile.

update_target_resolution(resolution)[source]#

Update the target physical resolution for lowpass filtering.

Parameters:
resolutionfloat

Target resolution in physical units (e.g., Angstroms). Set to 0 to disable filtering.