VolumetricViewer#
- class vivid3d.VolumetricViewer(volume, cmap='viridis')#
Utility Class for volumetric data pre-visualization. IPython Required For View
This class serves as a simple way to visualize volumetric datasets pre-vivid, primarily for visualizing the mask for VoronoiVolume.mask_mesh
- volume#
The volume to visualize. Very large datasets might not work well.
- Type
3D ndarray with single value per cell
Notes
Many IPython environments require the following magic to properly display the Widget %matplotlib inline And the following magic to properly display the animation: %matplotlib notebook
- view()#
Creates GUI for volume visualization, masking, and colormap selection Runs on object creation.
Notes
Many IPython environments require the following magic to properly display the plots: %matplotlib inline
- render_animation(fps=25, min_threshold=None, max_threshold=None, cmap=None)#
Render the volume with the given mask into an animation.
- Parameters
fps (float, optional) – How many frames to animate per second. Default is 25.
min_threshold (float, optional) – The minimum threshold for the mask. If none specified, the value from the GUI will be used.
max_threshold (float, optional) – The maximum threshold for the mask. If none specified, the value from the GUI will be used.
cmap (string, optional) – The matplotlib colormap to use. If none specified, the value from the GUI will be used.
- Returns
animation (matplotlib.animation.Animation) – The Animation instance
Notes
Many IPython environments require the following magic to properly display the animation: %matplotlib notebook