VolumeViewer (3D Interactive)#

Note

This page documents the interactive 3D viewer. For 2D slice plotting, see cdiutils.plot.plot_volume_slices().

class cdiutils.interactive.VolumeViewer(*args, **kwargs)#

Bases: object

The VolumeViewer class provides interactive 3D visualisation of reconstructed objects with isosurface rendering using Plotly.

__init__(*args, **kwargs)#

Examples#

Interactive 3D visualisation:

from cdiutils.interactive import VolumeViewer
import numpy as np

# Create viewer
viewer = VolumeViewer(
    data=reconstructed_object,
    voxel_size=(10e-9, 10e-9, 10e-9)  # metres
)

# Show interactive widget (in Jupyter)
viewer.show()

See Also#

cdiutils.plot.plot_3d_surface_projections() : Static matplotlib plots VolumeViewer : Same class, interactive 3D viewer