Skip to main content

Reusable PyQt6 dialog for browsing and retrieving images from OMERO via ICE

Project description

omero-browser-qt

Reusable PyQt6 dialog for browsing and retrieving images from OMERO servers. Pixel data is fetched exclusively through the ICE transport layer so you always get the real stored values (not rendered RGB).

Features

  • Login dialog with server-name history (credentials are never stored)
  • QuPath-style browser — resizable dialog with:
    • Group / Owner filter combos
    • Lazy-loading Project → Dataset → Image tree
    • Image thumbnail preview (256 × 256)
    • Attribute table (dimensions, pixel sizes, acquisition date, …)
    • Name filter
  • ICE pixel loading via RawPixelsStore
    • Full 5-D array fetch (getPlane)
    • Tile-based dask lazy loading for large / pyramidal images (getTile)
  • Designed to be embedded in any PyQt6 application

Prerequisites: ZeroC ICE + omero-py

omero-py depends on ZeroC ICE, which cannot be built from source on modern Python. Pre-built wheels are available for Python 3.10 – 3.12 from Glencoe Software:

https://www.glencoesoftware.com/blog/2023/12/08/ice-binaries-for-omero.html

Install them before installing this package:

# 1. Install the pre-built ZeroC ICE wheel (pick your platform)
pip install https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp311-cp311-manylinux_2_28_x86_64.whl       # Linux
pip install https://github.com/glencoesoftware/zeroc-ice-py-win-x86_64/releases/download/20240325/zeroc_ice-3.6.5-cp311-cp311-win_amd64.whl                     # Windows
pip install https://github.com/glencoesoftware/zeroc-ice-py-macos-universal2/releases/download/20240131/zeroc_ice-3.6.5-cp311-cp311-macosx_11_0_universal2.whl  # macOS (Intel + Apple Silicon)
# Replace cp311 with cp310 or cp312 as needed. See the blog post above for details.

# 2. Install omero-py (now that ICE is available)
pip install omero-py

Alternatively, use conda:

conda install -c conda-forge zeroc-ice omero-py

Installation

pip install omero-browser-qt

With the demo viewer

pip install "omero-browser-qt[viewer]"

Quick start

from PyQt6.QtWidgets import QApplication
from omero_browser_qt import OmeroGateway, LoginDialog, OmeroBrowserDialog

app = QApplication([])
gw = OmeroGateway()

# 1. Login (only server names are remembered)
if LoginDialog(gateway=gw).exec():

    # 2. Browse & select images
    dlg = OmeroBrowserDialog(gateway=gw)
    if dlg.exec():
        for img in dlg.get_selected_images():
            print(img.getName(), img.getId())

    gw.disconnect()

Loading pixel data

from omero_browser_qt import load_image_data, load_image_lazy, is_large_image

# For regular images — returns numpy arrays
result = load_image_data(image_wrapper)
volumes = result["images"]   # list of np.ndarray, one per channel, shape (Z, Y, X)
meta    = result["metadata"]

# For large / pyramidal images — returns dask arrays
if is_large_image(image_wrapper):
    result = load_image_lazy(image_wrapper)
    # result["images"] is a list (per channel) of lists (per resolution level) of dask arrays

Demo viewer

A stripped-down multi-channel image viewer is included as an example. It supports opening images from local files (via bioio) and from OMERO:

python examples/viewer_demo.py

Controls:

  • Open File… — load a local OME-TIFF, ND2, CZI, etc.
  • Open from OMERO… — launches the login + browser dialogs
  • Projection — Slice / MIP (max intensity) / SUM
  • Z slider — navigate slices (enabled in Slice mode)
  • Lo% / Hi% — percentile-based contrast adjustment
  • Channel buttons — toggle individual channels on/off
  • Mouse wheel — zoom; middle-drag — pan

License

MIT

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

omero_browser_qt-0.1.4.tar.gz (29.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_browser_qt-0.1.4-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file omero_browser_qt-0.1.4.tar.gz.

File metadata

  • Download URL: omero_browser_qt-0.1.4.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for omero_browser_qt-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ed49088cd0bc70b96986b48be4a2bbcdb1a3f1e02ee4d2bd3398942f5a981839
MD5 2ff382db42e485211fb4dc827246535c
BLAKE2b-256 84adb6aecc637c620a0044249131810ea557625a451c2e86df57623f41f7bcae

See more details on using hashes here.

File details

Details for the file omero_browser_qt-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for omero_browser_qt-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 856ebfdec94c7003657cd3673a89e1e57f1dc30edf5693363e952ff42965bce9
MD5 dad41ac07061fd3952bdf9f3fd9c2d50
BLAKE2b-256 337d04d257e30b7bb44427206e8a98590fc5edb63e255aefbcc45e2ba301e65a

See more details on using hashes here.

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