Skip to main content

omero-label

Python library and OMERO CLI plugin to manage OME-Zarr labels in OMERO.

OME-Zarr groups containing label images can be linked to individual OMERO images as ROIs containing a single Mask shape as defined in the omero-zarr-pixel-buffer extension.

Requirements

  • Python 3.10 or later

Installation

omero-label is distributed via PyPI and can be installed using the standard Python packaging managers like pip:

pip install omero-label

Usage

To register an OME-Zarr label, run the omero label register using the absolute path to the label group and the ID of the image to link the label to:

omero label register /path/to/image.zarr/0/labels/my_label <image_id>

A successful registration will return the ID of the new object as Roi:<roi_id>.

To register an OME-Zarr label hosted on object storage, pass the S3 URL as defined in omero-zarr-pixel-buffer to the omero label register command:

omero label register s3://<endpoint>/<bucket>/path/to/image.zarr/0/labels/my_label <image_id>

The path of the S3 URL must be percent-encoded as defined in RFC 3986. S3 paths containing literal percent-encoded octets are not supported.

The properties of a label image can be retrieved by calling the omero label get command using the ID of the ROI:

omero label get <roi_id>

The command will return the properties as a list of key/value pairs:

x=0.0
y=0.0
width=1584.0
height=788.0
fillColor=-65436
uri=/data/image.zarr/0/labels/cells

Properties can also be retrieved individually by specifying their name as an argument:

omero label get <roi_id> x
omero label get <roi_id> width
omero label get <roi_id> fillColor

To update the location of an OME-Zarr label, run omero label update:

omero label update <roi_id> /new/path/to/image.zarr/0/labels/my_label

Development

Clone the repository:

git clone https://github.com/glencoesoftware/omero-label

Build the project using the build module:

pip intall build
python -m build

License

omero-label is licensed under the terms of the GNU General Public License (GPL) v2.

Download files

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

Source Distribution

omero_label-0.1.1.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

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

omero_label-0.1.1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file omero_label-0.1.1.tar.gz.

File metadata

  • Download URL: omero_label-0.1.1.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for omero_label-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0445c501f9e68296dff9b7953d5350d302b3ee10568141b7fb85e4e6619ed127
MD5 fd66f56a5c1b9bd5b59a68379547ff6c
BLAKE2b-256 91b2e240240dbca170f0f68edcbfca995f3c81594944abd3b2824fbd70c45b8d

See more details on using hashes here.

File details

Details for the file omero_label-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: omero_label-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for omero_label-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c62d7864c7430c31505e5749031f167cbc8a6012c9d7c351c1c91dd90bf7d76
MD5 22ff9ae03076fd23b3454991db30f816
BLAKE2b-256 5a41e193744fab78ad1c2680c0530db43667da47f9e04f3e861ed0403bd8556b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

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