Cheat Sheet for Napari Users

Open a Viewer

Just open a viewer

# napari
viewer = napari.Viewer()

# tabulous
viewer = tabulous.TableViewer()

Open and read data

# napari
viewer = napari.view_image(image)

# tabulous
viewer = tabulous.view_table(df)

Layers

List of layers

# napari
viewer.layers

# tabulous
viewer.tables

Add data

# napari
viewer.add_image(image, name="Image")

# tabulous
viewer.add_table(df, name="table")

Get and set data

# napari
viewer.layers[0].data
viewer.layers[0].data = image

# tabulous
viewer.tables[0].data
viewer.tables[0].data = df

Dock widgets

Add a dock widget

# napari
viewer.window.add_dock_widget(widget)

# tabulous
viewer.add_dock_widget(widget)