Skip to main content

🎊 Confeta: Configurable Features Table for Napari

demo.webm

This plugin is similar to Napari's built-in features table widget, but optimized for usage with 2D and 3D Labels layers. It offers extra options to:

  • Sort table values.
  • Hide or show table columns.
  • Colorize Labels based on feature values, with different color maps.
  • Connect your own callback functions to customize what happens when users click on a table row.
  • Connect your own featurizer functions that run automatically when the data in the Labels changes and update the displayed table.

The content of the table is a graphical view of the features attribute of a Labels layer.

Displaying the table

Open the table from Plugins > Features Table in Napari.

The table displays features from the currently selected layer in the layers list. It will automatically update when the layer selection changes. If multiple layers are selected, only features from the first selected layer will be displayed.

Connecting featurizer functions

By default, the table displays a label column for the selected Labels layer, along with any pre-existing features that can be matched with the label column (they should be in Pandas DataFrame format with at least a 'label' column).

You can customize the behaviour of the plugin to update features automatically when a new Labels layer is selected, or when its data changes, based on a featurizer function that you provide. Featurizer functions will receive as input the labels layer data as a Numpy array, and should return a Pandas DataFrame with at least a label column, along with any other feature columns.

For example, the following code extends the behaviour of the table to display the area (or volume) of objects:

import napari
import pandas as pd
from skimage.measure import regionprops_table
from napari_confeta import ConfigurableFeaturesTableWidget

# Write an "area" featurizer
def area_featurizer(labels: np.ndarray) -> pd.DataFrame:
    return pd.DataFrame(regionprops_table(labels, properties=["label", "area"]))

if __name__ == "__main__":
    viewer = napari.Viewer()
    widget = ConfigurableFeaturesTableWidget(viewer, featurizer_functs=[area_featurizer])
    viewer.window.add_dock_widget(widget)
    napari.run()

If more than one featurizer function is provided, these functions will be run one by one and the results will be merged into a single features DataFrame.

Controlling what clicking on a table row does

By default, clicking on a table row selects the corresponding label in the Labels layer. This behaviour can be extended by adding callback functions to the table_click_callbacks parameter of the table widget. The callback functions receive a selection context object with references to the viewer, selected layer, selected table row, and the table itself.

For example:

import napari
from napari_confeta import ConfigurableFeaturesTableWidget, SelectionContext

def print_selection_context(ctx: SelectionContext):
    print(f"Napari viewer: {ctx.viewer}")
    print(f"Selected layer: {ctx.selected_layer}")
    print(f"Selected table row: {ctx.selected_table_idx}")
    print(f"Features table: {ctx.features_table}")

if __name__ == "__main__":
    viewer = napari.Viewer()
    widget = ConfigurableFeaturesTableWidget(viewer, table_click_callbacks=[print_selection_context])
    viewer.window.add_dock_widget(widget)
    napari.run()

In this case, the function print_selection_context gets called whenever users click on a table row.

Installation

You can install napari-confeta via [pip]:

pip install napari-confeta

Contributing

Contributions are very welcome.

License

This software is distributed under the terms of the BSD-3 license.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Metadata

Release files for napari-confeta 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napari-confeta 0.3.3
File Size Uploaded Provenance Actions
napari_confeta-0.3.3.tar.gz 322.6 kB With provenance Details for napari_confeta-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for napari-confeta 0.3.3
File Interpreter ABI Platform Actions
napari_confeta-0.3.3-py3-none-any.whl Python 3 none any Details for napari_confeta-0.3.3-py3-none-any.whl

Total release size: 339.5 kB

Release files / napari_confeta-0.3.3.tar.gz

Download URL napari_confeta-0.3.3.tar.gz
Size 322.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d7ee8ed058bcb5e1cc85e26f1b5018834f486ab359eaac200df23c3cd81a178c
BLAKE2b-256 checksum
How to use checksums
8489f07d44c5d734457fe76a2cd30639e67706a7ba42e389e12dd8ada6cec906
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / napari_confeta-0.3.3-py3-none-any.whl

Download URL napari_confeta-0.3.3-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
250459d8dd9499e4e6206bd6b837e3dd3756c2b669c5e7903f193a7e743186cf
BLAKE2b-256 checksum
How to use checksums
a8c6e231b4f24efeaccaecb63f896a7745d17767b2fe4ed5d2e077ba106e1cae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for napari-confeta 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for napari_confeta-0.3.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page