Metadata-Version: 2.4
Name: napari-ome-arrow
Version: 0.0.6
Summary: A Napari plugin for OME-Arrow and OME-Parquet bioimage data
License: 
        Copyright (c) 2025, Dave Bunten
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        * Redistributions of source code must retain the above copyright notice, this
          list of conditions and the following disclaimer.
        
        * Redistributions in binary form must reproduce the above copyright notice,
          this list of conditions and the following disclaimer in the documentation
          and/or other materials provided with the distribution.
        
        * Neither the name of copyright holder nor the names of its
          contributors may be used to endorse or promote products derived from
          this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Bug Tracker, https://github.com/wayscience/napari-ome-arrow/issues
Project-URL: Source Code, https://github.com/wayscience/napari-ome-arrow
Project-URL: User Support, https://github.com/wayscience/napari-ome-arrow/issues
Project-URL: Documentation, https://github.com/wayscience/napari-ome-arrow#README.md
Classifier: Framework :: napari
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: magicgui
Requires-Dist: numpy
Requires-Dist: ome-arrow>=0.0.10
Requires-Dist: qtpy>=2.4
Requires-Dist: scikit-image
Provides-Extra: all
Requires-Dist: napari; extra == "all"
Requires-Dist: qtpy>=2.4; extra == "all"
Provides-Extra: pyqt6
Requires-Dist: napari[pyqt6]; extra == "pyqt6"
Requires-Dist: pyqt6>=6.6; extra == "pyqt6"
Requires-Dist: qtpy>=2.4; extra == "pyqt6"
Provides-Extra: pyside6
Requires-Dist: napari[pyside6]; extra == "pyside6"
Requires-Dist: pyside6>=6.6; extra == "pyside6"
Requires-Dist: qtpy>=2.4; extra == "pyside6"
Provides-Extra: vortex
Requires-Dist: vortex-data; extra == "vortex"
Dynamic: license-file

# napari-ome-arrow

[![License BSD-3](https://img.shields.io/pypi/l/napari-ome-arrow.svg?color=green)](https://github.com/wayscience/napari-ome-arrow/raw/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/napari-ome-arrow.svg?color=green)](https://pypi.org/project/napari-ome-arrow)
[![Python Version](https://img.shields.io/pypi/pyversions/napari-ome-arrow.svg?color=green)](https://python.org)
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-ome-arrow)](https://napari-hub.org/plugins/napari-ome-arrow)
[![npe2](https://img.shields.io/badge/plugin-npe2-blue?link=https://napari.org/stable/plugins/index.html)](https://napari.org/stable/plugins/index.html)
[![Software DOI badge](https://zenodo.org/badge/DOI/10.5281/zenodo.17613571.svg)](https://doi.org/10.5281/zenodo.17613571)

`napari-ome-arrow` opens OME image data in [napari] using the [OME-Arrow](https://github.com/wayscience/ome-arrow) library.

## Supported inputs

- Typed OME-Arrow dataset directories (`*.ome-arrow`)
- Nested OME-Arrow tables in Parquet (`*.ome.parquet`, `*.parquet`, `*.pq`)
- OME-Vortex files (`*.ome.vortex`, `*.vortex`)
- OME-TIFF and TIFF files (`*.ome.tif`, `*.ome.tiff`, `*.tif`, `*.tiff`)
- OME-Zarr stores (`*.ome.zarr`, `*.zarr`)
- Numbered image stacks and stack patterns containing `<`, `>`, or `*`
- NumPy arrays (`*.npy`)

Multi-image OME-Arrow datasets and multi-row nested tables are loaded as multiple napari layers.

## Installation

Python 3.11 or newer is required.

Install the plugin into an existing napari environment:

```bash
pip install napari-ome-arrow
```

Or install napari with a Qt backend at the same time:

```bash
pip install "napari-ome-arrow[pyqt6]"
```

OME-Vortex support requires one additional extra:

```bash
pip install "napari-ome-arrow[vortex]"
```

## Usage

Open napari, then drag a supported file or directory into the viewer.
You can also start napari with a path:

```bash
napari sample.ome.parquet
napari images.ome-arrow
```

The plugin loads data as either image or labels layers.
It chooses the layer type in this order:

1. `NAPARI_OME_ARROW_LAYER_TYPE`, when set to `image` or `labels`.
1. OME-Arrow `image_type` metadata, when available.
1. A napari prompt.
1. `image` when running without a Qt application.

Set the mode explicitly for scripts or repeatable commands:

```bash
NAPARI_OME_ARROW_LAYER_TYPE=labels napari segmentation.ome.parquet
```

For a numbered stack, select the files together or provide a pattern:

```bash
napari "stack/z<000-120>.tif"
```

## Configuration

| Environment variable              | Purpose                                      |
| --------------------------------- | -------------------------------------------- |
| `NAPARI_OME_ARROW_LAYER_TYPE`     | Load as `image` or `labels`                  |
| `NAPARI_OME_ARROW_PARQUET_COLUMN` | Select an OME-Arrow struct column in Parquet |
| `NAPARI_OME_ARROW_VORTEX_COLUMN`  | Select an OME-Arrow struct column in Vortex  |
| `NAPARI_OME_ARROW_STACK_SCALE`    | Set stack spacing as `Z,Y,X` or `T,C,Z,Y,X`  |

Multiple rows are displayed in napari's grid view.
Image stacks with a real Z dimension open in 3D.
If stack spacing is missing, the plugin can prompt for it when a Qt application is available.

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md) for setup and test instructions.

## License

This project uses the BSD 3-Clause License.
See [LICENSE](LICENSE).

Report problems through the [issue tracker].

[issue tracker]: https://github.com/wayscience/napari-ome-arrow/issues
[napari]: https://napari.org
