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.0.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.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omero_label-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 81ed4f02419666c56be9a6b76d00e95748f54306f3e5dcf969209c2154e019f4
MD5 b4496918a0769707c23c8c1b1bd2962b
BLAKE2b-256 bf7a9bdb301de7e4d311af92c2d1f750f88a2f411aac4e939276f395c64daba1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: omero_label-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ffa9ed045cb07ffda82f27090a5220d8d890fd09e376007a1694556a20073cb
MD5 dc182fc07c92adf67a40bf63f18e3b7f
BLAKE2b-256 db6facc6b7aaa6feea67f60cba7dca85afd6ceab8ed0bb971a9089e7cbb56ff0

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

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