Skip to main content

A Napari plugin for OME-Arrow and OME-Parquet bioimage data

Project description

napari-ome-arrow

License BSD-3 PyPI Python Version napari hub npe2

napari-ome-arrow is a minimal plugin for napari that opens image data through the OME-Arrow toolkit.

It provides a single, explicit pathway for loading OME-style bioimage data:

  • OME-TIFF (.ome.tif, .ome.tiff, .tif, .tiff)
  • OME-Zarr (.ome.zarr, .zarr stores and URLs)
  • OME-Parquet (.ome.parquet, .parquet, .pq)
  • Bio-Formats–style stack patterns (paths containing <, >, or *)
  • A simple .npy fallback for quick testing / ad-hoc arrays

Key features

  • Unified reader via OMEArrow All supported formats are loaded through OME-Arrow, which normalizes data into a common TCZYX-like representation.

  • Explicit image vs labels mode This plugin never guesses whether your data are intensities or segmentation masks. You must tell it:

    • via the GUI prompt when you drop/open a file in napari, or
    • via an environment variable for scripted/CLI usage.
  • Interactive choice in the GUI When NAPARI_OME_ARROW_LAYER_TYPE is not set and you open a supported file, napari shows a small dialog:

    How should my_data.ome.tif be loaded? [Image] [Labels] [Cancel]

    This makes the “image vs labels” choice explicit at load time without relying on file naming conventions.

  • Image mode

    • Returns a napari image layer
    • Preserves channels and sets channel_axis when appropriate (e.g. multi-channel OME-TIFF or stack patterns)
    • Works for 2D, 3D (Z-stacks), and higher-dimensional data (T, C, Z, Y, X)
  • Labels mode

    • Returns a napari labels layer
    • Converts data to an integer dtype (suitable for labels)
    • Applies a reasonable default opacity for overlaying on images
  • Automatic 3D for Z-stacks If the loaded data include a true Z dimension (Z > 1, assuming a TCZYX subset), the plugin asks the current viewer to switch to 3D (viewer.dims.ndisplay = 3) so z-stacks open directly in volume mode.

  • Headless / scripted friendly When Qt is not available (e.g., in headless or purely programmatic contexts), the reader:

    • respects NAPARI_OME_ARROW_LAYER_TYPE, and
    • defaults to "image" if the variable is not set.
  • Grid view for multi-row OME-Parquet When a Parquet file contains multiple OME-Arrow rows, each row is loaded as its own layer and the viewer is switched to napari’s grid mode. Set NAPARI_OME_ARROW_PARQUET_COLUMN to pick which image column to visualize.


This napari plugin was generated with copier using the napari-plugin-template (None).

Installation

You can install napari-ome-arrow via pip:

pip install napari-ome-arrow

If napari is not already installed, you can install napari-ome-arrow with napari and Qt via:

pip install "napari-ome-arrow[all]"

To install latest development version :

pip install git+https://github.com/wayscience/napari-ome-arrow.git

Usage

From the napari GUI

  1. Install the plugin (see above).
  2. Start napari.
  3. Drag and drop an OME-TIFF, OME-Zarr, OME-Parquet file, or stack pattern into the viewer.
  4. When prompted, choose Image or Labels.

The plugin will:

  • load the data through OMEArrow,
  • map channels and axes appropriately, and
  • automatically switch to 3D if there is a Z-stack.

From the command line

You can control the mode via an environment variable:

# Load as regular images
NAPARI_OME_ARROW_LAYER_TYPE=image napari my_data.ome.tif

# Load as labels (segmentation)
NAPARI_OME_ARROW_LAYER_TYPE=labels napari my_labels.ome.parquet

# Pick a specific column in a multi-row OME-Parquet and show in grid mode
NAPARI_OME_ARROW_LAYER_TYPE=image \\
NAPARI_OME_ARROW_PARQUET_COLUMN=Image_FileName_OrigDNA_OMEArrow_ORIG \\
napari tests/data/cytodataframe/BR00117006.ome.parquet

Contributing

Contributions are very welcome. Please reference our CONTRIBUTING.md guide.

License

Please see the LICENSE file for more information.

Issues

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napari_ome_arrow-0.0.3.tar.gz (265.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

napari_ome_arrow-0.0.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file napari_ome_arrow-0.0.3.tar.gz.

File metadata

  • Download URL: napari_ome_arrow-0.0.3.tar.gz
  • Upload date:
  • Size: 265.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for napari_ome_arrow-0.0.3.tar.gz
Algorithm Hash digest
SHA256 dfd462446bb77d7fcc0ff80e347f457aa0182f1c500f707040d3f0dec91e32e8
MD5 d1055652dcdf6d4beddb32d9f6f7d92d
BLAKE2b-256 5b25ba4978d5411e0257e04dd12dba90f9cfb6bd7d2be6c52c34af2898505a1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for napari_ome_arrow-0.0.3.tar.gz:

Publisher: publish-pypi.yml on WayScience/napari-ome-arrow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file napari_ome_arrow-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_ome_arrow-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bc9f3ec90dccdb2f71552139bc60d353d5a88949c75d4150c758364df22dc64b
MD5 f2340b31e67a2154e2d20bb4fb15d664
BLAKE2b-256 439050c58297c28f9c07d9ef5e018f9cadc186d6c7c6af84156d8520f3460bfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for napari_ome_arrow-0.0.3-py3-none-any.whl:

Publisher: publish-pypi.yml on WayScience/napari-ome-arrow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page