import ipyvolume as ipv
We will render a low resolution scan of a head, which will display quite quickly (since the data size is small). If we want to see a higher resolution, we can zoom in.
fig = ipv.figure()
vol_head = ipv.examples.head(max_shape=128);
vol_head.ray_steps = 800
Zoom in by clicking the magnifying icon, or keep the alt/option key pressed. After zooming in, the higher resolution verion cutout will be displayed.
ds = ipv.datasets.aquariusA2.fetch().data
Since version 0.5, ipyvolume supports multivolume rendering, so we can render two volumetric datasets at the same time.
vol_data = ipv.volshow(ds, extent=vol_head.extent, max_shape=128)
# v0.5 also supports maximum intensity
vol_data.rendering_method = 'MAX_INTENSITY'