Add 3D image#

Display a 3D image layer using the add_image() API.

Tags: visualization-nD, layers

add 3D image
/home/runner/work/docs/docs/.venv/lib/python3.12/site-packages/napari/_qt/qt_event_loop.py:50: UserWarning: System theme detection requires a Qt6 backend. Please switch to PyQt6 or PySide6 to use it.
  theme_type=get_system_theme(),

from skimage import data

import napari

blobs = data.binary_blobs(length=64, volume_fraction=0.1, n_dim=3).astype(
    float
)
viewer = napari.Viewer(ndisplay=3)
# add the volume
viewer.add_image(blobs, scale=[3, 1, 1])

if __name__ == '__main__':
    napari.run()

Gallery generated by Sphinx-Gallery