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

Installation

pip install omero-browser-qt

Note: omero-py requires the ZeroC ICE libraries. On some platforms the easiest route is conda install -c conda-forge omero-py.

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

Publishing to PyPI

# 1. Install build tools
pip install build twine

# 2. Build the package
python -m build          # creates dist/omero_browser_qt-0.1.0.tar.gz + .whl

# 3. Validate
twine check dist/*

# 4. Create a PyPI account and API token
#    → https://pypi.org/manage/account/token/

# 5. Upload
twine upload dist/*
#    Username: __token__
#    Password: <your-api-token>

For subsequent releases: bump the version in pyproject.toml, rebuild, and re-upload.

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.0.tar.gz (200.4 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.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omero_browser_qt-0.1.0.tar.gz
  • Upload date:
  • Size: 200.4 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.0.tar.gz
Algorithm Hash digest
SHA256 225b398b1a925dcdbf06729cf419fbb829b1a8580d932a53c2066ff7ea44d202
MD5 59b83cb51f97018226a30c6fff2d8395
BLAKE2b-256 a20a46d8f9503e1df84f3a3093a94ebdd5ee3fdc0930eb2cde1db2e24157df8f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for omero_browser_qt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0eb6aab0e84c1a7afbeb4669c9b6060c31e08f78350eb8b74f1e0cb271ed1b7a
MD5 3d960506a148a57305771906bbb768e8
BLAKE2b-256 04a1ec1fd7c7a0c23aae974766700e643ea30b6506b015670a035770bac0b84b

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